EN

Game servers

How to Create a Project Zomboid Server

Complete guide to create a dedicated Project Zomboid server on a VPS or dedicated Linux server: installation with SteamCMD, memory, admin account, Workshop mods, systemd service and backups.

10 min read, updated on 18 November 2026

On this page

Your values

Enter them once and the commands in this guide update.

This guide explains how to install a dedicated Project Zomboid server on your VPS or dedicated Linux server, adjust its memory, administer players and add mods from the Steam Workshop. The Indie Stone, the game's studio, provides a native Linux version of the server, with its own Java runtime.

Order a Server

To host your Project Zomboid server, HostMyServers offers several suitable options:

Prerequisites

  • SSH access as root or user with sudo privileges
  • 64-bit x86_64 Linux system (Debian 12/13 or Ubuntu 22.04/24.04)
  • Active firewall: nftables, iptables or ufw (use only one tool at a time)
  • About 20 GB of free disk space (NVMe SSD recommended)
  • Ports 16261 and 16262 UDP accessible
  • The Project Zomboid game on Steam, in the same version as the server

Required Configuration

The Indie Stone does not publish minimum requirements for the server. The values below are guidelines for a game without mods: mods, the size of the explored map and the number of zombies increase consumption.

Players CPU -Xmx value Server RAM
1 to 4 2 fast cores 4g 8 GB
5 to 10 4 fast cores 6g 12 GB
11 to 20 4 fast cores 8g 16 GB
21 to 32 6 cores or more 12g 24 GB

The server takes up about 7 GB on disk, not counting mods and backups.

System Update

Terminal
sudo apt update && sudo apt upgrade -y

Installing Dependencies

Java comes with the server, so there is no need to install it. lib32gcc-s1 is required by SteamCMD:

Terminal
sudo apt install -y curl tar ca-certificates lib32gcc-s1 libstdc++6

Creating a Dedicated User

The server must never run as root. Create a dedicated user:

Terminal
sudo adduser --disabled-password --gecos "" zomboid

Ports Used

Port Protocol Parameter Usage Access
16261 UDP DefaultPort Game Public
16262 UDP UDPPort Game Public
27015 TCP RCONPort RCON, disabled by default Your IP address only, if you enable it

RCON only starts if RCONPassword is set. If you do not need it, leave it empty and do not open port 27015.

Firewall Configuration

With UFW

Terminal
sudo ufw allow 16261/udp
sudo ufw allow 16262/udp
sudo ufw reload

With iptables

Terminal
sudo iptables -A INPUT -p udp --dport 16261 -j ACCEPT
sudo iptables -A INPUT -p udp --dport 16262 -j ACCEPT
sudo iptables-save | sudo tee /etc/iptables/rules.v4

Saving the rules across reboots requires the iptables-persistent package.

With nftables

These commands use the inet filter table and the input chain, present by default in /etc/nftables.conf on Debian.

Terminal
sudo nft add rule inet filter input udp dport 16261 accept
sudo nft add rule inet filter input udp dport 16262 accept
(echo "flush ruleset"; sudo nft list ruleset) | sudo tee /etc/nftables.conf

Installing SteamCMD

Log in as the zomboid user and prepare the folders:

Terminal
sudo -iu zomboid
mkdir -p ~/steamcmd ~/pz-server
cd ~/steamcmd
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar -xzf -

Downloading the Server

An update can replace the file containing the memory setting. This script installs the server (application ID 380870) and reapplies your value each time:

Terminal
nano ~/update-server.sh
Terminal
#!/bin/bash
set -euo pipefail

# Maximum Java memory: adjust this value
XMX="6g"

"$HOME/steamcmd/steamcmd.sh" +force_install_dir /home/zomboid/pz-server +login anonymous +app_update 380870 validate +quit
sed -i "s/-Xmx[0-9]*[gGmM]/-Xmx$XMX/" /home/zomboid/pz-server/ProjectZomboid64.json
grep -- '-Xmx' /home/zomboid/pz-server/ProjectZomboid64.json
Terminal
chmod +x ~/update-server.sh
~/update-server.sh

