7 Days to Die is a zombie survival game from The Fun Pimps that combines scavenging, crafting and base defense. Its dedicated server runs natively on Linux and keeps the world online for your group around the clock.

In this tutorial you will install the 7 Days to Die dedicated server on Ubuntu 24.04 with SteamCMD, configure it through serverconfig.xml, choose between the Navezgane map and a random world, run it as a systemd service under its own user, and use the local telnet console to add admins and save the world.

Prerequisites

To follow this tutorial, you will need:

  • A server running Ubuntu 24.04, for example a CubePath VPS. Plan for at least 4 vCPUs and 12 GB of RAM for up to 8 players; random worlds of 8K size and larger groups need 16 GB or more.
  • At least 40 GB of free disk space for the server files, generated worlds and saves.
  • A non-root user with sudo privileges and UFW enabled.
  • 7 Days to Die on Steam to connect to the server.

Step 1 - Installing SteamCMD

SteamCMD is Valve's command-line client for downloading dedicated servers. Ubuntu ships it in the multiverse repository, and it needs 32-bit libraries, so enable both:

sudo dpkg --add-architecture i386
sudo add-apt-repository -y multiverse
sudo apt update

Install SteamCMD and the telnet client, which you will use later to reach the server console:

sudo apt install -y steamcmd telnet

During the installation you are asked to accept the Steam license. Use the arrow keys and Enter to accept it. The binary is installed as /usr/games/steamcmd.

Step 2 - Creating a dedicated user

Run the server under an unprivileged account without a password. You access it from your admin user with sudo:

sudo adduser --disabled-password --gecos "" sdtd
sudo -iu sdtd
whoami
sdtd

Step 3 - Downloading the server

As the sdtd user, download the dedicated server (Steam app ID 294420) into ~/server:

/usr/games/steamcmd +force_install_dir /home/sdtd/server +login anonymous +app_update 294420 validate +quit

The download is about 15 GB. When it finishes you should see:

Success! App '294420' fully installed.

Check that the server binary exists:

ls -l ~/server/7DaysToDieServer.x86_64

Step 4 - Configuring serverconfig.xml

The server ships with a commented serverconfig.xml. Updates overwrite that file, so copy it outside the installation directory and edit the copy:

cp ~/server/serverconfig.xml ~/serverconfig.xml
nano ~/serverconfig.xml

Each setting is a <property name="..." value="..."/> line. Change the values of these properties and leave the others as they are:

<property name="ServerName"             value="Your Server Name"/>
<property name="ServerDescription"      value="Your server description"/>
<property name="ServerPassword"         value="your_server_password"/>
<property name="ServerVisibility"       value="2"/>
<property name="ServerPort"             value="26900"/>
<property name="ServerMaxPlayerCount"   value="8"/>

<property name="GameWorld"              value="RWG"/>
<property name="WorldGenSeed"           value="your_seed"/>
<property name="WorldGenSize"           value="6144"/>
<property name="GameName"               value="MyGame"/>
<property name="GameDifficulty"         value="2"/>

<property name="TelnetEnabled"          value="true"/>
<property name="TelnetPort"             value="8081"/>
<property name="TelnetPassword"         value=""/>
<property name="WebDashboardEnabled"    value="false"/>

What these settings do:

  • ServerVisibility 2 lists the server publicly, 1 shows it only to friends, 0 hides it. Leave ServerPassword empty for an open server.
  • GameWorld is either Navezgane (the handcrafted map) or RWG for a random world built from WorldGenSeed and WorldGenSize. Sizes are multiples of 1024; 6144 is a good balance, while 8192 and above take much longer to generate and need more RAM.
  • GameName is the name of the save. Changing it starts a new game on the same world.
  • GameDifficulty goes from 0 (easiest) to 5 (hardest).
  • With TelnetPassword left empty, the telnet console only listens on the local loopback interface, so it can be reached from the server itself and not from the Internet. Keep it that way.
  • The web dashboard is disabled; if you enable it, do not expose its port publicly.

The file also contains gameplay options such as day length, blood moon frequency, loot abundance and land claim rules, each described by the comment next to it.

Type exit to return to your admin user.

Step 5 - Opening the firewall ports

7 Days to Die uses the base port over TCP and UDP plus the next three UDP ports:

sudo ufw allow 26900/tcp
sudo ufw allow 26900:26903/udp
sudo ufw status

Do not open the telnet port (8081). It is only needed locally.

Step 6 - Creating the systemd service

A systemd unit starts the server at boot, restarts it after a crash and sends its output to the journal. Create the unit file:

sudo nano /etc/systemd/system/sdtd.service

Paste the following:

[Unit]
Description=7 Days to Die dedicated server
Wants=network-online.target
After=network-online.target

