Project Zomboid is an open-world zombie survival game, and its multiplayer is best on a dedicated server: the world persists, players come and go, and your group’s base stays intact. The server is Java-based, runs natively on Linux, and is quite configurable, including Steam Workshop mods.
Requirements
- 2–4 vCPU and 4–8 GB RAM for a small group. Many players, a large explored area and lots of mods need 8–16 GB.
- UDP ports 16261 and 16262.
- A server near your players. See game server VPS.
Install with SteamCMD
sudo dpkg --add-architecture i386
sudo apt update && sudo apt install -y steamcmd lib32gcc-s1
sudo adduser --disabled-password --gecos "" pzserver
sudo -iu pzserver
/usr/games/steamcmd +force_install_dir ~/pz +login anonymous +app_update 380870 validate +quit
The dedicated server’s app ID is 380870. Use -beta unstable if your group plays the unstable branch. Server and clients must match.
First start: set the admin password
cd ~/pz
./start-server.sh -servername myserver
On the very first run, the server asks you to set a password for the built-in admin account. Then it creates the config files in ~/Zomboid/Server/:
myserver.ini: server settings (name, password, PvP, mods, ports);myserver_SandboxVars.lua: world and gameplay settings (zombie count, loot, day length);myserver_spawnregions.lua: spawn points.
Stop the server with quit in its console (this saves the world).
Memory (Java heap)
Set the RAM limit in ~/pz/ProjectZomboid64.json:
"vmArgs": [
"-Xms4g",
"-Xmx6g",
...
]
Set -Xmx to the RAM you can give the server, leaving 1–2 GB for the operating system. Too little heap causes lag spikes and crashes with large maps or mods. See how much RAM a VPS needs.
Key settings in myserver.ini
PublicName=Our Zomboid Server
Public=false
Password=secret-pass
MaxPlayers=8
PVP=false
PauseEmpty=true
DefaultPort=16261
UDPPort=16262
SaveWorldEveryMinutes=15
WorkshopItems=
Mods=
Change sandbox settings (zombie population, loot rarity, XP multiplier) in myserver_SandboxVars.lua, ideally before the world is created.
Workshop mods
Each mod needs both a Workshop ID and a Mod ID (listed on the mod’s Workshop page):
WorkshopItems=2169435993;2392709985
Mods=modoptions;tsarslib
The server downloads Workshop items on start, and clients download them when joining. Keep the order consistent, and check that mods support your game version.
Run it as a service
Use systemd with ExecStartPre running the SteamCMD update, or run it in tmux so you can type console commands. For clean shutdowns, send quit, for example via RCON (RCONPort and RCONPassword in the ini file). See systemd unit files and tmux.
Firewall
sudo ufw allow 16261:16262/udp
# RCON (27015/tcp by default): restrict to your IP, don't open publicly
See UFW.
Admin commands
Log in as admin (with the password from the first start), or grant access level to your account:
/setaccesslevel "PlayerName" admin
/save
/servermsg "Restart in 5 minutes"
/kickuser "PlayerName"
/banuser "PlayerName"
/quit
Backups
World saves are in ~/Zomboid/Saves/Multiplayer/myserver/, and player databases and config in ~/Zomboid/db/ and ~/Zomboid/Server/:
tar czf /backups/pz-$(date +%F-%H%M).tgz -C /home/pzserver Zomboid
The server also keeps its own backups on startup in ~/Zomboid/backups/, but keep copies off the server too. See backup strategy.
Troubleshooting
- “Server version mismatch”: the server and clients are on different branches. Check
-betain your SteamCMD command. - Workshop mods fail to load: a Workshop ID or Mod ID is missing or misspelled, or a mod was updated. Restart the server so it downloads the latest versions.
- Lag spikes: usually Java heap or CPU. Raise
-Xmxif RAM allows, and checkhtopduring play. See htop. - Players can’t connect: both UDP 16261 and 16262 must be open. Check with
ss -ulpn. See ss and netstat.
Quick reference
| Item | Value |
|---|---|
| SteamCMD app ID | 380870 |
| Ports | 16261/udp, 16262/udp |
| Start | ./start-server.sh -servername myserver |
| Config | ~/Zomboid/Server/myserver.ini + _SandboxVars.lua |
| RAM | -Xmx in ProjectZomboid64.json |
Related: 7 Days to Die server and Valheim dedicated server.