Skip to content

Renegade-Master/7_days_to_die-dedicated-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

7 Days to Die Dedicated Server

Disclaimer

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

Badges

Build and Test Server Image

Docker Image Version (latest by date) Docker Image Size (latest by date) Docker Pulls

Description

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!

Links

Source:

Resource links:

Instructions

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

Docker

The following are instructions for running the server using the Docker image.

  1. 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 .
  2. 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 changed

    mkdir 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>]
  3. Once you see INF [Steamworks.NET] GameServer.LogOn successful in the console, people can start to join the server.

Docker-Compose

The following are instructions for running the server using Docker-Compose.

  1. Download the repository:

    git clone https://github.com/Renegade-Master/7_days_to_die-dedicated-server.git \
        && cd 7_days_to_die-dedicated-server
  2. Make any configuration changes you want to in the docker-compose.yaml file. In the services.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

  3. In the docker-compose.yaml file, you must change the service.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)
  4. Run the following commands:

    mkdir 7DTDConfig 7DTDSaves 7DTDServer
    
    docker-compose up --build --detach
  5. Once you see INF [Steamworks.NET] GameServer.LogOn successful in the console, people can start to join the server.