Note: This image is not officially supported by Valve, nor by The Fun Pimps.
If issues are encountered, please report them on the GitHub repository
Dedicated Server for 7 Days to Die using Docker, and optionally Docker-Compose.
Built almost from scratch to be the smallest 7 Days to Die Dedicated Server around!
Source:
Resource links:
The server can be run using plain Docker, or using Docker-Compose. The end-result is the same, but Docker-Compose is recommended.
Optional arguments table:
Argument | Description | Values | Default |
---|---|---|---|
GAME_VERSION |
Game version to serve | [a-zA-Z0-9_]+ | public |
PUBLIC_SERVER |
Is the server displayed Publicly | [0-3] | 2 |
QUERY_PORT |
Port for other players to connect to | 1000 - 65535 | 26900 |
SERVER_NAME |
Publicly visible Server Name | [a-zA-Z0-9]+ | 7DaysToDieServer |
SERVER_DESC |
Publicly visible Server Description | [a-zA-Z0-9]+ | 7DaysToDieServer |
SERVER_PASSWORD |
Server password | [a-zA-Z0-9]+ | |
SERVER_LOG_FILE |
Path to store log file | [a-zA-Z0-9]+ | |
MAX_PLAYERS |
Maximum amount of player to be permitted into the game | [0-9]+ | 8 |
The following are instructions for running the server using the Docker image.
-
Acquire the image locally:
-
Pull the image from DockerHub:
docker pull renegademaster/7_days_to_die-dedicated-server:<tagname>
-
Or alternatively, build the image:
git clone https://github.com/Renegade-Master/7_days_to_die-dedicated-server.git \ && cd 7_days_to_die-dedicated-server docker build -t renegademaster/7_days_to_die-dedicated-server:<tag> -f docker/7_days_to_die-dedicated-server.Dockerfile .
-
-
Run the container:
Note: Arguments inside square brackets are optional. If the default ports are to be overridden, then the
published
ports below must also be changedmkdir 7DTDConfig 7DTDSaves 7DTDServer docker run --detach \ --mount type=bind,source="$(pwd)/7DTDServer",target=/home/steam/7DTDServer \ --mount type=bind,source="$(pwd)/7DTDConfig",target=/home/steam/7DTDConfig \ --publish 26900:26900/tcp --publish 26900:26900/udp --publish 26901:26901/udp --publish 26902:26902/udp \ --name 7dtd-dedicated_server \ --user=$(id -u):$(id -g) \ [--env=GAME_VERSION=<value>] \ [--env=QUERY_PORT=<value>] \ [--env=SERVER_NAME=<value>] \ [--env=SERVER_PASSWORD=<value>] \ [--env=SERVER_LOG_FILE=<value>] \ [--env=MAX_PLAYERS=<value>] \ renegademaster/7_days_to_die-dedicated-server[:<tagname>]
-
Once you see
INF [Steamworks.NET] GameServer.LogOn successful
in the console, people can start to join the server.
The following are instructions for running the server using Docker-Compose.
-
Download the repository:
git clone https://github.com/Renegade-Master/7_days_to_die-dedicated-server.git \ && cd 7_days_to_die-dedicated-server
-
Make any configuration changes you want to in the
docker-compose.yaml
file. In theservices.dedicated_server.environment
section, you can change values for the server configuration.Note: If the default ports are to be overridden, then the
published
ports must also be changed -
In the
docker-compose.yaml
file, you must change theservice.dedicated_server.user
values to match your local user. To find your local user and group ids, run the following command:printf "UID: %s\nGID: %s\n" $(id -u) $(id -g)
-
Run the following commands:
mkdir 7DTDConfig 7DTDSaves 7DTDServer docker-compose up --build --detach
-
Once you see
INF [Steamworks.NET] GameServer.LogOn successful
in the console, people can start to join the server.