ProjectZomboid:DedicatedServer
lastmod 2025-02-14created 2023-02-1518 edits
renegademaster/zomboid-dedicated-server
- renegademaster/zomboid-dedicated-server - Docker Image | Docker Hub
- (Server) docker-compose setup - Project Zomboid minor gallery
This image is a "rootless" image, so it must not be run as the root user. Minimal instructions for running the server:
First, create a dedicated folder.
Create two empty folders.
Then copy the contents of "Project Zomboid Dedicated Server" downloaded from Steam into the ZomboidDedicatedServer folder as is.
ZomboidConfig can be empty. (It is generated automatically on first run.)
Pull and run the renegademaster/zomboid-dedicated-server docker image:
# Pull the latest image:
docker pull renegademaster/zomboid-dedicated-server:latest
# Run the server (with bare minimum options):
docker run --detach \
--mount type=bind,source="$(pwd)/ZomboidDedicatedServer",target=/home/steam/ZomboidDedicatedServer \
--mount type=bind,source="$(pwd)/ZomboidConfig",target=/home/steam/Zomboid \
--publish 16261:16261/udp --publish 16262:16262/udp \
--name zomboid-server \
docker.io/renegademaster/zomboid-dedicated-server:latest
Ports
The server can use three ports in total, but only two are required.
| Name | Default port | Description | Required |
| DEFAULT_PORT | 16261 | Port used by the server to listen for connections. | yes |
| RCON_PORT | 27015 | Port used by the server to listen for RCON connections/commands. | no |
| UDP_PORT | 16262 | Additional port used by the server to facilitate client connections. | yes |
Optional environment variables
| Argument | Description | Values | Default |
| ADMIN_PASSWORD | Server Admin account password | [a-zA-Z0-9]+ | changeme |
| ADMIN_USERNAME | Server Admin account username | [a-zA-Z0-9]+ | superuser |
| BIND_IP | IP to bind the server to | 0.0.0.0 | 0.0.0.0 |
| GAME_VERSION | Game version to serve | [a-zA-Z0-9_]+ | public |
| GC_CONFIG | Specifices Java GC to use | [a-zA-Z0-9_]+ | ZGC |
| MAP_NAMES | Map Names (e.g. North;South) | map1;map2;map3 | Muldraugh, KY |
| MAX_RAM | Maximum amount of RAM to be used | ([0-9]+)m | 4096m |
| STEAM_VAC | Use Steam VAC anti-cheat | (true|false) | true |
| TZ | Set the timezone for the container | [A-Z]+ | UTC |
| USE_STEAM | Create a Steam Server, or a Non-Steam Server | (true|false) | true |
Docker-Compose example
version: "3.8"
services:
zomboid-dedicated-server:
build:
context: .
dockerfile: docker/zomboid-dedicated-server.Dockerfile
image: "docker.io/renegademaster/zomboid-dedicated-server:latest"
container_name: zomboid-dedicated-server
restart: "no"
environment:
- "ADMIN_PASSWORD=changeme"
- "ADMIN_USERNAME=superuser"
- "AUTOSAVE_INTERVAL=15"
- "BIND_IP=0.0.0.0"
- "DEFAULT_PORT=16261"
- "GAME_VERSION=public"
- "GC_CONFIG=ZGC"
- "MAP_NAMES=Muldraugh, KY"
- "MAX_PLAYERS=16"
- "MAX_RAM=4096m"
- "MOD_NAMES="
- "MOD_WORKSHOP_IDS="
- "PAUSE_ON_EMPTY=true"
- "PUBLIC_SERVER=true"
- "RCON_PASSWORD=changeme_rcon"
- "RCON_PORT=27015"
- "SERVER_NAME=ZomboidServer"
- "SERVER_PASSWORD="
- "STEAM_VAC=true"
- "UDP_PORT=16262"
- "USE_STEAM=true"
- "TZ=UTC"
ports:
- target: 16261
published: 16261
protocol: udp
- target: 16262
published: 16262
protocol: udp
- target: 27015
published: 27015
protocol: tcp
volumes:
- ./ZomboidDedicatedServer:/home/steam/ZomboidDedicatedServer
- ./ZomboidConfig:/home/steam/Zomboid/
Script I used
#!/usr/bin/env bash
MOD_NAMES="CombatText;FRUsedCarsNLF;FRUsedCarsNRN;FRUsedCars;FRUsedCarsFT;MinimalDisplayBars;modoptions;PlayersOnMap;fastkeys41;firearmmod;TheStar;"
WORKSHOP_ITEMS="1510950729;2004998206;2169435993;2184990011;2256623447;2286124931;2619072426;2732804047;"
docker run -d \
--mount type=bind,source="$(pwd)/server",target=/home/steam/ZomboidDedicatedServer \
--mount type=bind,source="$(pwd)/config",target=/home/steam/Zomboid \
--publish 16261:16261/udp \
--publish 16262:16262/udp \
--name zpserver \
-e "ADMIN_PASSWORD=yourpassword" \
-e "ADMIN_USERNAME=yourname" \
-e "AUTOSAVE_INTERVAL=15" \
-e "BIND_IP=0.0.0.0" \
-e "DEFAULT_PORT=16261" \
-e "GAME_VERSION=public" \
-e "GC_CONFIG=ZGC" \
-e "MAP_NAMES=Muldraugh, KY" \
-e "MAX_PLAYERS=8" \
-e "MAX_RAM=4096m" \
-e "MOD_NAMES=${MOD_NAMES}" \
-e "MOD_WORKSHOP_IDS=${WORKSHOP_ITEMS}" \
-e "PAUSE_ON_EMPTY=true" \
-e "PUBLIC_SERVER=true" \
-e "SERVER_NAME=yourZpServer" \
-e "SERVER_PASSWORD=0000" \
-e "STEAM_VAC=true" \
-e "UDP_PORT=16262" \
-e "USE_STEAM=true" \
-e "TZ=UTC" \
docker.io/renegademaster/zomboid-dedicated-server:latest
Mods
See Project Zomboid#Mods for the list of mods to add.
Just edit two variables in the server.ini file: Mods and WorkshopItems.
# Enter the mod loading ID here. It can be found in \Steam\steamapps\workshop\modID\mods\modName\info.txt
Mods=
#...
# List Workshop Mod IDs for the server to download. Each must be separated by a semicolon. Example: WorkshopItems=514427485;513111049
WorkshopItems=
Note that if you added mods with the docker.io/renegademaster/zomboid-dedicated-server:latest docker image, the required data is downloaded automatically, so there is nothing to worry about.
When other players connect to the server, the related files are downloaded automatically.
| WARNING |
| However, enabling mods that the server does not use will crash the game, so disable other mods whenever possible |
Examples
Mods=CombatText;FRUsedCarsNLF;FRUsedCarsNRN;FRUsedCars;FRUsedCarsFT;MinimalDisplayBars;modoptions;PlayersOnMap;fastkeys41;firearmmod;TheStar;
WorkshopItems=1510950729;2004998206;2169435993;2184990011;2256623447;2286124931;2619072426;2732804047;
Note that when applying maps, they seem(?) to be applied to the map in the order they are listed first.
To add Raven Creek to the existing Muldraugh, enter it as follows:
See also
- Project Zomboid
- ProjectZomboid:DedicatedServer
- ProjectZomboid:ServerINI - server.ini
- ProjectZomboid:SendboxVars - server_SendboxVars.lua
- Blackhole:ProjectZomboid:History - Settings and related info from games I played with friends