Project Zomboid Dedicated Server (uses LinuxGSM and supports AutoUpdate)
100K+
Docker version of the Project Zomboid steam server.
If you feel the urge to support me, feel free to buy me a virtual coffee ;-)
https://www.buymeacoffee.com/evilseed
Create two directories where you want to run your server :
server-data: mandatory if you want to keep configuration between each restartserver-files: optional, contains all the files of the applicationIf you have any errors with the permissions of these two directories, you can adjust it. It could be done with this commands:
chown 1000:1000 server-data
chown 1000:1000 server-files
1000:1000 represent the user and the group of the LinuxGSM_ user that run server in the image.
docker run -d --name project-zomboid \
-e SERVER_NAME="pzserver" \
-e ADMIN_PASSWORD="pzserver-password" \
-v $(pwd)/server-data:/server-data \
-p 8766:8766/udp \
-p 8767:8767/udp \
-p 16261:16261/udp \
-p 16262-16272:16262-16272 \
-p 27015:27015 \
afey/zomboid
Alternatively, you could use Docker Compose with this docker-compose.yml file:
version: "3.7"
services:
project-zomboid:
image: afey/zomboid
restart: unless-stopped
environment:
SERVER_NAME: "pzserver"
ADMIN_PASSWORD: "pzserver-password"
ports:
- "8766:8766/udp"
- "8767:8767/udp"
- "16261:16261/udp"
- "16262-16272:16262-16272"
- "27015:27015"
volumes:
- ./server-data:/server-data
After creating this file, launch the server with docker-compose up.
docker run -d --name project-zomboid \
--network=host \
-e SERVER_NAME="pzserver" \
-e ADMIN_PASSWORD="pzserver-password" \
-v $(pwd)/server-data:/server-data \
afey/zomboid
Alternatively, you could use Docker Compose with this docker-compose.yml file:
version: "3.7"
services:
project-zomboid:
image: afey/zomboid
restart: unless-stopped
environment:
SERVER_NAME: "pzserver"
ADMIN_PASSWORD: "pzserver-password"
network_mode: host
volumes:
- ./server-data:/server-data
After creating this file, launch the server with docker-compose up.
In this network mode, you could specify the IP address of the host instead of letting the program do it automatically.
In the command line, add the parameter -e LGSM_SERVER_CONFIG='ip="xx.xx.xx.xx"'.
In the docker compose file, add this environment variable:
LGSM_SERVER_CONFIG: |
ip="xx.xx.xx.xx"
Once you have run the docker for the first time, you can edit your config file in your mapped directory /server-data/Server/$SERVER_NAME.ini. When it's done, restart your server.
Some of options are not used in these two examples. Look below if you want to adjust your settings.
STEAM_PORT_1, STEAM_PORT_2, RCON_PORT, RCON_PASSWORD, SERVER_PASSWORD, SERVER_PUBLIC_NAME, SERVER_PUBLIC_DESC and SERVER_PORT are optional if you have access to the file /server-data/Server/$SERVER_NAME.ini where the values are.
SERVER_BRANCH, SERVER_BETA_PASSWORD and ADMIN_PASSWORD are not used if these values are set by LGSM_COMMON_CONFIG, LGSM_COMMON_CONFIG_FILE, LGSM_SERVER_CONFIG or LGSM_SERVER_CONFIG_FILE. These 4 variables from cyrale/linuxgsm can override default settings from LinuxGSM_: _default.cfg.
You need to bind X ports for client connection. (Example: If you have 10 slots, you need to put -p 16262-16272:16262-16272, if you have 100 slots, you need to put -p 16262-16362:16262-16362).
Check out the reddit post: https://www.reddit.com/r/projectzomboid/comments/reemg5/b41_mp_dedicated_server_working_docker_image/
This image was originally created by Cyrale, thank you for your effort. (https://github.com/cyrale)
I just took his images and updated them, because he stopped maintaining them.
Content type
Image
Digest
Size
291 MB
Last updated
almost 5 years ago
docker pull afey/zomboid