← Back to Blog

Project Zomboid Dedicated Server: Run Build 42 on 4 GB RAM, with a Tested Setup, Ports and Plans

Published · by Leo Gashi, RS Computers

Project Zomboid Game servers Linux

To run a Project Zomboid dedicated server, download the free server (Steam app 380870) with SteamCMD, open UDP ports 16261 and 16262, and give it at least 4 GB of RAM with Java's memory limit lowered from the default 8 GB to about 2.5 GB. On our 4 GB Debian 13 test server, the default -Xmx8g got Build 42.21 killed about a minute into loading the world, while -Xmx2560m or -Xmx3g started it in 79 to 93 seconds and settled at 3.2 to 3.7 GiB of RAM with nobody online.

A dedicated server is the game's server program running on a machine of its own, so the world stays online when the friend who usually hosts is offline. For game server hosting that you control yourself, this guide gives our measurements, a tested SteamCMD and systemd setup on Linux, and the plan and city we would pick for your group.

Key facts, checked on 18 October 2026:

Project Zomboid server requirements: RAM, CPU and disk we measured

Several hosting guides we read put the minimum for Build 42 at 6 to 10 GB of RAM without publishing any measurements, so we measured it ourselves. Every figure is for an empty server, because no game client joined in our lab.

ResourceWhat we measured (empty server)What to plan for
RAM3,290 to 3,815 MiB in use with a 2.5 or 3 GB heap4 GB for a small vanilla group, 8 GB for 6 or more players or mods
Java heap (-Xmx)Default 8 GB got the server killed on 4 GBYour RAM minus about 1.5 GB
CPU2 vCPUs fully busy for about 80 s while the map loaded, 3 to 7% of one vCPU at idle2 vCPUs were enough for an empty server; dedicated vCPUs for bigger groups
Disk6.9 GiB install, 201 MiB SteamCMD, 5.6 MiB fresh worldRoom for the install, saves and save archives
SoftwareDebian 13; the server brings its own JavaNo separate Java install needed
NetworkUDP 16261 and 16262Open both in the firewall

How we tested

The server ran on 18 October 2026 in a Debian 13 container limited to 4 GiB of RAM and 2 vCPUs, with no swap, on our Amsterdam test server (AMD EPYC 7742). It was version 42.21.0 on the default map, with no mods.

The setting we varied between runs was the heap: the block of memory Java may use for game data. -Xmx sets its upper limit. In three of the runs we also logged the garbage collector to count allocation stalls.

Heap limitWorldTime until startedRAM in use at idleAllocation stalls while loading
-Xmx8g (default)NewNever: killed after about 1 minute of loading3,984 MiB when the kernel killed itNot reached
-Xmx3gNew90 s3,690 MiBNot logged
-Xmx3gExisting79 s3,815 MiB19, longest 68 ms
-Xmx2560mExisting88 to 93 s3,290 to 3,460 MiB166, longest 1.04 s
-Xmx2gNew93 s2,822 MiB533, longest 1.07 s

An allocation stall is a moment when a game thread has to wait because the heap is full and Java must free memory first. In the 2 GB run, every stall happened while the map was loading, before anyone could have joined.

Why the default 8 GB heap gets the server killed

The server uses ZGC, a garbage collector (the part of Java that frees unused memory). In our runs it took the full -Xmx allowance during the world load and kept it.

With 8 GB allowed, the heap grew until the container's 4,096 MiB were full. Then the kernel's OOM killer, the part of Linux that ends a process when memory runs out, stopped the server with 3,106 MiB of heap and 878 MiB of other memory in use.

The world itself needed far less. In the three runs where we logged the garbage collector, about 1,200 to 1,300 MiB of data was still live after loading. Across all runs the server used another 660 to 880 MiB outside the heap for Java, native libraries and Steam. So set -Xmx to the server's RAM minus about 1.5 GB, and never leave the default 8 GB on a smaller machine.

CPU mattered less. At idle the server used 3 to 7% of one vCPU, with the default PauseEmpty=true, which stops game time while nobody is online.

Project Zomboid server hosting: which plan and city to pick

Choose the size first, then the city. Our measurements cover an empty server, so the player counts below are planning ranges, not test results. The server settings page on the PZ wiki warns that more than 32 players "will potentially result in poor map streaming and desync", and 32 is the default MaxPlayers.

Step 1: the plan for your group

