Datafex LogoDatafex
All guides

How to set up a Project Zomboid server: Java memory and the mod list

By Published Updated 5 min read

This guide builds a working Project Zomboid dedicated server from scratch: choosing the operating system, installing through SteamCMD, setting the Java memory ceiling, opening ports and loading Workshop mods correctly. What separates Project Zomboid from other survival games is this: the server runs on Java, and the memory it can use comes from a ceiling you write down explicitly, not from the operating system.

Before you start: what you need

  • A server sized against your mod list. A vanilla server runs at around 4 GB with 8-16 players. 8-12 GB is normal on a server with 50-100 mods, because mods add both memory use and zombie simulation load. As a rough measure, 50 mods roughly doubles the vanilla requirement. The general logic of the calculation: how much vCPU and RAM does a server need?
  • Comfortable storage. The world is persistent: every area players visit is written to disk. Reaching 20-40 GB in the save folder is normal on a long-lived server.
  • A high-clocked processor. Zombie behaviour computation is largely single-threaded, so adding cores stops paying off past a point.

To pick resources with the memory you hand to Java accounted for: server configurator

1. Operating system

Choose Ubuntu 22.04 LTS and run the server as a separate, unprivileged user. SteamCMD needs 32-bit libraries; if those packages are missing the first command fails without giving you a single clue.

The server package ships with its own Java runtime. Installing another Java version system-wide and pointing the server at it creates more problems than it solves; use the runtime that comes with the package.

2. Installing with SteamCMD

Server files are downloaded with an anonymous Steam session:

./steamcmd.sh +force_install_dir /home/zomboid/server +login anonymous \
  +app_update 380870 validate +quit

Start the server once and stop it. The configuration files are only generated on first boot, and that first boot is where you are asked for an admin password. Skipping this step and then hunting for files is the classic "there is no settings file" situation in Project Zomboid.

Define the server as a systemd service; Restart=always brings the Java process back up when it exits unexpectedly.

3. The Java memory ceiling: -Xmx

This is the most important heading in the guide. The memory a Project Zomboid server can use is capped by the `-Xmx` value in ProjectZomboid64.json. Growing the server's RAM does not change that value by itself.

The practical consequence: a customer who moves from an 8 GB plan to a 16 GB one sees no difference at all until they raise the -Xmx line. The server hits the same ceiling and stalls in the same place. This is the single most common reason for support tickets opened right after an upgrade.

When setting the value, do not hand Java the server's entire RAM: leave 1-2 GB for the operating system and other processes. For a 16-player server running vanilla or a modest mod list, the 4-6 GB range is enough; for one with 50-100 mods, planning for 8-12 GB is realistic.

4. Ports

PortProtocolPurpose
16261UDPGame traffic
16262UDPPlayer data channel
8766-8767UDPListing through Steam

All four are needed if you want to appear in the Steam list. With only 16261 open the server runs and can be joined by direct IP, but it never shows up in the server list.

5. Loading Workshop mods

Installing mods in Project Zomboid is a two-line job, and unless you write both lines the mods do not load. The configuration file has two separate fields: the line holding Workshop IDs and the line holding mod IDs. They are not the same thing — the Workshop ID says where the content is downloaded from, while the mod ID says which mod inside that downloaded package is enabled. One Workshop item can contain several mods.

The most common outcome: only the Workshop IDs are filled in, the mods download, the server starts, nothing is enabled, and there is no clear error in the console.

Changing the mod list after players have progressed is risky, and map mods need particular care, because removing them makes progress in those regions unreachable. Decide on mods up front.

How the world grows

In Project Zomboid what drives RAM is not player count but the size of the explored area and the number of active zombies. A server played for a long time is far heavier than a fresh one at the same player count.

So when the server slows down, the first move should not be bigger hardware. Lowering the zombie population setting in the sandbox variables is often more effective and costs nothing. Make the hardware decision only after tuning the population.

On storage, every visited area is written to disk continuously, and when that write takes longer players feel brief pauses. Why storage latency shortens that pause by multiples: what is an NVMe SSD?

A genuinely reserved resource ceiling matters more than usual here: when the Java process hits its ceiling the server does not slow down, it stops. That is why virtual server plans that do not share the ceiling make a visible difference against an oversold environment.

The most common first-boot mistakes

  1. Growing RAM without raising `-Xmx`. Nothing changes.
  2. Setting `-Xmx` to the total RAM. Nothing is left for the operating system.
  3. Filling in only the Workshop IDs. The mods download and none of them are enabled.
  4. Leaving the Steam ports closed. The server runs and never appears in the list.
  5. Looking for configuration files before starting the server. They are generated on first boot.
  6. Growing hardware without checking the zombie population. The setting beats the hardware in most cases.
  7. Sizing storage against the first week. The save folder can reach 20-40 GB.

On DDoS

Project Zomboid carries all of its traffic over UDP, and because a UDP source address can be forged, floods cannot be blocked at the application layer; filtering has to happen at the network layer. The details in a separate post: what is DDoS protection?

On Datafex servers, layered Fexwall DDoS protection is included free on every plan, and floods on 16261 are absorbed by those layers.

Next step

We have put the recommended plans by player count and mod list, the processor options and the Project Zomboid-specific questions on one page: Project Zomboid server plans.

If you want to act on what is in this guide:

See recommended server plans for Project Zomboid

Related guides