[Service]
Type=simple
User=sdtd
Group=sdtd
WorkingDirectory=/home/sdtd/server
Environment=LD_LIBRARY_PATH=/home/sdtd/server
ExecStart=/home/sdtd/server/7DaysToDieServer.x86_64 -logfile /dev/stdout -quit -batchmode -nographics -dedicated -configfile=/home/sdtd/serverconfig.xml
Restart=on-failure
RestartSec=30
TimeoutStopSec=120

[Install]
WantedBy=multi-user.target

These are the same arguments the bundled startserver.sh uses, except that the log goes to standard output so journald captures it, and the configuration is read from your copy in the home directory.

Reload systemd and start the server:

sudo systemctl daemon-reload
sudo systemctl enable --now sdtd

With GameWorld set to RWG, the first start generates the world, which can take 10 to 30 minutes depending on the size and CPU. Follow the log:

sudo journalctl -u sdtd -f

The world is loaded when the log stops reporting generation progress and the server announces it is listening for players. Press Ctrl+c to stop following the log, then check that the game port is open:

sudo ss -tulnp | grep 26900

Both a tcp and a udp line for port 26900 should appear, owned by the 7DaysToDieServe process.

To join, open 7 Days to Die, choose Join a Game, and either find your server in the list or use Connect to IP with your_server_ip and port 26900.

Generated worlds are stored in ~/.local/share/7DaysToDie/GeneratedWorlds/ and saves in ~/.local/share/7DaysToDie/Saves/ inside the sdtd user's home directory.

Step 7 - Using the telnet console

The telnet console gives you the full server command line while the server runs as a service. Connect from the server:

telnet 127.0.0.1 8081

You see the server's welcome text and live log. Useful commands:

CommandWhat it does
helpList all commands
lpList connected players with their IDs
say "message"Send a message to all players
admin add player_name 0Make an online player an admin with permission level 0 (full access)
kick player_name "reason"Kick a player
ban add player_name 7 days "reason"Ban a player for a period
saveworldSave the world immediately
shutdownSave and stop the server cleanly

To leave telnet without stopping the server, type exit.

Admins added this way are stored in serveradmin.xml in the saves directory, so they survive restarts. Once you are an admin, you can also run these commands from the in-game console (F1).

Before a planned stop, run saveworld from telnet. The server autosaves regularly, but saving first guarantees nothing since the last autosave is lost. If you stop through telnet with shutdown, systemd sees a clean exit and does not restart the server; start it again with sudo systemctl start sdtd.

Step 8 - Backing up the saves

Everything that makes your server unique lives in ~/.local/share/7DaysToDie/ (saves, generated worlds and serveradmin.xml) and in ~/serverconfig.xml. Back them up daily with a cron job in the sdtd user's crontab:

sudo -u sdtd mkdir -p /home/sdtd/backups
sudo -u sdtd crontab -e

Add these lines, which create an archive at 05:00 and delete archives older than 7 days:

0 5 * * * tar -czf /home/sdtd/backups/sdtd-$(date +\%F).tar.gz -C /home/sdtd .local/share/7DaysToDie serverconfig.xml 2>/dev/null
30 5 * * * find /home/sdtd/backups -name 'sdtd-*.tar.gz' -mtime +7 -delete

The % is escaped because cron treats a bare % as a newline. Archives of generated worlds are large, so watch disk usage with du -sh /home/sdtd/backups and copy the archives to another server or to object storage.

Updating the server

Clients must run the same version as the server. To update, save the world from telnet, then:

sudo systemctl stop sdtd
sudo -u sdtd /usr/games/steamcmd +force_install_dir /home/sdtd/server +login anonymous +app_update 294420 validate +quit
sudo systemctl start sdtd

Your configuration is safe because it lives outside the installation directory. After a major version (for example, a new alpha or 2.x release), compare your serverconfig.xml with the new one in ~/server/ to pick up new properties, and expect to start a new game: saves from an older major version are often not compatible.

Troubleshooting

The server stops during world generation. Check sudo journalctl -k | grep -i "out of memory". Reduce WorldGenSize or move to a plan with more RAM.

The service fails immediately. Read sudo journalctl -u sdtd -n 50. An XML error means serverconfig.xml has a broken line; check that every property ends with /> and that quotes are balanced.

Players cannot see the server in the list. Public listing can take a few minutes. Test with Connect to IP first, and check that UFW allows 26900/tcp and 26900:26903/udp.

Telnet says "Connection refused". The server is still starting, or TelnetEnabled is false. Wait for the world to load and check the setting.

Conclusion

You now have a 7 Days to Die dedicated server running on Ubuntu 24.04 as a systemd service, configured through a copy of serverconfig.xml that survives updates, with a local telnet console for administration and daily backups.

As next steps, tune the blood moon and loot settings for your group, try a different WorldGenSeed for your next game, and copy your backups off the server.