This repo runs a Project Zomboid dedicated server via Docker and exposes it through Playit.gg using a headless agent.
- Linux host (required for
network_mode: host) - Docker Engine + Docker Compose (plugin)
- A Playit.gg account
- A Playit Agent Secret Key
- (Optional but recommended)
make
Install make (Ubuntu/Debian):
sudo apt update
sudo apt install -y make
-
Create an Agent in Playit and copy its Secret Key.
-
Create ONE UDP tunnel:
- Local Port: 16261
- Port Count: 2 (covers 16261 and 16262)
Do NOT create overlapping tunnels like:
- 16261 count 2 AND 16262 count 2
- Clone the repo
git clone https://github.com/Mirkoffcito/pzomboid.git
cd pzomboid
- Create your local .env
cp .env.example .env nano .env
- Fill at least:
- PLAYIT_SECRET_KEY
- ADMINUSERNAME
- ADMINPASSWORD
- SERVERNAME
Example .env:
PLAYIT_SECRET_KEY=replace_me
STEAMAPPBRANCH=unstable
ADMINUSERNAME=admin
ADMINPASSWORD=ChangeMePlease
SERVERNAME=YourServerName
PORT=16261
- Start the stack
make up
- Follow logs
make logsmake logs-zomboidmake logs-playit
- Stop everything
make down
If you change Dockerfile/build args
make rebuild
RCON is used internally (inside the Docker network). It is not exposed publicly.
-
Run the server once so it generates config under ./data.
-
Edit:
./data/Server/.ini Example: ./data/Server/MyServer.ini
Add:
RCONPort=27015
RCONPassword=12345678
- Restart zomboid:
make restart
- Test RCON manually (players):
make players
- Broadcast a message:
make broadcast MSG="Server restarting in 5 minutes"