If SteamCMD stops with an error, run the script again.

Memory Settings

Java's maximum memory is set with -Xmx in ProjectZomboid64.json. The provided file uses -Xmx8g, and the script above replaces it with the value of XMX.

Leave at least 2 GB of RAM for the system and the rest of Java: on an 8 GB machine, do not exceed -Xmx6g, and allow less if other services are running on it.

To change the value, stop the server, edit XMX in /home/zomboid/update-server.sh, run this script again as the zomboid user, then restart the server.

First Launch

The first launch creates the admin account and the configuration files. It must be done in your session, because the server asks for a password. Still as the zomboid user:

Terminal
~/pz-server/start-server.sh -servername servertest

Choose the administrator password when these messages appear:

Text
Enter new administrator password:
Confirm the password:

Wait for the message *** SERVER STARTED ****, then type this command in the console to save and stop the server:

Text
quit

Then exit the zomboid user's session:

Terminal
exit

Server Configuration

The settings are located in /home/zomboid/Zomboid/Server/. The file names depend on -servername, here servertest:

File Content
servertest.ini Server settings
servertest_SandboxVars.lua Game rules (zombies, loot, day length)
servertest_spawnregions.lua Spawn zones

With the server stopped, edit the settings:

Terminal
sudo -u zomboid nano /home/zomboid/Zomboid/Server/servertest.ini
Parameter Description Default value
PublicName Server name My PZ Server
PublicDescription Server description empty
Public Shows the server in the in-game list false
Password Password required to join empty
Open Allows joining without an existing account true
MaxPlayers Maximum number of players 32
PauseEmpty Stops time when nobody is connected true
DefaultPort First game port 16261
UDPPort Second game port 16262
UPnP Tries to open the ports on a home router, unnecessary on a server true
RCONPort RCON port 27015
RCONPassword RCON password, empty to disable it empty

Here is an example of values to change:

Configuration
PublicName=My Project Zomboid Server
Password=ChangeThisPassword
MaxPlayers=16
UPnP=false

Configuration as systemd Service

The server shuts down cleanly with the quit command, sent to its standard input. A command channel, /run/zomboid.control, lets systemd and you talk to it.

Create the Command Channel

Terminal
sudo nano /etc/systemd/system/zomboid.socket
Configuration
[Unit]
BindsTo=zomboid.service

[Socket]
ListenFIFO=/run/zomboid.control
FileDescriptorName=control
RemoveOnStop=true
SocketMode=0660
SocketUser=zomboid
SocketGroup=zomboid

Create Service File

Terminal
sudo nano /etc/systemd/system/zomboid.service
Configuration
[Unit]
Description=Project Zomboid Dedicated Server
After=network-online.target zomboid.socket
Wants=network-online.target
Requires=zomboid.socket

[Service]
Type=simple
User=zomboid
Group=zomboid
WorkingDirectory=/home/zomboid/pz-server
ExecStart=/home/zomboid/pz-server/start-server.sh -servername servertest
Sockets=zomboid.socket
StandardInput=socket
StandardOutput=journal
StandardError=journal
ExecStop=/bin/sh -c 'echo quit > /run/zomboid.control; while kill -0 "$$MAINPID" 2>/dev/null; do sleep 1; done'
TimeoutStopSec=180
Restart=on-failure
RestartSec=20
LimitNOFILE=100000

[Install]
WantedBy=multi-user.target

Enable and Start Service

Terminal
sudo systemctl daemon-reload
sudo systemctl enable zomboid.service
sudo systemctl start zomboid.service

Management Commands

Terminal
# Check status
sudo systemctl status zomboid.service

# Stop server (saves the world)
sudo systemctl stop zomboid.service

# Restart server
sudo systemctl restart zomboid.service

# View logs
sudo journalctl -u zomboid.service -f

