41.78.16
This has to do with the supported server.ini settings that can be modified from the docker compose environment variables.
/data/server-file
Project Zomboid server file/data/config
Database and configuration fileExample of docker compose file
version: "3.8"
services:
project-zomboid:
container_name: pzserver
image: pepecitron/projectzomboid-server
restart: unless-stopped
environment:
SERVER_ADMIN_PASSWORD: "pzadmin"
SERVER_PASSWORD: "secretpassword"
ports:
- "8766:8766/udp"
- "8767:8767/udp"
- "16261:16261/udp"
volumes:
- ./data/server-file:/data/server-file
- ./data/config:/data/config
The servers configuration can be set via the servers <SERVER_NAME>.ini
and <SERVER_NAME>_SandboxVars.lua
, which are located at the path of the mounted config volume. The server needs to be restarted for the changes to take effect. Gameserver updates are applied automatically by restarting the container.
Mods can be added by modifying the properties WorkshopItems
and Mods
in the generated .ini
server file.
# List of Workshop Mods must be separated by semicolon
WorkshopItems=2778991696;2392709985;...
Mods=Hydrocraft;tsarslib;...
Newly added mods and updates for existing mods are applied automatically by restarting the container.
Different servers must use different ports, which can be configured individually via the STEAMPORT1
and STEAMPORT2
environment variables. These port-configurations must be reflected in the service's ports
section. To avoid problems during server updates, different volumes should be mounted. The new public gameserver port (16261
, 16262
, etc.) must be used ingame to connect to the new server.
version: "3.8"
services:
server-1:
container_name: pzserver-server-1
image: pepecitron/projectzomboid-server
restart: unless-stopped
environment:
SERVER_NAME: "server-1"
ports:
- "8766:8766/udp"
- "8767:8767/udp"
- "16261:16261/udp"
volumes:
- ./data/server-file-server-1:/data/server-file
- ./data/config:/data/config
server-2:
container_name: pzserver-server-2
image: pepecitron/projectzomboid-server
restart: unless-stopped
environment:
SERVER_NAME: "server-2"
STEAMPORT1: 8768
STEAMPORT2: 8769
ports:
- "8768:8768/udp"
- "8769:8769/udp"
- "16262:16261/udp"
volumes:
- ./data/server-file-server-2:/data/server-file
- ./data/config:/data/config