Project Zomboid

Project Zomboid

anyone have a server auto restart solution?
so been looking online for a server restart solution. (i really wish there was an option in game for this) but everything i find is quite old

i want an option that will shut down and then update and restart a Project Zomboid server either at a regular interval or if possible if a script detects a mod update. but i cant seem to find a solution to this. so i decided to come here and ask. any server owners/runners have a solution that they can share?
< >
Showing 1-2 of 2 comments
In linux it's a breeze. First, start a screen session to actuallyrun your dedicated server from:

screen -R zomboid

Hold ctrl and then press a and then d to go back to the normal bash window.

Now that you have that screen setup, just put something like this in your crontab -e to restart every 8 hours:

55 1,9,17 * * * screen -S zomboid -p 0 -X stuff "servermsg \"----- Server Restarting in 5 Minutes -----\"^M"
0 2,10,18 * * * screen -S zomboid -p 0 -X stuff "quit^M"
1 2,10,18 * * * screen -S zomboid -p 0 -X stuff "./pzserver/start-server.sh -servername XXXXXX^M"

Obviously use your server's correct path as well as your server name. ^M send an "enter" command.

The only time this won't work is if you left gibberish characters in your dedicated server's window before this runs.
Last edited by MrBananaMan; Apr 4 @ 1:22pm
< >
Showing 1-2 of 2 comments
Per page: 1530 50

Date Posted: Jun 4, 2022 @ 6:31pm
Posts: 2