Testing still. fork from cyrale/project-zomboid
394
⚠️
Sorry, I have no more time to maintain this project and I no longer play ProjectZomboid to properly follow its progress. Feel free to fork this project and continue this work on your side.
I have forked this. No changes have been made so far as it all still seems to be working.
Docker version of the Project Zomboid steam server.
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 \
atvfool/project-zomboid
Alternatively, you could use Docker Compose with this docker-compose.yml file:
version: "3.7"
services:
project-zomboid:
image: atvfool/project-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 \
atvfool/project-zomboid
Alternatively, you could use Docker Compose with this docker-compose.yml file:
version: "3.7"
services:
project-zomboid:
image: atvfool/project-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.
Some variables are inherited from atvfool/linuxgsm.
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 atvfool/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).
Content type
Image
Digest
Size
246.2 MB
Last updated
over 4 years ago
docker pull atvfool/project-zomboid