Operating System CentOS

How to Install a 7 Days to Die Dedicated Server on Ubuntu 26.04 or AlmaLinux 9

Set up a 7 Days to Die dedicated server with SteamCMD on Ubuntu 26.04 LTS or AlmaLinux 9, run it as a systemd service and keep it updated.

This guide sets up a 7 Days to Die dedicated server on a 64-bit x86 VPS running Ubuntu 26.04 LTS, with the differences for Ubuntu 24.04 LTS and for AlmaLinux 9 or Rocky Linux 9 noted where they exist. At the end the server runs under its own unprivileged account as a systemd service, is reachable on the default game port, and can be updated with one command. CentOS 7 reached end of life in June 2024; on the Red Hat side, use AlmaLinux 9 or Rocky Linux 9 instead.

The dedicated server is a separate Steam application (app ID 294420) that SteamCMD downloads with an anonymous login, so you never have to type your Steam account password on the server. Players who connect still need to own the game.

Requirements

  • A 64-bit x86 server with a public IPv4 address and sudo access. The server binary is not built for ARM.
  • Enough memory for the world you plan to host. Memory use grows with world size and player count, so start with several gigabytes free and watch usage after the first sessions.
  • Several gigabytes of free disk space for the server files, plus room for saved worlds.

Step 1: Create a dedicated user

Do not run SteamCMD or the game server as root. Create an account that owns the server files. On Ubuntu:

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

On AlmaLinux 9 or Rocky Linux 9:

sudo useradd -m sdtd

Avoid a user name that starts with a digit, such as 7d2d; several tools reject it.

Step 2: Install SteamCMD

Ubuntu 26.04 and 24.04

Ubuntu packages SteamCMD in the multiverse component as a 32-bit (i386) package, so enable both before installing:

sudo add-apt-repository multiverse
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install steamcmd

The installer shows the Steam licence agreement, which you have to accept. The command is installed as /usr/games/steamcmd.

AlmaLinux 9 and Rocky Linux 9

There is no SteamCMD package in the distribution repositories. Install the 32-bit libraries it needs, then unpack Valve's archive in the service account's home directory:

sudo dnf install glibc.i686 libstdc++.i686 tar
sudo -u sdtd -H bash -c 'mkdir -p ~/steamcmd && cd ~/steamcmd && curl -sqL https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz | tar zxf -'

In the commands below, replace /usr/games/steamcmd with /home/sdtd/steamcmd/steamcmd.sh.

Step 3: Download the server files

Run SteamCMD as the sdtd user. Set the install directory before logging in, as Valve's SteamCMD documentation recommends:

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

The first run updates SteamCMD itself and then downloads the server. When it finishes with a success message, the files are in /home/sdtd/server, including startserver.sh and the sample serverconfig.xml.

Step 4: Configure the server

An update with validate restores stock files, so keep your settings in a copy with a different name:

sudo -u sdtd cp /home/sdtd/server/serverconfig.xml /home/sdtd/server/myserver.xml
sudo -u sdtd nano /home/sdtd/server/myserver.xml

Every setting is a <property name="..." value="..."/> line with a comment explaining it. Change only the text inside value="". The ones to set first:

PropertyPurpose
ServerNameName shown in the server browser.
ServerDescriptionDescription shown in the server browser.
ServerPasswordPassword players need to join; empty means open.
ServerPortGame port, 26900 by default.
ServerVisibility2 public, 1 friends only, 0 not listed.
ServerMaxPlayerCountMaximum concurrent players (8 in the sample file).
GameWorld, WorldGenSeed, GameNameWhich world to load or generate and the name of the save.
TelnetEnabled, TelnetPort, TelnetPasswordLocal admin console, port 8081 by default.

Leave TelnetPassword empty unless you need remote console access: according to the comment in the file, the console then listens only on the loopback interface. Property names change between game versions, so always start from the serverconfig.xml that came with the build you downloaded instead of an old copy.

Step 5: Open the firewall

The server listens on ServerPort over TCP and UDP and uses the next two UDP ports as well. With the default port on Ubuntu:

sudo ufw allow 26900/tcp
sudo ufw allow 26900:26902/udp

On AlmaLinux 9 or Rocky Linux 9:

sudo firewall-cmd --permanent --add-port=26900/tcp --add-port=26900-26902/udp
sudo firewall-cmd --reload

If your provider has a network firewall in the hosting control panel, allow the same ports there. Do not open the telnet port or the web dashboard port to the internet.

Step 6: Run the server as a systemd service

Create a unit file so the server starts at boot and restarts after a crash:

sudo nano /etc/systemd/system/7dtd.service
[Unit]
Description=7 Days to Die dedicated server
After=network-online.target
Wants=network-online.target

[Service]
User=sdtd
WorkingDirectory=/home/sdtd/server
ExecStart=/home/sdtd/server/startserver.sh -configfile=myserver.xml
Restart=on-failure
TimeoutStopSec=120

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now 7dtd.service

Step 7: Check that it works

systemctl status 7dtd.service
sudo ss -lntup | grep 26900

The first start takes a while, especially when a random world has to be generated. Once the port is listening, start the game on your PC, choose to join a game, and connect to the server's IP address (for example 203.0.113.10) on port 26900. A public server also appears in the server browser under the name you set.

Stopping and updating

For a clean shutdown that saves the world, use the admin console. Install a telnet client (sudo apt install telnet or sudo dnf install telnet), then:

telnet localhost 8081

Type shutdown and wait for the connection to close. Because the unit uses Restart=on-failure, a clean exit is not restarted.

Clients can only join a server running the same game version, so update the server when the game updates. Stop it, run the same SteamCMD command again and start it:

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

After a major game update, compare your myserver.xml with the new serverconfig.xml and carry over any properties that were added or renamed.

Backups

Saved games, generated worlds and the admin list are stored outside the install directory, in the service account's home (by default under /home/sdtd/.local/share/7DaysToDie). The UserDataFolder property in the configuration file overrides that location. Back that directory up while the server is stopped, together with myserver.xml.

Frequently asked questions

Do I need to log in to SteamCMD with my own Steam account?

No. The dedicated server app 294420 downloads with +login anonymous. Avoid putting a real Steam password into scripts on a server; only the players' PCs need a licensed copy of the game.

Can I use Debian instead?

Yes. Debian 13 carries the same steamcmd package for i386 in its non-free archive area, so you have to enable non-free and the i386 architecture first. The remaining steps are the same as on Ubuntu.

Players see the server but cannot connect. What should I check?

Confirm that the client and server are on the same game version and branch, that the UDP ports are open in both the host firewall and any provider-side firewall, and that the port in myserver.xml matches the rules you created.

How do I make myself an administrator?

Administrators are listed in serveradmin.xml in the save data folder, or you can add them from the telnet console. The comments in that file describe the format for the game version you are running.

Share story:

Continue reading other guides on How VPS.