A quick guide to a Docker powered dedicated server for 7 Days To Die
Preparations
Docker Engine
- Make shure Docker is installed
Port Forwardings
You need some port forwardings on your fire wall. The default ports are:
- 26900/TCP
- 8080/TCP
- 26900-26903/UDP
Persist Data
Create a directory for Steam, for the binaries and for the save game:
mkdir -p $HOME/7daystodie/srv mkdir -p $HOME/7daystodie/data mkdir -p $HOME/7daystodie/srvdata
Settings
Environment Variables (and their defaults)
- PORTTCP=26900
- PORTUDP=26900-26903
- PORTALLOCMOD=8080
Locations
- Server Files: $HOME/7daystodie/srv
- Server Files: $HOME/7daystodie/srvdata
- Save Files And Logs: $HOME/7daystodie/data
- Server Konfig File: $HOME/7daystodie/srv/serverconfig.xml
- Admin Konfig File: $HOME/7daystodie/data/Saves/serveradmin.xml
Mods
Just handle mods like on a ragular dedicatet server, but inside the directory: $HOME/7daystodie
Docker Run
Dirty
docker run --name 7daystodie -it --rm -e PORTTCP=26900 -e PORTUDP=26900-26903 -e PORTALLOCMOD=8080 -v $HOME/7daystodie/srv:/home/steam/server -v HOME/7daystodie/data:/home/steam/.local/share/7DaysToDie -v $HOME/7daystodie/srvdata:/home/steam/.config/unity3d -p 26900:26900/tcp -p 26900-26903:26900-26903/udp -p 8080:8080/tcp dockrbyter/7daystodie
Clean
docker run --name 7daystodie \ -it --rm \ -e PORTTCP=26900 \ -e PORTUDP=26900-26903 \ -e PORTALLOCMOD=8080 \ -v $HOME/7daystodie/srv:/home/steam/server \ -v $HOME/7daystodie/data:/home/steam/.local/share/7DaysToDie \ -v $HOME/7daystodie/srvdata:/home/steam/.config/unity3d \ -p 26900:26900/tcp \ -p 26900-26903:26900-26903/udp \ -p 8080:8080/tcp \ dockrbyter/7daystodie
Docker Compose
Download
- Download Docker-Compose file – [githubusercontent.com]
- Move the file to $HOME/7daystodie
docker-compose.yml
version: "3.9" services: 7daystodie: container_name: 7daystodie image: dockrbyter/7daystodie:latest environment: - PORTTCP=26900 - PORTUDP=26900-26903 - PORTALLOCMOD=8080 volumes: - $HOME/7daystodie/srv:/home/steam/server - $HOME/7daystodie/data:/home/steam/.local/share/7DaysToDie - $HOME/7daystodie/srvdata:/home/steam/.config/unity3d ports: - "26900:26900/tcp" - "8080:8080/tcp" - "26900-26903:26900-26903/udp" # Docker-Compose File: 7 Days To Die # https://github.com/dockrbyter/GameServer/tree/master/Docker/Linux/7%20Days%20To%20Die - [github.com]
Compose Up
cd $HOME/7daystodie docker-compose up
Links
- My other Steam guides – [steamcommunity.com]
- Docker Hub Repo – [docker.com]
- GitHub Dockerfile – [github.com]
- GitHub Wiki – [github.com]
- Dedicated Server Setup Valve – [valvesoftware.com]
- Dedicated Server Setup Wiki – [fandom.com]
- Community-Forum – [7daystodie.com]
- Docker Setup – [docker.com]
This is all about 7 Days to Die – Dedicated Server / Docker Container – Modding Guide; I hope you enjoy reading the Guide! If you feel like we should add more information or we forget/mistake, please let us know via commenting below, and thanks! See you soon!
- All 7 Days to Die Posts List
Leave a Reply