Skip to content

Instantly share code, notes, and snippets.

@math29
Last active February 17, 2022 11:32
Show Gist options
  • Save math29/907f7967b67a243fcb0b242a73908fd5 to your computer and use it in GitHub Desktop.
Save math29/907f7967b67a243fcb0b242a73908fd5 to your computer and use it in GitHub Desktop.
# Start project zomboid on synology thanks to docker container
# ssh to your synology folder where you want to upload pzserver
mkdir server-data
mkdir server-files
sudo chown 1000:1000 server-data
sudo chown 1000:1000 server-files
# Start here hazzie/lgsmbase:latest manually in Synology Docker (operation not working from terminal, don't know why..)
# Needs to have /home/pzserver/serverfiles mapped to $(pwd)/server-files
# Open hazzie/lgsmbase instance terminal
# From here, let's follow installation guide https://linuxgsm.com/servers/pzserver/
adduser pzserver
chown -R 1000:1000 /home
su - pzserver
wget -O linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh pzserver
./pzserver install
# Then back to Synology ssh
sudo docker run -d --name project-zomboid-dedicated-server \
-e SERVER_NAME="pzDedicatedServer" \
-e ADMIN_PASSWORD="xxx" \
-e SERVER_PASSWORD="xxx" \
-e SERVER_PUBLIC_NAME="New Great World" \
-e SERVER_PUBLIC_DESC="This is the description" \
-v $(pwd)/server-data:/server-data \
-v $(pwd)/server-files:/server-files \
-p 8766:8766/udp \
-p 8767:8767/udp \
-p 16261:16261/udp \
-p 16262-16272:16262-16272 \
-p 27015:27015 \
afey/zomboid
@zsdonny
Copy link

zsdonny commented Feb 13, 2022

This is amazing, I can't believe something I'm stuck on for weeks has a workaround/solution posted hours ago! Thank you for your work!

@math29
Copy link
Author

math29 commented Feb 13, 2022

@hobbesjaap
Copy link

Wow - thanks for doing this! And I feel honoured to be mentioned! :-)

The only command I remember adding, which I don't see listed here, is --shm-size=2g

This because my Synology (could be because it's an old 216+ii model) automatically created a very small java cache (256 mb). This meant the PZ server kept throwing Java errors within a few minutes.

I think (it's been so long now!) I ran the --shm-size=2g command in the final docker run command?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment