How to Create a 7 Days to Die Server
Complete guide to installing a dedicated 7 Days to Die server on a VPS or dedicated Linux server: SteamCMD, serverconfig.xml, systemd service, administration, mods and backups.
On this page
Your values
Enter them once and the commands in this guide update.
This guide explains how to install a dedicated 7 Days to Die server on your VPS or dedicated Linux server, configure it with serverconfig.xml, run it as a systemd service under a dedicated user, then administer it and back it up.
The server has a native Linux version, distributed free of charge through Steam under application ID 294420.
Order a Server
To host your 7 Days to Die server, HostMyServers offers several suitable options:
- Performance VPS - Dedicated resources and fast processors, suitable for most servers
- NVMe VPS - For a small server with friends or a test server
- Eco Dedicated Servers - For large maps and busy servers
- Performance Dedicated Servers - Maximum performance, modded servers
Prerequisites
- SSH access as root or user with sudo privileges
- 64-bit Linux system: Debian 12/13 or Ubuntu 22.04/24.04
- Active firewall: nftables, iptables or ufw (use only one tool at a time)
- A Steam account that owns the game, to connect to the server (downloading the server itself does not require an account)
Required Configuration
| Component | Minimum | Recommended |
|---|---|---|
| RAM | 8 GB | 16 GB and more |
| CPU | 2 fast cores | 4 cores or more, high frequency |
| Storage | 40 GB SSD | 80 GB NVMe SSD |
The server files alone take up about 18 GB. The rest of the space is used for generated worlds, backups and mods.
Ports Used
| Port | Protocol | Usage | Exposure |
|---|---|---|---|
| 26900 | TCP | Game | Public |
| 26900 to 26903 | UDP | Game | Public |
| 8081 | TCP | Telnet (administration console) | Local only |
| 8080 | TCP | Web dashboard, disabled by default | Closed, or restricted to your IP |
If you change ServerPort, the game ports shift by the same amount.
System Update
sudo apt update && sudo apt upgrade -yInstalling Dependencies
SteamCMD needs 32-bit libraries. The other packages are used for downloading, checking the configuration, the Telnet console and scheduled backups:
sudo apt install -y lib32gcc-s1 curl tar ca-certificates nano cron telnet libxml2-utilsCreating a Dedicated User
The server must never run as root. Create a user reserved for it:
sudo useradd --create-home --shell /bin/bash sevendaysFirewall Configuration
Open only the game ports. Telnet port 8081 stays closed: the console can only be reached from the server itself.
With UFW
sudo ufw allow 26900/tcp
sudo ufw allow 26900:26903/udp
sudo ufw reloadWith iptables
sudo apt install -y iptables-persistent
sudo iptables -A INPUT -p tcp --dport 26900 -j ACCEPT
sudo iptables -A INPUT -p udp --dport 26900:26903 -j ACCEPT
sudo iptables-save | sudo tee /etc/iptables/rules.v4Saving the rules across reboots requires the iptables-persistent package.
With nftables
These commands enable nftables, then use the inet filter table and the input chain from the /etc/nftables.conf file shipped with the package, on both Debian and Ubuntu.
sudo apt install -y nftables
sudo systemctl enable --now nftables
sudo nft add rule inet filter input tcp dport 26900 accept
sudo nft add rule inet filter input udp dport 26900-26903 accept
(echo "flush ruleset"; sudo nft list ruleset) | sudo tee /etc/nftables.confInstalling SteamCMD
Open a session as the dedicated user, then download SteamCMD:
sudo -iu sevendays
mkdir -p ~/steamcmd ~/7dtd-server ~/7dtd-data
cd ~/steamcmd
curl -fsSL https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz | tar -xzf -Downloading the Server
Still as the sevendays user:
~/steamcmd/steamcmd.sh +force_install_dir /home/sevendays/7dtd-server +login anonymous +app_update 294420 validate +quitWhen it finishes, the message Success! App '294420' fully installed. is displayed. If the download is interrupted, run the same command again: SteamCMD resumes where it left off.
Server Configuration
Create Your Configuration File
An update can overwrite serverconfig.xml, so work on a copy that Steam will leave alone:
cd ~/7dtd-server
cp serverconfig.xml serverconfig.custom.xml
nano serverconfig.custom.xmlSettings to Change
Find each property in the file and change only its value:
<property name="ServerName" value="My 7 Days to Die Server"/>
<property name="ServerDescription" value="Welcome to my server"/>
<property name="ServerPassword" value="PlayerPassword"/>
<property name="ServerPort" value="26900"/>
<property name="ServerVisibility" value="2"/>
<property name="ServerMaxPlayerCount" value="8"/>
<property name="GameWorld" value="Navezgane"/>
<property name="GameName" value="MyGame"/>
<property name="WebDashboardEnabled" value="false"/>
<property name="TelnetEnabled" value="true"/>
<property name="TelnetPort" value="8081"/>
<property name="TelnetPassword" value=""/>
<property name="EACEnabled" value="true"/>The UserDataFolder property is commented out in the original file. Replace the entire commented line with this one, to keep worlds, saves and mods in a single folder:
<property name="UserDataFolder" value="/home/sevendays/7dtd-data"/>| Parameter | Description |
|---|---|
ServerName |
Name displayed in the server list |
ServerPassword |
Password to join the server (empty = open access) |
ServerPort |
Game port |
ServerVisibility |
2 = public, 1 = friends only, 0 = unlisted |
ServerMaxPlayerCount |
Maximum number of simultaneous players |
GameWorld |
Navezgane, a bundled world such as Pregen06k01, or RWG for a generated world |
WorldGenSeed |
World seed when GameWorld is set to RWG |
WorldGenSize |
Size of the RWG world: 6144, 8192 or 10240 |
GameName |
Game name, used for the save folder |
SandboxCode |
Code that bundles the difficulty and gameplay settings |
TelnetPassword |
When left empty, Telnet listens on the local interface only |
EACEnabled |
Enables EasyAntiCheat |
UserDataFolder |
Server data folder |
Set the Difficulty with SandboxCode
Since version 3.0, many settings have moved out of serverconfig.xml: GameDifficulty, XPMultiplier, DayNightLength, BloodMoonFrequency, LootAbundance and others. They are now grouped in the SandboxCode property, so do not add these old properties, even if you find them in an old file.
To get your code:
- Launch the game and open the new game creation screen.
- Open the Sandbox options and adjust them.
- Copy the code with the button provided for this purpose.
- Paste it into the file:
<property name="SandboxCode" value="AAAJABJACJADJARFBNC"/>The value above is the default code, which corresponds to the Adventurer difficulty.
Check the File
An improperly closed tag prevents the server from reading its configuration. Check the file:
xmllint --noout ~/7dtd-server/serverconfig.custom.xml && echo "Configuration is valid"Clean Shutdown Script
To make sure the world is saved every time the server stops, the service sends the saveworld then shutdown commands to the local console. Still as the sevendays user, create the script:
nano ~/stop.sh#!/bin/bash
# Save the world and stop the server through the local Telnet console.
(
exec 3<>/dev/tcp/127.0.0.1/8081 || exit 1
printf 'saveworld\r\n' >&3
sleep 10
printf 'shutdown\r\n' >&3
sleep 2
) 2>/dev/null || exit 0
# Wait for the server to actually exit before handing control back to systemd.
while kill -0 "$1" 2>/dev/null; do
sleep 2
doneMake it executable and exit the session:
chmod +x ~/stop.sh
exitConfiguration as a systemd Service
Create the Service File
sudo nano /etc/systemd/system/7dtd.service[Unit]
Description=7 Days to Die Dedicated Server
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
User=sevendays
Group=sevendays
WorkingDirectory=/home/sevendays/7dtd-server
ExecStart=/bin/sh /home/sevendays/7dtd-server/startserver.sh -configfile=serverconfig.custom.xml
ExecStop=/home/sevendays/stop.sh $MAINPID
TimeoutStopSec=180
Restart=on-failure
RestartSec=30
LimitNOFILE=100000
[Install]
WantedBy=multi-user.targetEnable and Start the Service
sudo systemctl daemon-reload
sudo systemctl enable --now 7dtd.serviceManagement Commands
# Check status
sudo systemctl status 7dtd.service
# Stop the server cleanly
sudo systemctl stop 7dtd.service
# Restart the server
sudo systemctl restart 7dtd.serviceFollow the Startup
The launch script writes one timestamped log per startup. To follow the most recent one:
sudo -u sevendays bash -c 'tail -f "$(ls -t /home/sevendays/7dtd-server/7DaysToDieServer_Data/output_log__*.txt | head -1)"'Startup takes several minutes. Then check that the server is listening on its ports:
sudo ss -tulpn | grep -E ':(26900|26901|26902|26903|8081)\b'Connecting to the Server
- Launch 7 Days to Die, using the same version as the server.
- Open Join a Game.
- Find your server in the list, or use Connect to IP with the address
SERVER_IPand port26900. - Enter the password set in
ServerPassword.
Labels may vary slightly depending on the game's language and version.
Administration
Open the Console
Connect to the server over SSH, then open the local console:
telnet 127.0.0.1 8081To leave Telnet without stopping the server, press Ctrl+], then type quit.
Give Yourself Administrator Rights
The serveradmin.xml file is created on first startup in /home/sevendays/7dtd-data/Saves/. The simplest approach is to use the console rather than edit it by hand:
- Join the server with your character.
- In the Telnet console, display the IDs of connected players:
lpi- Give yourself the highest permission level,
0:
admin add PlayerName 0Levels range from 0 (full rights) to 1000 (no rights). Once you are an administrator, you can open the in-game console with F1.
Useful Commands
| Command | Description |
|---|---|
help |
Lists the commands available on your version |
listplayers or lp |
Shows connected players |
listplayerids or lpi |
Shows players and their IDs |
say "message" |
Sends a message to all players |
kick PlayerName "reason" |
Kicks a player |
ban add PlayerName 1 days "reason" |
Bans a player for a given duration |
ban remove <id> |
Lifts a ban |
whitelist add PlayerName |
Adds a player to the whitelist |
admin add PlayerName 0 |
Makes a player an administrator |
admin remove PlayerName |
Removes an administrator |
saveworld or sa |
Saves the world |
shutdown |
Saves and stops the server |
Web Dashboard
The dashboard is disabled by default, which is the safest setting. If you enable it with WebDashboardEnabled, do not open port 8080 to everyone. Preferably, go through an SSH tunnel from your computer:
ssh -L 8080:127.0.0.1:8080 YOUR_USER@SERVER_IPThe dashboard is then available at http://127.0.0.1:8080. If you have a fixed IP address, you can restrict the port to that address instead:
# UFW
sudo ufw allow from YOUR_IP to any port 8080 proto tcp
# iptables
sudo iptables -A INPUT -p tcp -s YOUR_IP --dport 8080 -j ACCEPT
# nftables
sudo nft add rule inet filter input ip saddr YOUR_IP tcp dport 8080 acceptInstalling Mods
With UserDataFolder set, mods go in /home/sevendays/7dtd-data/Mods/. Each mod has its own folder, which contains a ModInfo.xml file.
sudo systemctl stop 7dtd.service
sudo -iu sevendays
mkdir -p ~/7dtd-data/Mods
# Copy the mod folder here, for example with scp or unzip
exit
sudo systemctl start 7dtd.serviceThen check that the mod appears with the version command in the console.
Since version 3.0, some mods written for older versions no longer work. Check compatibility before any update.
Server Update
Players and the server must use the same game version. Back up before every update, because a major version change can make a save incompatible. The backup.sh script is described in the next section.
sudo systemctl stop 7dtd.service
sudo -u sevendays /home/sevendays/backup.sh
sudo -iu sevendays
~/steamcmd/steamcmd.sh +force_install_dir /home/sevendays/7dtd-server +login anonymous +app_update 294420 validate +quitThen compare your configuration with the newly supplied file, to spot added or removed properties:
diff ~/7dtd-server/serverconfig.xml ~/7dtd-server/serverconfig.custom.xml
exit
sudo systemctl start 7dtd.serviceAutomatic Backup
Backup Script
sudo -u sevendays nano /home/sevendays/backup.sh#!/bin/bash
BACKUP_DIR="/home/sevendays/backups"
DATE=$(date +%Y-%m-%d_%H-%M-%S)
ARCHIVE="$BACKUP_DIR/7dtd_$DATE.tar.gz"
umask 077
mkdir -p "$BACKUP_DIR"
# If the server is running, save the world before archiving
(
exec 3<>/dev/tcp/127.0.0.1/8081 || exit 1
printf 'saveworld\r\n' >&3
sleep 15
) 2>/dev/null
tar -czf "$ARCHIVE" -C /home/sevendays 7dtd-data 7dtd-server/serverconfig.custom.xml
STATUS=$?
# Exit code 1 only means a file changed while it was being read
if [ "$STATUS" -gt 1 ]; then
rm -f "$ARCHIVE"
echo "Backup failed" >&2
exit "$STATUS"
fi
# Delete backups older than 7 days
find "$BACKUP_DIR" -name "7dtd_*.tar.gz" -mtime +7 -delete
echo "Backup completed: $ARCHIVE"sudo chmod +x /home/sevendays/backup.shSchedule the Backup
sudo crontab -u sevendays -eAdd:
# Backup every 6 hours
0 */6 * * * /home/sevendays/backup.shAlso keep a copy on another machine: a backup stored on the same disk does not protect you if that disk fails.
Restore a Backup
Replace the archive name with the name of the backup you want to restore:
sudo systemctl stop 7dtd.service
sudo -iu sevendays
mv ~/7dtd-data ~/7dtd-data.old
tar -xzf ~/backups/7dtd_2026-01-01_12-00-00.tar.gz -C ~
exit
sudo systemctl start 7dtd.serviceOnce you have checked the result in-game, you can delete ~/7dtd-data.old.
Troubleshooting
Service won't start
- Check the service status:
sudo journalctl -u 7dtd.service -n 100 - Check the latest
output_log__*.txtfile in7DaysToDieServer_Data/ - Validate the configuration:
xmllint --noout /home/sevendays/7dtd-server/serverconfig.custom.xml - Check disk space and memory:
df -handfree -h - Check that the files belong to the user:
sudo chown -R sevendays:sevendays /home/sevendays
Unable to determine CPU Frequency
If SteamCMD displays Unable to determine CPU Frequency. Try defining CPU_MHZ., set the variable before running the command again:
export CPU_MHZ=2000Error! App '294420' state is 0x202 after update job
This error is usually caused by a lack of disk space or incorrect permissions. Check df -h, fix the file ownership with the chown command above, then run SteamCMD again.
steamclient.so Error
If the logs report steamclient.so, create the link to SteamCMD's file:
sudo -iu sevendays
mkdir -p ~/.steam/sdk64
ln -sf ~/steamcmd/linux64/steamclient.so ~/.steam/sdk64/steamclient.so
exit
sudo systemctl restart 7dtd.servicePlayers can't connect
- Wait for startup to finish, especially when a world is being generated
- Check that the server is listening with the
sscommand shown above - Check the firewall: 26900 on TCP and 26900 to 26903 on UDP
- Check that the player is using the same game version as the server
- If you use mods, check the
EACEnabledvalue and the mod's instructions
Server doesn't appear in the list
- Check that
ServerVisibilityis set to2 - Wait a few minutes after startup
- Try connecting directly with Connect to IP to tell a list problem from a network problem
Telnet console refuses the connection
- The server may still be starting up
- Check that
TelnetEnabledis set totrueandTelnetPortto8081 - Run
telnetfrom the server itself, not from your computer
Server stops or slows down
- Look for a lack of memory:
sudo journalctl -k | grep -i "out of memory" - Reduce
ServerMaxPlayerCountandMaxSpawnedZombies - Choose a smaller world
- Remove the heaviest mods
- If the problem persists, upgrade to a plan with more RAM