Skip to content

Repository files navigation

marketing_assets_banner GitHub License GitHub Release GitHub Repo stars Discord Docker Pulls

Game server hosting

Fast RAM, high-speed internet

Eat lag for breakfast

Try our Project Zomboid Server hosting free for 2 days!

Project Zomboid Server Docker (B42 Unstable Supported)

Important

Using Docker Desktop with WSL2 on Windows will result in a very slow download!

Server Requirements

Resource Minimum Recommended
CPU 4 cores 4+ cores
RAM 4GB Recommend over 8GB for stable operation
Storage 5GB 10GB

How to use

Copy the .env.example file to a new file called .env file. Then use either docker compose or docker run

Important

Please make sure to change the following in the .env: RCON_PASSWORD/ADMIN_USERNAME/ADMIN_PASSWORD

Docker compose

Starting the server with Docker Compose:

services:
  projectzomboid:
    image: indifferentbroccoli/projectzomboid-server-docker
    restart: unless-stopped
    container_name: projectzomboid
    stop_grace_period: 30s
    ports:
      - 16261:16261/udp
      - 16262:16262/udp
      - 27015:27015/tcp
    env_file:
      - .env
    volumes:
      - ./server-files:/project-zomboid
      - ./server-data:/project-zomboid-config

Then run:

docker-compose up -d

Docker Run

docker run -d \
    --restart unless-stopped \
    --name projectzomboid \
    --stop-timeout 30 \
    -p 16261:16261/udp \
    -p 16262:16262/udp \
    -p 27015:27015/tcp \
    --env-file .env \
    -v ./server-files:/project-zomboid \
    -v ./server-data:/project-zomboid-config \
    indifferentbroccoli/projectzomboid-server-docker

Environment Variables

The following environment variables control server behaviour:

Variable Default Info
PUID 1000 User ID the server runs as. Required.
PGID 1000 Group ID the server runs as. Required.
ADMIN_USERNAME admin Admin username
ADMIN_PASSWORD CHANGEME Admin password. Please change this before starting the server.
RCON_PASSWORD RCON password
RCON_PORT 27015 The port for the RCON (Remote Console)
SERVER_NAME pzserver Name of the server/map
DEFAULT_PORT 16261 Default starting port for player data.
UDP_PORT 16262 UDP port. Minimum=0 Maximum=65535
MAX_PLAYERS 32 Maximum number of players that can be on the server at one time.
MEMORY_XMX_GB 8 Server maximum memory allocation in GB. Sets -Xmx in ProjectZomboid64.json
MEMORY_XMS_GB Optional: Server initial memory allocation in GB. Sets -Xms in ProjectZomboid64.json. If not specified, only -Xmx is configured
VM_ARGS Optional: extra JVM args (comma-separated) appended to vmArgs in ProjectZomboid64.json.
UPDATE_ON_START true If set to false, skips downloading and validating server files from Steam on startup. The server will always be installed if start-server.sh is missing.
SERVER_BRANCH "" Steam branch to install (e.g. "unstable" for Build 42 Unstable, "legacy41" for Build 41). Leave empty for the default public branch.
STEAM_VAC true Enable Steam VAC anti-cheat.
USE_STEAM true Whether the server is Steam-enabled.

Configuration Files

These files are stored in your server-data volume (./server-data on the host), under Server/. They persist across container restarts and can be edited directly while the server is stopped.

<SERVER_NAME>.ini

Path: server-data/Server/<SERVER_NAME>.ini

The main server settings file. Controls gameplay options such as PvP, loot respawn, safehouse rules, anti-cheat, player limits, and more. This file is generated by the server on first run. Edit it directly to configure anything not exposed as an environment variable.

<SERVER_NAME>_SandboxVars.lua

Path: server-data/Server/<SERVER_NAME>_SandboxVars.lua

Controls sandbox/world settings such as zombie population, loot abundance, season, time of day, and other in-world difficulty options. Generated by the server on first run. Changes take effect on server restart.

<SERVER_NAME>_spawnregions.lua

Path: server-data/Server/<SERVER_NAME>_spawnregions.lua

Defines the spawn regions available to players when they first join. Each region maps to a named area on the map. You can restrict or expand available spawn points by editing this file. A default is created on first run based on the active map.

Developer information

Building the image

You can build the image from the Dockerfile using the following command:

docker build -t indifferentbroccoli/projectzomboid-server-docker .

Releases

Used by

Contributors

Languages