*Updated for A19 Alpha 19
7 Days to Die is a survival horde sandbox apocalypse style game. It’s quite fun solo as well as multiplayer in a server environment. Unfortunately, most tutorials on server setups or installations are dated and misleading. This thread is designed to be straightforward and easy to understand to get your server up and running in no time!
- Ubuntu 16 / Ubuntu 18 / Debian style linux distro
- Already configured os / firewall environment
- Already logged into your linux server and at the command prompt ready to go!
Let’s get started!
First, we will need to install some requirements:
sudo apt update && sudo apt install -y lib32gcc1 screen
Now, let’s create some directories that we will use during this installation:
Next, we will need to download and extract the steamcmd utility
wget -qO- http://media.steampowered.com/installer/steamcmd_linux.tar.gz | tar xvz -C $HOME/steamcmd
We need to download and install the 7 Days to Die Dedicated server
$HOME/steamcmd/steamcmd.sh +login anonymous +force_install_dir $HOME/7d2d +app_update 294420 +quit
The serverconfig.xml file is overwritten when a new version is released. To prevent losing our settings when an update is released, we will copy the config and use the copy as our live config
cp serverconfig.xml live-serverconfig.xml
At this point, you should configure your live-serverconfig.xml to your liking. A good resource for server options is the official 7 Days to Die Wiki
7 Days to Die uses several ports that need to be opened on your firewall. Here are the commands to open those ports with ufw
26900 tcp & udp
sudo ufw allow 26900 && sudo ufw allow 26901/udp && sudo ufw allow 26902/udp
Just like the server config, the launch script is also overwritten when the server is updated. Let’s make a copy as not to lose that too
cp startserver.sh live-startserver.sh
We want to change the script a bit so that the server starts in the background when we run it. We will add “screen -dmS 7d2d” before the server launch
#!/bin/sh cd "`dirname "$0"`" PARAMS=$@ CONFIGFILE= while test $# -gt 0 do if [ `echo $1 | cut -c 1-12` = "-configfile=" ]; then CONFIGFILE=`echo $1 | cut -c 13-` fi shift done if [ "$CONFIGFILE" = "" ]; then echo "No config file specified. Call this script like this:" echo " ./startserver.sh -configfile=serverconfig.xml" exit 1 else if [ -f "$CONFIGFILE" ]; then echo Using config file: $CONFIGFILE else echo "Specified config file $CONFIGFILE does not exist." exit 1 fi fi export LD_LIBRARY_PATH=. #export MALLOC_CHECK_=0 if [ "$(uname -m)" = "x86_64" ]; then screen -dmS 7d2d ./7DaysToDieServer.x86_64 -logfile 7DaysToDieServer_Data/output_log__`date +%Y-%m-%d__%H-%M-%S`.txt -quit -batchmode -nographics -dedicated $PARAMS else echo "7 Days to Die only supports 64 bit operating systems!" exit 1 fi
Now that we’ve done all that, we can finally launch the server into the background
To attach your terminal to the server
screen -r 7d2d
To detach from the screen, hit the following keys
Press ctrl +a The let go of the control button Press d
Your save game and any generated worlds can be accessed in the following location:
You now have a fully functioning 7 Days to Die server on your linux box! Any questions or comments, feel free to ask here!