Verify the Server

Wait for the startup message, which can take several minutes:

Terminal
sudo journalctl -u zomboid.service | grep 'SERVER STARTED'

Then check that the ports are listening:

Terminal
sudo ss -ulpn | grep -E ':(16261|16262)\b'

Connecting to Server

  1. Launch Project Zomboid, in the same version as the server.
  2. Open Join in the main menu.
  3. Enter the address SERVER_IP and the port 16261.
  4. Enter the server password if there is one, along with your username and account password.

To log in as an administrator, use the username admin and the password chosen at first launch.

Administration

Sending a Command to the Server

From the server, write the command to the channel, without a leading /. The result appears in the logs:

Terminal
echo 'players' | sudo tee /run/zomboid.control
sudo journalctl -u zomboid.service -n 20

In game, type the same commands in the chat, preceded by /.

Useful Commands

Command Description
players List connected players
save Save the world
quit Save and stop the server
servermsg "message" Send a message to all players
setaccesslevel "username" "admin" Change a player's role
adduser "username" "password" Create an account
setpassword "username" "password" Change an account's password
kickuser "username" -r "reason" Kick a player
banuser "username" -ip -r "reason" Ban a player and their IP address
unbanuser "username" Unban a player
reloadoptions Reload servertest.ini
showoptions Show active settings
checkModsNeedUpdate Write to the logs if a mod has been updated
help List commands

The available roles are admin, moderator, overseer, gm and observer.

RCON (optional)

To use an RCON tool, set RCONPassword to a long password, then open port 27015 to your IP address only: replace YOUR_IP.

UFW:

Terminal
sudo ufw allow from YOUR_IP to any port 27015 proto tcp
sudo ufw reload

iptables:

Terminal
sudo iptables -A INPUT -p tcp -s YOUR_IP --dport 27015 -j ACCEPT
sudo iptables -A INPUT ! -i lo -p tcp --dport 27015 -j DROP
sudo iptables-save | sudo tee /etc/iptables/rules.v4

nftables:

Terminal
sudo nft add rule inet filter input ip saddr YOUR_IP tcp dport 27015 accept
sudo nft add rule inet filter input iifname != "lo" tcp dport 27015 drop
(echo "flush ruleset"; sudo nft list ruleset) | sudo tee /etc/nftables.conf

Installing Workshop Mods

The server downloads the mods itself at startup, and the game offers to install them for players when they connect. You need two pieces of information per mod, available on its Workshop page:

Information Where to find it Parameter
Workshop ID Number at the end of the page address (?id=...) WorkshopItems
Mod ID Mod ID line in the description, or id= in mod.info Mods

Stop the server, then edit servertest.ini:

Terminal
sudo systemctl stop zomboid.service
sudo -u zomboid nano /home/zomboid/Zomboid/Server/servertest.ini

Separate the values with semicolons:

Configuration
WorkshopItems=1111111111;2222222222
Mods=FirstMod;SecondMod

A Workshop item can contain several mods: add only the ones you want to enable in Mods. Some mod list exports write \FirstMod: the server also accepts this form.

For a map mod, add the name of its map folder (in media/maps) before the base map:

Configuration
Map=MyModMap;Muldraugh, KY

Then restart the server and follow the download in the logs:

Terminal
sudo systemctl start zomboid.service
sudo journalctl -u zomboid.service -f

Server Update

Terminal
sudo systemctl stop zomboid.service
sudo -iu zomboid /home/zomboid/update-server.sh
sudo systemctl start zomboid.service

The server and the players must have the same version. Back up before each major update.

Automatic Backup

Built-in Backups

The server creates archives in /home/zomboid/Zomboid/backups/, configured in servertest.ini:

Parameter Description Default value
BackupsCount Number of archives kept 5
BackupsOnStart Backup at startup true
BackupsOnVersionChange Backup when the game version changes true
BackupsPeriod Interval of periodic backups, 0 to disable them 0

