A Project Zomboid server on a VPS: Java memory, mods and choosing a build
Project Zomboid differs from most game servers in that it's written in Java. The server runs inside a Java virtual machine, and the amount of memory it can use is set by hand rather than taken from what the VPS has. That leads to the main beginner mistake: renting a 16 GB plan, leaving the default limit in the settings, and then watching the server lag and crash anyway. Below is what to take into account so that a Project Zomboid server on a VPS can keep a modded group going for months without a wipe.
Choose a build first: 41 or 42
The game currently has two live branches. Build 41 is the long-proven version with a huge library of multiplayer mods. Build 42 is the new branch with reworked crafting, animals and lighting; multiplayer was added to it in December 2025. Saves are not compatible between branches, and most mods for 41 don't work in 42 until their authors update them. The server and all players must be on the same branch; you pick it in SteamCMD with the -beta parameter when installing app 380870. Build 42 is noticeably heavier on memory, especially when generating a new world, so decide in advance what you'll play on: the plan depends on it.
How much memory to allocate, and how
The Java heap limit is set with the -Xmx parameter: on Windows in StartServer64.bat, on Linux in the ProjectZomboid64.json file next to the start script. The rule is simple: give the server about 2 GB less than the VPS has. The rest is needed by the system, the garbage collector and the disk cache; if you set -Xmx to all of the memory, Linux will kill the process at peak load.
- Up to 8 players without mods: an 8 GB plan with 6 GB in
-Xmx. This is the default filter in the table above. - 10–20 players or a pack of 50+ mods: 16 GB of memory or more, especially on Build 42.
- A server for 30+ people with add-on maps: 24–32 GB and fast cores.
The CPU is loaded first of all by zombies: each of them pathfinds and reacts to noise. A high population setting in SandboxVars.lua and horde migration enabled on a busy server cause more lag than extra players do. Core clock speed matters more here than the number of cores.
Disk: the world grows as you play
The map is saved in chunks: every visited cell of the world becomes a file in the Zomboid/Saves/Multiplayer/<server name> folder. After a few months of active play, with players driving all over the map, the save grows to tens of gigabytes and hundreds of thousands of small files. On a slow disk this causes freezes during saves and slow backups, so it makes sense to take a VPS with NVMe from the start and back up into an archive rather than copying the folder file by file.
Mods from Steam Workshop
Mods are enabled with two lines in servertest.ini: WorkshopItems= with the list of Workshop IDs and Mods= with the internal mod IDs separated by semicolons. The server downloads them itself at startup, and players get the same set when they connect. The most common problem on public servers is a mod updating in Workshop mid-game: players already have the new version, the server has the old one, and the connection drops with a mismatch error. A server restart fixes it; many admins schedule a daily restart for exactly this reason. Before adding a mod to a live world, make a copy of the save: some mods change items and leave "broken" cells behind after removal.
Ports, access and operating system
The server needs two ports: 16261/UDP as the main one and 16262/UDP as the additional one, the next number up. A typical symptom of the second port being closed is that players see the server in the list but hang on loading. Open RCON (27015/TCP by default) only to your own addresses. For a private game with friends, set Open=false and create accounts by hand so random players can't find the server. Admin rights are granted with the setaccesslevel command in the server console; don't hand them to all your friends at once, because in Project Zomboid an admin can teleport, spawn items and accidentally ruin the world for everyone.
The dedicated server is officially released for Windows and Linux. On a Linux system such as Ubuntu the same memory goes further: you don't need 2–3 GB for Windows, and the Java the game uses ships with the server, so there's nothing extra to install. If you plan to host other game worlds alongside it, compare the requirements with the VPS for Valheim page: there the load falls on the network rather than on memory.