Your groupPlanHeap settingWhy
2 to 6 friends, vanillaVPS Mini: 4 shared vCPU, 4 GB RAM, 80 GB NVMe, 1 Gb/s-Xmx2560mStarted every time in our 4 GiB test, with 3,290 to 3,460 MiB in use at idle
6 to 16 players, or a short mod listVDS Small: 4 dedicated vCPU, 8 GB RAM, 240 GB NVMe, 10 Gb/s-Xmx6gAbout five times the live data we measured, and the 4 vCPUs are yours alone
16 to 32 players, big mod lists or map modsVDS Medium: 8 dedicated vCPU, 16 GB RAM, 480 GB NVMe, 10 Gb/s-Xmx12gMods add their own data and map mods enlarge the world
Two separate worldsVDS Large: 16 dedicated vCPU, 32 GB RAM, 960 GB NVMe, 10 Gb/sUp to -Xmx12g eachKeeps each world under the wiki's 32-player warning; each copy needs its own two UDP ports
Any groupNot VPS Nano or Micro (1 or 2 GB)None fitsEven a 2 GB heap needed 2,822 MiB of RAM in total

VPS plans share their vCPUs with other customers on the same host; VDS plans have dedicated vCPUs that only your server uses. With a full server, that means a busy neighbour cannot take CPU time away from your world. Our guide to VPS vs VDS vs dedicated servers explains the difference in more detail.

You can upgrade later from the client area with a short reboot, so it is fine to start on VPS Mini and move up when the group grows. Windows is offered on VPS Mini and the VDS plans, but we measured on Linux.

Step 2: the city closest to your players

On 6 October 2026 we measured our own servers with ping.pe, keeping the lowest of about 10 pings from each probe city:

Most of your players are inCityMeasured latency (ping.pe, 6 October 2026)
The UK, the Netherlands or GermanyAmsterdamLondon 6.7 ms, Frankfurt 6.6 ms, Berlin 11.6 ms
IrelandDublinNo ping.pe figures for our Dublin servers; a Dublin probe reached our Amsterdam server in 21.0 ms
The Balkans, Austria, Romania or GreecePrishtinaVienna 18.6 ms, Bucharest 21.9 ms, Athens 30.9 ms; Skopje about 3 ms on our own network

The Amsterdam VPS page and the Prishtina VPS page have the full latency tables, the Ireland VPS page covers Dublin, and availability by city is on the plans page. If nobody in your group wants to type Linux commands, we can set the server up for you; setup work is quoted per job. The game plans themselves are on our game server hosting page.

How to set up a Project Zomboid dedicated server on Linux

We ran every step in this section on Debian 13 on 18 October 2026, in the 4 GiB test container described above. Order the server with Debian 13 and log in as root. Each block says whether you type it as root or as the game user pzserver, because the game should never run as root. If SSH is not hardened yet, start with our guide to securing a Debian 13 VPS.

1. Packages, a game user and the firewall

SteamCMD, Valve's command-line Steam client, is a 32-bit program, so Debian needs the i386 architecture and one 32-bit library. ufw is a simple firewall. Allow SSH before you turn it on, or you lock yourself out; if your SSH listens on another port, use that number instead of 22.

# as root
dpkg --add-architecture i386
apt update
apt install -y lib32gcc-s1 curl ca-certificates tmux ufw
useradd -m -s /bin/bash pzserver
ufw allow 22/tcp
ufw allow 16261:16262/udp
ufw --force enable
ufw status verbose

Expected: Status: active, Default: deny (incoming), allow (outgoing), and ALLOW lines for 22/tcp and 16261:16262/udp for IPv4 and IPv6.

2. Download the server with SteamCMD

The dedicated server downloads with an anonymous login, so the server needs no Steam account. Your players need their own copy of the game.

# as root: switch to the game user
su - pzserver
# as the pzserver user
mkdir -p ~/steamcmd && cd ~/steamcmd
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxf -
~/steamcmd/steamcmd.sh +force_install_dir /home/pzserver/pz +login anonymous +app_update 380870 validate +quit

The first run updates SteamCMD itself, then downloads 7.2 GB and ends with Success! App '380870' fully installed. On our Amsterdam test server that took under 3 minutes.

Without a -beta flag you get the public branch, Build 42. To stay on Build 41, the wiki gives app_update 380870 -beta legacy41 validate; we confirmed the branch exists but did not download it.

3. First start and the admin password

Start the server once by hand inside tmux, a tool that keeps it alive if your SSH connection drops, because the first start asks for the password of the built-in admin account. Arguments before -- go to Java and the ones after it go to the game, so -Xmx2560m -- sets the heap for a 4 GB server. Use the value from the plan table for bigger servers.

# as the pzserver user
tmux new -s pz
cd ~/pz
./start-server.sh -Xmx2560m -- -servername myserver

Answer Enter new administrator password: and Confirm the password:; the password stays visible while you type. After Administrator account 'admin' created. a line says If the server hangs here, set UPnP=false. It is harmless on a VPS; our server carried on by itself.

About 90 seconds later you should read *** SERVER STARTED **** and Clients should use 16261 port for connections. Type quit, wait about 10 seconds for the save, then exit twice to leave tmux and return to root.

