Linux Dedicated Server for the Video Game 7 Days to Die using Docker
- serverconfig.xml through a ENV variables.
- World-persistence on container destruction.
- Configuration via ENV variables.
- Mods and custom mod-configuration.
- Automatic update of game files.
- Automatic update of mod files.
Here is an example of a docker run line that exposes all ports and mounts the data directory to persist world and configuration files.
docker run -it -p '26900:26900/tcp' -p '26900-26902:26900-26902/udp' -p '8080-8082:8080-8082/tcp' -v `pwd`/data:'/data' 7d2d
In the previous example you could start, stop. edit the data/serverconfig.xml file and then restart. But using the SERVERCONFIG_OVERRIDE ENV variable you can just start from an existing file.
env
SERVERCONFIG_OVERRIDE
start.sh
#!/usr/bin/env bash
export SERVERCONFIG_OVERRIDE=$(< serverconfig.xml)
docker run -it --env-file env -p '26900:26900/tcp' -p '26900-26902:26900-26902/udp' -p '8080-8082:8080-8082/tcp' -v `pwd`/data:'/data' 7d2d
This project is heavily influenced by DST Academy. My sincere thanks and appreciation to the authors of the docker-dontstarvetogether and docker-steamcmd.