Unofficial Vintage Story server image - versioned, simple, easy to operate
236
Wrapper around official vintage-story server. It is based on official dotnet base image, and is tagged the same way the official server is versioned.
Getting the server to run properly (especially: gracefully shutdown) is not straightforward in containerized environment, hence I decided to share image I created. It properly shutdowns (waits for the server to gracefully shutdown) and is easy to operate. It also supplies a proper healthcheck.
Image repository: https://github.com/soanvig/vintage-story-server
Podman and Docker commands are identical with small exceptions to run command (in most cases you can replace podman for docker).
I prefer Podman due to its daemon-less architecture, and non-root approach by default. The image is the same, the details about running it are different, and I listed them below.
Important points:
/home/vintagestory/data - if you don't mount it, then you may lose your server's worldvintagestory user (id: 1000)--userns=keep-id is required to have proper permissions to access data directory, and add docker.io/ prefix to the image namechown -R 1000:1000 <data-directory-on-host-machine> (it is necessary, because otherwise non-root user inside container won't have access to root-managed mounted volume).latest tag meaning that recreating a container (which can happen unexpectedly) might download newer version than you were previously running.Other configuration settings listed in commands below are arbitrary, and are just copied from my server configuration.
If it is your first time running a Vintage Story server please note, that by default server operates in whitelist mode, so you have to whitelist a player: /player <player-name> whitelist on (see Operating sections for running commands on the server).
Once whitelisted you might want to give admin privileges to your player to run server commands through Vintage Story directly: /op <player-name>.
podman run --stop-timeout 30 --replace -d --name vintage-story-server --userns=keep-id -v ~/vintage-story-server-data:/home/vintagestory/data -p 42420:42420 --restart always docker.io/soanvig/vintage-story-server:<VERSION-TAG>
(--restart always in podman is the same as --restart unless-stopped in docker)
docker run --stop-timeout 30 -d --name vintage-story-server -v ~/vintage-story-server-data:/home/vintagestory/data -p 42420:42420 --restart unless-stopped soanvig/vintage-story-server:<VERSION-TAG>
podman logs vintage-story-server
Note: logs are stored by the server inside data/Logs/server-main.log. This image simply follows that file, and prints its content to stdout (which makes container logs work).
Once the container is up and running, you can:
podman healthcheck run vintage-story-sever or podman exec vintage-story-server healthcheck (returns 0 status code for OK, 1 for a problem)podman exec vintage-story-server cmd <command> (example: podman exec vintage-story-server cmd /op PlayerName) (reference official documentation for available commands)Content type
Image
Digest
sha256:c80670c80…
Size
169.5 MB
Last updated
over 1 year ago
docker pull soanvig/vintage-story-server:1.20.4