Project Zomboid Field guide

Project Zomboid Build 42 Dedicated Server Setup: Configs, Crafting, and Multiplayer

Deploying a dedicated Project Zomboid Build 42 server on Linux: SteamCMD unstable branch, JVM memory budgeting, crafting rules in SandboxVars, and systemd service.

Project Zomboid Build 42 Dedicated Server Setup: Configs, Crafting, and Multiplayer

Build 42 is the most monumental update in Project Zomboid's history. It thoroughly transforms the survival sandbox experience: introducing late-game post-apocalyptic crafting disciplines (blacksmithing, pottery, glassblowing, animal husbandry), expanding structural verticality up to 32 floors (from multi-level basements to towering skyscrapers), integrating a voxel dynamic lighting pipeline, and overhauling dedicated server network protocols.

This guide walks through deploying a dedicated Project Zomboid Build 42 server on Linux: provisioning SteamCMD on Ubuntu, targeting the experimental unstable branch, tuning JVM heap allocations, configuring new crafting sandbox rules in SandboxVars.lua, and establishing a reliable systemd service.

Architectural Changes and Network Updates in Build 42#

Upgrading to Build 42 required The Indie Stone developers to reconstruct core elements of the server runtime:

  1. Expanded World Height: World chunks now calculate up to 32 vertical voxels rather than the previous 8-story cap. This increases chunk data payloads and demands higher network transfer rates.
  2. Voxel Dynamic Lighting: The server transmits precise occlusion boundaries and line-of-sight calculations, eliminating visual anomalies where zombies remained invisible in dark rooms.
  3. Complex Crafting Graph: Hundreds of newly introduced raw materials, tools, and processing stations for blacksmithing and animal care necessitate a larger server heap pool to maintain recipe lookups.
  4. Network Sockets: The dedicated server operates on UDP port 16261 for handshakes and direct client connections, binding sequential ports 16262+ for joined players.

Installing Build 42 via SteamCMD and Selecting the Beta Branch#

For production stability on Linux, deploy Ubuntu 22.04 or 24.04 LTS. Provision a dedicated system account:

bash
sudo adduser --system --home /home/zomboid --shell /bin/bash zomboid
sudo apt update && sudo apt install -y steamcmd lib32gcc-s1

Switch to the zomboid user and install the dedicated server package (App ID 380870). Access to Build 42 builds is managed via beta branches (such as unstable):

bash
/usr/games/steamcmd +force_install_dir /home/zomboid/pz_server \
  +login anonymous \
  +app_update 380870 -beta unstable validate \
  +quit

The validate flag verifies downloaded package binaries and updates the embedded Java runtime.

Allocating Memory and JVM Parameters for Build 42#

Due to voxel lighting data and the expanded crafting tree, memory requirements have increased. A baseline of 6 to 8 GB RAM is strongly recommended for 4 to 8 players.

Modify the server launcher configuration at /home/zomboid/pz_server/ProjectZomboid64.json:

json
{
  "mainClass": "zombie/network/GameServer",
  "classpath": [
    "java/",
    "java/istack-commons-runtime.jar",
    "java/jassimp.jar",
    "java/javacsv.jar"
  ],
  "vmArgs": [
    "-Djava.awt.headless=true",
    "-Xms6144m",
    "-Xmx6144m",
    "-XX:+UseG1GC",
    "-XX:MaxGCPauseMillis=20",
    "-XX:G1ReservePercent=15"
  ]
}

Locking -Xms and -Xmx at 6144m (6 GB) prevents runtime heap reallocation stalls during large horde spawns.

Configuring Crafting and Mechanics in SandboxVars.lua#

Dedicated server sandbox variables are maintained in: ~/Zomboid/Server/servertest_SandboxVars.lua

Build 42 introduces dedicated settings controlling crafting progression, animal breeding, and environmental illumination:

lua
SandboxVars = {
    Speed = 3,
    Zombies = 3,
    Distribution = 1,
    DayLength = 3,
    StartYear = 1,
    StartMonth = 7,
    StartDay = 9,
    Crafting = {
        SmithingSpeed = 2,
        CraftingXPModifier = 1.5,
        ToolDegradation = 2,
    },
    Animals = {
        BreedingRate = 2,
        FeedConsumption = 2,
    },
    Lighting = {
        DynamicNight = true,
    }
}

Ensure Public=true is toggled inside ~/Zomboid/Server/servertest.ini if you wish your server to appear in the global public lobby.

Using an integrated server management panel, toggling between Build 41 legacy and Build 42 experimental branches happens without command-line editing, and RAM allocations are scaled automatically.

Firewall Routing and Daemonizing via systemd#

Open required UDP ports in UFW:

bash
sudo ufw allow 16261/udp comment "Project Zomboid Handshake"
sudo ufw allow 16262:16272/udp comment "Project Zomboid Direct Ports"
sudo ufw status verbose

Create the systemd service unit /etc/systemd/system/zomboid.service:

ini
[Unit]
Description=Project Zomboid Dedicated Server (Build 42)
After=network.target

[Service]
Type=simple
User=zomboid
WorkingDirectory=/home/zomboid/pz_server
ExecStart=/home/zomboid/pz_server/start-server.sh -servername servertest
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

Reload systemd configurations and launch the service:

bash
sudo systemctl daemon-reload
sudo systemctl enable --now zomboid
sudo journalctl -u zomboid -f --no-pager

On initial boot, the console will prompt you to set an administrative password for admin. Monitor initialization until you see: *** SERVER STARTED ****Your dedicated Build 42 instance is now ready to receive survivors in Knox Country.

Sources#