Backup Script

This script cleanly stops the server, archives the world, the accounts and the configuration, then restarts it:

Terminal
sudo nano /usr/local/sbin/backup-zomboid.sh
Terminal
#!/bin/bash
set -euo pipefail
umask 027

BACKUP_DIR="/home/zomboid/backups"
DATE=$(date +%Y-%m-%d_%H-%M-%S)
ARCHIVE="$BACKUP_DIR/zomboid_$DATE.tar.gz"

install -d -o zomboid -g zomboid -m 750 "$BACKUP_DIR"

systemctl stop zomboid.service
trap 'systemctl start zomboid.service' EXIT

tar -czf "$ARCHIVE" -C /home/zomboid Zomboid/Server Zomboid/db Zomboid/Saves/Multiplayer
chown zomboid:zomboid "$ARCHIVE"

# Delete backups older than 7 days
find "$BACKUP_DIR" -name "zomboid_*.tar.gz" -mtime +7 -delete
Terminal
sudo chmod 750 /usr/local/sbin/backup-zomboid.sh
sudo /usr/local/sbin/backup-zomboid.sh
sudo ls -lh /home/zomboid/backups

Schedule Backup

Terminal
sudo nano /etc/cron.d/zomboid-backup
Text
# Backup every night at 5:30 AM
30 5 * * * root /usr/local/sbin/backup-zomboid.sh

Regularly copy these archives off the server. They contain the accounts and the configuration passwords: keep them private.

Restore a Backup

Terminal
sudo systemctl stop zomboid.service
sudo -u zomboid mv /home/zomboid/Zomboid /home/zomboid/Zomboid.old
sudo -u zomboid mkdir /home/zomboid/Zomboid
sudo -u zomboid tar -xzf /home/zomboid/backups/zomboid_DATE.tar.gz -C /home/zomboid
sudo systemctl start zomboid.service

Replace DATE with the date of the archive.

Troubleshooting

Service stays stuck at startup

If the logs stop at Enter new administrator password:, the admin account has not been created yet. Stop the service and perform the first launch manually:

Terminal
sudo systemctl stop zomboid.service
sudo -iu zomboid /home/zomboid/pz-server/start-server.sh -servername servertest

Only 64bit is supported

This message appears when the provided Java cannot start: incomplete installation or a machine that is not x86_64. Check the architecture with uname -m, then run /home/zomboid/update-server.sh again as the zomboid user.

Server stops due to lack of memory

The logs show java.lang.OutOfMemoryError, or the system killed the process:

Terminal
sudo journalctl -k | grep -iE 'out of memory|killed process'

If Java runs out of memory, increase XMX in /home/zomboid/update-server.sh. If the system killed the process, lower this value or upgrade to a plan with more RAM. In both cases, then run this script again with the server stopped.

steamclient.so Error

If the logs report that steamclient.so cannot be found, create the expected link:

Terminal
sudo -iu zomboid
mkdir -p ~/.steam/sdk64
ln -sf ~/pz-server/linux64/steamclient.so ~/.steam/sdk64/steamclient.so
exit

Players can't connect

  • Wait for *** SERVER STARTED **** in the logs
  • Check that ports 16261 and 16262 are open on UDP
  • Check that the server is listening: sudo ss -ulpn | grep -E ':(16261|16262)\b'

Messages Shown to Players

Message Cause and solution
Client version (...) does not match server version (...) Bring the server and the game to the same version, on the same Steam branch
Wrong server password given The server password field is incorrect
Wrong username or password given The account exists with a different password: change it with setpassword
Workshop item version is different than the server's A mod has been updated: restart the server, then restart the game
Mod "..." is not installed The player does not have the mod, or Mods contains an incorrect ID
The server is full Increase MaxPlayers if your machine allows it

Service takes a long time to stop

This is normal: the server saves the world before stopping. The service gives it 3 minutes (TimeoutStopSec=180). On a very large world, increase this value.