The Project Zomboid Dedicated Server supports persistent multiplayer worlds while players are offline. The game's reliance on physics synchronization, extensive zombie pathfinding, and interactions with huge numbers of map items makes memory allocation, ports, and mod load order subject to specific requirements. This article covers basic setup, B41/B42 branch switching, and runtime tuning.
1. Hardware and branch selection
1. Compare B41 Stable and the B42 multiplayer branch
| Branch | SteamCMD argument | Use cases | Stability and mod ecosystem |
|---|---|---|---|
| B41 Stable (default stable release) | No additional argument by default | Long-term community servers and serious survival saves | Very high. Most mature large mods target this branch; supports large multiplayer populations |
| B42 Unstable (testing branch) | -beta unstable |
Try new basements, animals, and crafting systems | Moderate. Frequent updates may change save structures; verify mod compatibility separately |
2. Hardware baseline
- CPU: 4 cores at 3.5GHz+ recommended; zombie horde pathfinding relies heavily on single-core and multicore physics computation.
- Memory (RAM): Around 6 GB baseline use; reserve 500MB~1GB for each additional active player and large map mods.
- Storage: SSD installation is strongly recommended to prevent I/O bottlenecks and sudden rubber-banding when large vehicle convoys travel between regions (dynamic Chunk loading).
2. Deploy the server through SteamCMD
1. Download anonymously
The dedicated server AppID is 380870.
- Install the stable release (B41 Stable):
Shell steamcmd +login anonymous +app_update 380870 validate +quit - Install the testing branch (B42 Unstable):
Shell steamcmd +login anonymous +app_update 380870 -beta unstable validate +quit
2. Set the JVM Heap Size limit
In the server root, edit ProjectZomboid64.json or change the startup script's JVM arguments:
{
"-Xms": "4096m",
"-Xmx": "12288m"
}
Note: -Xmx is the maximum physical memory the server may use. Set it to 60%~75% of host RAM to leave necessary space for the operating system.
3. Networking and ports
Modern PZ servers simplify the networking stack and no longer use the early per-player TCP port forwarding mechanism:
| Port | Protocol | Purpose | Port forwarding required? |
|---|---|---|---|
| 16261 | UDP | Main connection handshake and Master status broadcast | Required |
| 16262 | UDP | Direct Steam client networking and game data synchronization | Required |
Firewall and router checklist:
- Ensure Windows Firewall allows inbound UDP for
ProjectZomboid64.exe. - On home networks, forward external UDP
16261-16262to the server's static LAN IP. - LAN players join through the local IP (such as
192.168.1.5:16261); external players use the public IP.
4. Configuration files and mod loading
Server data is stored in the user's home directory by default:
- Windows:
C:\Users\<username>\Zomboid\Server\ - Linux:
~/Zomboid/Server/
1. Main configuration files
<server name>.ini: Connections, ports, passwords, mods, and whitelist rules.<server name>_SandboxVars.lua: Zombie spawn rate, water/electricity shutoff time, loot refresh, and infection mechanics.<server name>_spawnregions.lua: Spawn region definitions.
2. Load Workshop mods correctly
In <server name>.ini, configure both WorkshopItems and Mods with corresponding order:
WorkshopItems=2688809240;2392709985
Mods=Arsenal(26)GunFighter;Brita's Weapon Pack
WorkshopItems: Numeric Steam Workshop IDs (used by the server to download mods automatically).Mods: Mod-ID from each mod folder (used by the game to activate code in the world). Wrong ordering or missing entries causes a "client and server mod lists do not match" error when joining.
5. Choose an approach: manual configuration or LanGame Server Manager (LGSM)
Manual setup involves SteamCMD upgrades, JSON memory allocation, INI/Lua settings, and troubleshooting multiple mods. To manage several servers or simplify routine multiplayer sessions, we recommend the official open-source dedicated server management platform:
- Tool overview and client: LanGame Server Manager (LGSM) product page
- Open-source repository: GitHub - SZSLGJCOM/LanGame-Server-Manager
LGSM provides:
- One-click branch switching: Select B41 Stable or B42 Unstable graphically and match launcher arguments automatically.
- Visual sandbox adjustment: Converts complex
SandboxVars.luainto clear grouped forms, saving loot and zombie multipliers as you adjust them. - Automatic Workshop parsing: Enter a Workshop link or ID to complete the Mod ID and synchronize configuration automatically.
- Automatic save packaging and self-healing: Creates compressed save archives on a schedule and restarts after unexpected process interruption.
6. Common issues during long-term operations
1. Error: Server has terminated with code 1
- Cause: Often JVM memory limits or insufficient physical RAM to allocate the configured
-Xmx. - Solution: Check other background programs' memory use, lower
-Xmxappropriately, or enlarge the virtual memory page file.
2. Players receive "File doesn't match the server"
- Cause: Mod versions differ between client and server, or the server downloaded a new patch before the client updated.
- Solution: Stop the server, delete the cache under
Zomboid/steamapps/workshop/, and rerun SteamCMD update validation.