Settings now live in /home/pzserver/Zomboid/Server/myserver.ini and the world in /home/pzserver/Zomboid/Saves/Multiplayer/myserver.

4. Keep it running with systemd

systemd is the Linux service manager that starts programs at boot and restarts them after a crash. The wiki warns that the developers discourage running the server under it, because the game does not handle the stop signal (SIGTERM) that systemd normally sends. This setup never sends one.

A pipe file (a FIFO) acts as the server's keyboard: systemd starts the game with the pipe as its input and, on stop, writes quit into it. We started from the wiki's version and changed it after testing. With the wiki's BindsTo= line, our server stayed down after we killed it to simulate a crash; with PartOf= and Restart=always it came back after 30 seconds. We also rewrote the stop command so it sends quit only while the server is running and then waits for it to exit, so a restarted server never reads a leftover quit from the pipe.

# as root
cat > /etc/systemd/system/zomboid.socket <<'EOF'
[Unit]
Description=Project Zomboid console pipe
PartOf=zomboid.service

[Socket]
ListenFIFO=/home/pzserver/zomboid.control
FileDescriptorName=control
RemoveOnStop=true
SocketMode=0660
SocketUser=pzserver
EOF
# as root
cat > /etc/systemd/system/zomboid.service <<'EOF'
[Unit]
Description=Project Zomboid dedicated server
After=network-online.target zomboid.socket
Wants=network-online.target
Requires=zomboid.socket

[Service]
Type=simple
User=pzserver
WorkingDirectory=/home/pzserver/pz
ExecStart=/bin/sh -c "exec /home/pzserver/pz/start-server.sh -Xmx2560m -- -servername myserver < /home/pzserver/zomboid.control"
ExecStop=/bin/sh -c "if kill -0 $MAINPID 2>/dev/null; then echo quit > /home/pzserver/zomboid.control; fi; while kill -0 $MAINPID 2>/dev/null; do sleep 1; done"
Sockets=zomboid.socket
KillSignal=SIGCONT
TimeoutStopSec=120
Restart=always
RestartSec=30

