Opening a Project Zomboid dedicated server (Ubuntu)
Here's how to open a Project Zomboid dedicated server for playing with friends on an Ubuntu or Debian server. The server keeps running even when your PC is off, and we'll set it up to restart automatically if it goes down.
Before you start
- Specs: 6GB or more of memory is recommended. The Zomboid server runs on Java, so it uses a lot of memory, and it uses more as players and mods increase. You'll need at least 6GB of free disk space. How to choose VPS specs (recommended specs by use case) Recommended plans are on Palworld, Valheim & Project Zomboid server hosting.
- Network: Zomboid uses 2 UDP ports (16261 and 16262). On a server whose detail page shows a service port (a KT-A private-IP server), matching the ports is a hassle, so KT-B, where you can open ports freely, is recommended. Choosing a network (zone)
- Access: You need to be connected to the server over SSH. Connecting to a Linux server with SSH (Windows, Mac)
If it's hard to do yourself, you can leave the setup to Nevv Tech Support. A server set up through tech support can be managed on the web from the game console on the server detail page — start, stop, update and back up.
1. Install SteamCMD
The Zomboid server files are downloaded with Valve's SteamCMD. SteamCMD needs 32-bit libraries.
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y curl lib32gcc-s1 lib32stdc++6
mkdir -p ~/steamcmd && cd ~/steamcmd
curl -fsSL https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz | tar -xz
2. Download the Zomboid server
The Steam app ID for the Project Zomboid dedicated server is 380870.
~/steamcmd/steamcmd.sh +force_install_dir ~/zomboid +login anonymous +app_update 380870 validate +quit
If you see Success! App '380870' fully installed., it worked.
3. Set the server's memory
The maximum memory the Zomboid server can use is the -Xmx value in ProjectZomboid64.json. Set it comfortably below the server's memory to leave room for the operating system. For example, on a server with 6GB of memory, use -Xmx4g.
sed -i 's/"-Xmx[0-9]*[mMgG]"/"-Xmx4g"/' ~/zomboid/ProjectZomboid64.json
grep -o '"-Xmx[^"]*"' ~/zomboid/ProjectZomboid64.json
4. Set it to start automatically (systemd)
Replace change-me in the command below with an admin password (letters and numbers recommended), then run it. nevv is the server name and becomes the name of the settings file.
sudo tee /etc/systemd/system/zomboid.service > /dev/null <<EOF
[Unit]
Description=Project Zomboid server
After=network-online.target
Wants=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/zomboid
ExecStart=$HOME/zomboid/start-server.sh -servername nevv -adminpassword change-me
Restart=always
RestartSec=10
KillSignal=SIGINT
TimeoutStopSec=90
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now zomboid
Check that it's running. The first start takes a few minutes while it creates the world (leave the journalctl screen with Ctrl + C).
systemctl status zomboid
journalctl -u zomboid -f
On the first start, a settings file named after the server (nevv.ini) is created in the ~/Zomboid/Server/ folder, and the world is saved in ~/Zomboid/Saves/.
5. Connect
Zomboid uses UDP ports 16261 and 16262. If you've turned on the firewall (ufw), open them. (Opening firewall ports)
sudo ufw allow 16261:16262/udp
When you add a server on the game's Join screen, enter the values below.
IP: ip-address
Port: 16261
In the username and password fields, enter the account you'll use on this server. To join as an admin, connect with the username admin and the admin password you set in step 4.
6. Change settings — after stopping it
Settings are in ~/Zomboid/Server/nevv.ini. Stop the server, edit the file, then start it again.
sudo systemctl stop zomboid
nano ~/Zomboid/Server/nevv.ini
sudo systemctl start zomboid
| Setting | Description |
|---|---|
PublicName | The name shown in the server list |
Password | Join password (if left empty, anyone can join) |
MaxPlayers | Maximum number of players |
Public | If true, the server appears in the in-game public server list |
7. Update
If players can't connect after the game updates, update the server too.
sudo systemctl stop zomboid
~/steamcmd/steamcmd.sh +force_install_dir ~/zomboid +login anonymous +app_update 380870 validate +quit
sudo systemctl start zomboid
Updating (validate) may reset the -Xmx value from step 3 to its default. Run the step 3 commands again to check.
8. Back up the world
The world and settings are in the ~/Zomboid folder. It's safest to compress them while the server is stopped.
sudo systemctl stop zomboid
tar -czf ~/zomboid-backup-$(date +%Y%m%d-%H%M).tar.gz -C ~ Zomboid/Saves Zomboid/Server
sudo systemctl start zomboid
To download the archive to your PC, see Uploading and downloading files on your server; to back up automatically every day, see Backing up your server data.
Common problems
| Symptom | What to check |
|---|---|
| The server starts and then shuts down | Not enough memory — check with free -h and set -Xmx from step 3 below the server's memory |
| Can't connect | Whether you opened 16261 and 16262 for UDP in the firewall, and whether the port field is 16261 |
| Changed settings don't take effect | Whether you edited it while it was running — stop it first, then edit, as in step 6 |
| Lags badly as more players join | Check memory and CPU usage — Checking a slow server |