Setting Up a Project Zomboid Server with Docker
Docker is a practical way to isolate a Project Zomboid server from the rest of your machine. It gives you a repeatable runtime, simple file mounts for saves and configs, and an easier upgrade path than hand-maintaining every dependency on the host operating system.
Why Docker Works Well For Zomboid
| Isolation | The server runs inside its own container, which keeps Java, configs, and restart behavior separate from the rest of your desktop or VPS. |
|---|---|
| Persistence | Your save data should live in a mounted volume so updates or container rebuilds do not erase the world. |
| Repeatability | A compose file makes it easy to rebuild the same server on a different machine or after a bad upgrade. |
Desktop Workflow
- Install Docker Desktop and confirm the daemon is running before you touch any game files.
- Pull a maintained Project Zomboid image from a source you trust and read its environment-variable documentation first.
- Create a named container and map your save directory to a persistent host folder.
- Expose the server UDP ports used by your current player count and test locally before you invite anyone else.
- Watch the first boot logs carefully. That first launch often creates the world, config folders, and admin password state you will use later.
Compose Example
version: "3.8"
services:
pz-server:
image: afey/zomboid
container_name: pz_server
ports:
- "16261:16261/udp"
- "16262:16262/udp"
volumes:
- ./pz-data:/home/steam/Zomboid
environment:
- SERVER_NAME=MyDockerServer
- ADMIN_PASSWORD=ChooseAStrongPassword
restart: unless-stopped
What To Verify After First Boot
- The world folder was created inside your mounted volume, not inside the container filesystem.
- The expected UDP ports are published and reachable from the local network.
- The server survives a container restart without losing the save or resetting admin state.
- Log timestamps and memory behavior still look healthy after a few minutes of idle runtime.
Internet Access Checklist
If friends will connect from outside your home network, forward the required UDP ports to the host machine running Docker and make sure the host firewall allows them. Test from an external client before you advertise the server publicly, because local LAN tests do not prove that the router path is working.
Want the same container-style operational discipline without managing it at home? Launch your Project Zomboid server with Supercraft.