[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl enable --now zomboid.service
systemctl status zomboid --no-pager

Expected: Active: active (running). Follow the start with journalctl -u zomboid -f until SERVER STARTED appears, then press Ctrl+C.

In our tests, systemctl stop zomboid saved and stopped the server in 10 seconds, and a reboot saved the world on the way down and started the server again on boot. KillSignal=SIGCONT is a harmless signal, so systemd does not interrupt the save; it only forces a kill if the server is still running after the 120 seconds of TimeoutStopSec.

5. Talk to the server console

Anything you write into the pipe is a console command, and the answer appears in the journal:

# as root
echo players > /home/pzserver/zomboid.control
echo 'servermsg "Restart in 5 minutes"' > /home/pzserver/zomboid.control
journalctl -u zomboid -n 20 --no-pager

We saw Players connected (0): and Message sent. The wiki's admin commands page has the full list; save saved our world in 0.2 seconds.

According to the wiki, your friends join from the game's Join menu: on the Favorites tab they add your server's IPv4 address with port 16261. We had no game client to try this.

Project Zomboid server ports: UDP 16261 and 16262

A Project Zomboid dedicated server needs two UDP ports open, 16261 and 16262, and players connect to 16261.

PortProtocolOpen it?What it is
16261UDPYesThe port players type in; the server log calls it the Steam connection
16262UDPYesThe second game port, "Direct Connection Port" on the wiki
27015TCPOnly for your own IP, if you use itRCON remote console; it listens only after you set RCONPassword
22TCPYesSSH, so you can log in

On a VPS there is no home router to port-forward: the server has its own public IPv4 address, so opening the ports in its firewall (step 1) is all it takes.

RCON is a remote console that lets admin tools send commands over the network. With the default empty RCONPassword, nothing listened on 27015. Once we set a password, the log said RCON: listening on port 27015, on every address, so allow only your home address with ufw allow from YOUR_HOME_IP to any port 27015 proto tcp.

The game ports listened on IPv4 only. The server also opened one random high UDP port; the wiki lists only 16261 and 16262 as required. Per the wiki, a second world on the same server needs two more UDP ports, such as 16274 and 16275.

How to add admins, a whitelist and Workshop mods

The first start created an account called admin with the password you typed. Per the wiki, admin commands also work inside the game, typed with a forward slash, for any user with admin status. To give your normal account that status, write setaccesslevel with your user name into the pipe. We tested the same command with the moderator level:

# as root
echo 'setaccesslevel "YourName" "admin"' > /home/pzserver/zomboid.control

For a private server, the wiki says to set Open=false in myserver.ini so only accounts you create can join. You then add each friend with adduser "name" "password" through the pipe, which answered User labfriend created with password in our test.

Everything written to the pipe, passwords included, is stored in the journal, so keep root access to yourself.

Mods go into two lines of the same file. The wiki's server settings page says WorkshopItems= takes Workshop IDs separated by semicolons and Mods= takes each mod's own ID from its info file; the server downloads the items itself.

We did not install mods in the lab, on purpose: the April 2026 incident showed that a Workshop mod can run harmful code on the machine that loads it. Keep the list short and expect breakage when Build 42 changes. Hotfix 42.20.4 disabled two Lua functions, loadstring and loadstream, for security reasons, and 42.21 turned them back on (Steam news).

How to update the server without losing your world

Your players' Steam clients update by themselves, so update the server the day a patch lands, and copy your save folder first. The defaults BackupsOnStart=true and BackupsCount=5 (wiki) make the game back up the world each time it starts and keep up to 5 copies; on our server they went to /home/pzserver/Zomboid/backups. Those copies sit on the same disk, so keep one on your own computer as well.

# as root
systemctl stop zomboid
su - pzserver
# as the pzserver user
tar czf ~/zomboid-save-$(date +%F).tar.gz -C ~ Zomboid
~/steamcmd/steamcmd.sh +force_install_dir /home/pzserver/pz +login anonymous +app_update 380870 validate +quit
exit
# as root
systemctl start zomboid

Our archive was 4.9 MiB and the update with validate took 47 seconds. Download the archive with scp root@YOUR_SERVER_IP:/home/pzserver/zomboid-save-*.tar.gz . on your own computer, or with a tool such as WinSCP.

This test is also why the heap lives in the systemd unit. validate reset ProjectZomboid64.json to -Xmx8g, but the launcher adds the command line value after the JSON one, and the log showed vmArg (args) 9: -Xmx2560m winning. If you edit the JSON instead, redo it after every update, or a 4 GB server dies on its next start.

Running other survival games too? See our guides to setting up an Enshrouded dedicated server on a Windows VPS, Hytale server hosting after Update 7 and how to host a game server on a VPS, or the Pelican vs Pterodactyl panel comparison for running several servers from one web panel.

Frequently asked questions

How much RAM does a Project Zomboid dedicated server need?

In our 18 October 2026 test, an empty Build 42.21 server on the default map ran in 4 GiB of RAM with a 2.5 or 3 GB heap and used 3,290 to 3,815 MiB in total. 2 GB of RAM is too small: even a 2 GB heap needed 2,822 MiB. For 6 to 16 players or a mod list, we would start with 8 GB of RAM and a 6 GB heap; that is a planning figure, because no players joined our test.

Which ports does a Project Zomboid dedicated server use?

A Project Zomboid dedicated server uses UDP 16261 and UDP 16262, and players connect to 16261. TCP 27015 is used only if you enable RCON by setting RCONPassword, and should then be limited to your own IP. In our test the game ports listened on IPv4 only.

Why does my Project Zomboid server get killed while loading the world?

The Linux server's ProjectZomboid64.json sets an 8 GB heap (-Xmx8g), and the heap grows toward that limit while the world loads, so on a smaller server the Linux OOM killer ends it when memory runs out. That happened on our 4 GiB test server about a minute into loading. Set -Xmx to your RAM minus about 1.5 GB on the command line, because an update with validate resets the JSON file.

How many players can a Project Zomboid server hold?

The default MaxPlayers setting is 32, and the PZ wiki warns that more than 32 players can cause poor map streaming and desync. For a bigger community, that warning points to two separate worlds on one larger server rather than one crowded world; each world needs its own two UDP ports.

Is Build 42 multiplayer out, and can I still run a Build 41 server?

Yes. Multiplayer reached Build 42 on the unstable branch with 42.13 on 11 December 2025, Build 42.20 brought it to the public stable branch on 29 July 2026, and 42.21 replaced it on 28 September 2026. SteamCMD app 380870 without a beta flag gets Build 42. The legacy41 branch was on Build 41.78.21 on 18 October 2026, and Build 41 saves cannot be loaded in Build 42.

Is the Project Zomboid dedicated server free to download?

Yes. SteamCMD downloads the Project Zomboid dedicated server (app 380870) with an anonymous login, so the server needs no Steam account. Each player needs their own copy of the game to join.

Get your group online this weekend

For a few friends, a VPS Mini with a 2.5 GB heap runs a vanilla Build 42 world. For a bigger community or a mod list, a VDS Small or Medium adds dedicated vCPUs and room to grow. RS Computers runs KVM servers in Amsterdam, Dublin and Prishtina with NVMe storage, unmetered traffic and their own IPv4 and IPv6.

Compare the sizes on our game server hosting page, and if you would rather have someone set the server up for you, ask for a quote on Telegram.

← All articles

Chat on Telegram