Intro #
I’m a big fan of Vintage Story, and from time to time I like to play with my friends. The only issue is that the default server.sh script that Vintage Story provides is well… a little broken. The script doesn’t run which makes its impossible to access to live server console. It is possible to still host it simply by running dotnet on the .dll file, but its a baindaid fix and still doesn’t give access to the server console. I set out to resolve this once and for all by making a portable containerized hosting solution.
Architecture #
Because Vintage Story is a proprietary game, and you need to have a valid account in order to access the links for the server and game files, I didn’t think it would be a good idea to upload any images I made to a public releases page like Dockerhub. Instead I have the link inputted in a .env. file. The Dockerfile will build the image, and the docker-compose.yaml will build the container.
All of this will take place with just docker compose up -d.
Server Console #
The server console can be accessed by attaching to the container with docker compose attach vintagestory. With two commands I can now spin up the server and input all the commands my heart desires. Unfortunately I had just one more hiccup in my way.
Tunneling #
The server that vintagestory was hosted on was behind CGNAT, so it was inaccessible to any outside of the local network or my tailnet. I did have a Pi at my parents place that did have access to the public IP of the router; however, the vintage story server does not support ARM architecture.
Despite this, because I had access to a public IP I was able to resolve this by tunneling with frp. This solution ended up being a lot more painless than I anticipated. The program is split into two parts: frps and frpc, for the server and client, respectively. On the Pi I placed the frps binary and it’s config frps.toml. On the machine running the vintage story server I placed frpc and the respective config file, frpc.toml.
On the router with the public IP, I port forwarded both port 7000 (frp port used for tunneling) and port 42420 (vintagestory’s port). Then I made sure to open both of those ports on the Pi’s firewall.
And voilà! It just worked.
