Build 42 finally brought multiplayer back to Project Zomboid — stable since late July 2026 — and with it a new generation of servers. A B42 dedicated server needs more RAM than you think (10GB is the honest floor — 8GB machines get OOM-killed generating a fresh world), two open UDP ports (16261 and 16262), and an understanding of one file: servertest.ini. This is the complete Linux setup guide, written from running these servers in production.
What changed for servers in Build 42?
If you ran a B41 server, unlearn some habits. As of Build 42.20:
- Multiplayer returned with the stable release on 29 July 2026 after the long single-player-only unstable period. The server management system was rebuilt along the way, so most pre-2026 guides you'll find are describing a server that no longer exists.
- B41 mods do not work on B42 servers — the Workshop now tags B42-compatible mods separately, and a B41 mod list pasted into a B42 server is the single most common reason a new server fails to load mods. Full detail: B42 server not loading Workshop mods.
- The simulation got heavier. Animals graze and path around the map, basements and multi-storey buildings changed lighting and pathfinding, and the crafting overhaul tracks far more world state. That's why RAM and CPU guidance moved up a tier: see how much RAM a B42 server needs.
- World saves do not migrate from B41. A B42 server means a fresh map. What carries over (and what doesn't) is covered in the B41 → B42 migration guide.
Installing the server with SteamCMD
The dedicated server is free and Linux-native — you don't need a copy of the game to host. It's Steam app 380870:
steamcmd +force_install_dir /opt/pzserver \ +login anonymous \ +app_update 380870 validate +quit
That pulls the server binaries, the bundled Java runtime (jre64/), and start-server.sh. The server is a Java application under the hood — the ProjectZomboid64 binary is a launcher that starts the JVM — which matters for memory tuning below.
The three concepts that make PZ servers make sense
Most B42 server confusion comes from three flags that interact:
| Flag | What it controls | Default |
|---|---|---|
-servername <name> | Which config set loads: <name>.ini, <name>_SandboxVars.lua, and the save folder | servertest |
-cachedir=<path> | Where ALL of it lives — configs, saves, logs | ~/Zomboid |
-adminpassword <pw> | First boot creates the admin account with this password | none — first boot asks |
So with defaults, your config file is ~/Zomboid/Server/servertest.ini and your world lives under ~/Zomboid/Saves/Multiplayer/servertest/. The name "servertest" alarms people — it's not a test mode, it's just the default profile name. Keep it unless you have a reason not to; renaming it means renaming every config and save folder to match.
First boot: generate the config, set the admin password
Run the server once to generate its config files:
./start-server.sh -adminpassword 'ChooseSomethingLong'
First boot takes a while — it's creating the world, carving out the map area, and writing servertest.ini plus servertest_SandboxVars.lua with every default. When you see SERVER STARTED in the console, it's live. Quit with quit at the server console (that saves the world cleanly — killing the process instead is how worlds corrupt).
Now edit ~/Zomboid/Server/servertest.ini. The keys most servers change first:
PublicName=My B42 Server Public=true Password= MaxPlayers=16 PVP=false PauseEmpty=true Mods= WorkshopItems=
Every key in that file is explained in B42 server settings explained; mods syntax (semicolons, not commas) is in the Workshop mods guide.
Ports: 16261 and 16262, both UDP
As of Build 42.20 the server uses two UDP ports:
| Port | Purpose |
|---|---|
| 16261/UDP | Main port — server browser, handshake, and the port players type when direct-connecting |
| 16262/UDP | Direct/data port used after the handshake |
Forward both on your router or open both in your firewall (ufw allow 16261/udp, ufw allow 16262/udp). The classic symptom of forgetting 16262 is players who can see the server but time out on join, or connect and freeze on the loading screen. If you're behind CGNAT (increasingly common on home fibre), no amount of port forwarding fixes it — that trade-off is covered honestly in hosting vs self-hosting.
Memory: set -Xmx deliberately
Because the server is Java, its memory ceiling is the JVM heap flag -Xmx, not what the machine happens to have. The B42 rule of thumb server admins converge on: leave the machine a solid 3GB of non-heap headroom, and never run less than 6GB of heap for a real group. B42's world generation and map streaming use native memory outside the Java heap — that's what kills tight boxes. On a 10GB box:
./start-server.sh -Xmx7g -adminpassword '...'
Too small a heap doesn't crash immediately — it shows up as garbage-collection stutter that players describe as "the whole server hiccups every few seconds." The full sizing table by group size and mod count is in how much RAM does a B42 server need.
Admin, whitelist, and staying in control
- First boot created the
adminaccount. In-game, log in with it and you get the admin panel (or use/setaccesslevel <user> adminfrom the server console). Open=true(default) lets anyone create an account on join;Open=falseturns the server whitelist-only — add players from the console with/adduser "name" "password"./savefrom the console before any restart or backup. The world also saves on clean shutdown (quit) — but not onkill -9.
Keeping it alive
Three habits separate servers that last from servers that die at week two:
- Restart on a schedule. A long-running Java server accumulates heap pressure, and B42's heavier simulation makes that faster than B41. A nightly restart in quiet hours keeps GC pauses invisible.
- Back up before every mod change and update. Save folder + the two config files. See backups in the lag guide for what save bloat does over time.
- Pin your version expectations. B42 still receives patches, and a server update can strand players whose clients haven't updated (or break mods overnight — load order guide).
Frequently Asked Questions
Is the Project Zomboid dedicated server free?
Yes. It's a free tool on Steam (app 380870) and installs anonymously with SteamCMD — you don't need to own the game to run the server. Your players need the game to join, of course.
Does the B42 server run on Linux?
Yes, natively — no Wine or compatibility layer. It ships its own Java runtime, so there's nothing to install beyond SteamCMD and the server itself. Linux is what most hosts (including us) run it on.
Can I use my B41 server's world on Build 42?
No. B41 world saves are not compatible with B42's map and simulation changes, so a B42 server starts a fresh world. Your options — including keeping a legacy B41 server running on the beta branch — are laid out in the B41 to B42 migration guide.
How many players can a B42 server hold?
MaxPlayers is yours to set; the practical ceiling is RAM and CPU, not the setting. Communities run 32+ player servers on 16GB. Sizing guidance per group is in the RAM guide.
Why is my server called "servertest"?
That's the default -servername, and it only names your config/save profile — players see PublicName from the ini, not "servertest". Renaming the profile is possible but means renaming every matching config file and save folder, so most admins leave it.
Running all of this yourself is a real (if learnable) job — if you'd rather your B42 world just stay up, patched and backed up, our Project Zomboid server hosting does the server admin while you keep full file and config access.