Talk:Dedicated server

From PZwiki
(Redirected from Talk:Dedicated server)
  1. As a Windows user I have no idea if the Linux portions of this wiki page are still relevant as of 41.65. I kept the information intact anyways until a Linux user can clarify.
  2. Unsure if non-Steam servers still require extra TCP ports open for each player slot. Too lazy to test.

Tripodzomboid:

  1. For Linux users I do not know if Zomboid exits cleanly when catching "SIGTERM" from "# systemctl stop zomboid", and I theorize that it could be responsible for save rollbacks, so I am modifying the wiki to recommend using a FIFO socket, theoretically this should be unnecessary if Zomboid is properly coded to handle SIGTERM from systemd, but it also provides the added benefit of allowing console access to a systemd process.
  2. Arguably, the Zomboid server should be managed in "$HOME", not in /opt/ see, https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s13.html, while Zomboid definitely qualifies as an "add-on" package, I would argue a "Zomboid server" is not a package in the traditional sense, especially since the guide makes "/opt/pzserver" owned by "pzuser" whiles the FHS clearly intends /opt for "local system administrator use", and Zomboid uses the home directory for managing its saves anyways.I am electing not to modify it since I am not confident if I my understanding of the FHS is correct.
  3. While the popularity and superiority of Debian based distros make the Linux guide almost universally applicable, I do think there should be some explanation for other distributions, while adept Linux users should be able to translate the packaging options for their package manager of choice, there are some sneaky killers like "adduser" that is different on different distributions, perhaps there should be a separate server page just for Linux users?


Dan39's notes

  1. I added tmux to the linux startup instructions. I was kind of on the fence about adding anything else that isn't specifically PZ related to this section, since then you start getting into teaching people basic linux admin knowledge, but I noticed the support staff and others link this page all the time to people that are known linux newbs, so figured this was an absolute minimum to run the server. I have noticed a few people complaining about their server dying when the terminal window was closed.
  2. This also brings up the question if we want to add more info to this section, like for auto-restart (just a bash loop?) and daily restarts(something like using cron to send quit command to the tmux instance? then the bash loop would start it back up). There is also the option of forwarding people to another project like LinuxGSM(i use it, but i'm not a huge fan of it to be honest, so i kind of like the idea of just a simple script/cron like i mentioned) or Pterodactyl(see https://pterodactyl.io/ , i haven't use it myself, but it looks quite nice. i've noticed an explosion of popularity of the past few months)
  3. with the devs not recommending it, should the systemd section just be removed? with PZ server having a console, it really doesn't seem like a good way of doing it.
  4. i agree with Tripodzomboid about installing PZ server into a home directory intead of /opt/. This makes even more sense when you think about how PZ installs workshop mods into that folder, so it wouldn't really make sense to have it used as a system-wide install, especially since there are lots of conflicting mods. You may also want to edit the ProjectZomboid64.json or start-server.sh scripts per-server. Is anyone against changing that?
I added a separate discussion section just for Linux. See my thoughts there. Zomboidtripod (talk) 22:14, 25 November 2023 (UTC)

Linux Discussion

I added tmux to the linux startup instructions. I was kind of on the fence about adding anything else that isn't specifically PZ related to this section, since then you start getting into teaching people basic linux admin knowledge, but I noticed the support staff and others link this page all the time to people that are known linux newbs, so figured this was an absolute minimum to run the server. I have noticed a few people complaining about their server dying when the terminal window was closed.

TMUX vs Screen is a religious war. You added tmux first so I think it's fair to keep it that way. But a generic reference to screen or terminal multiplexing in general would be a good idea.

This also brings up the question if we want to add more info to this section, like for auto-restart (just a bash loop?) and daily restarts(something like using cron to send quit command to the tmux instance? then the bash loop would start it back up). There is also the option of forwarding people to another project like LinuxGSM(i use it, but i'm not a huge fan of it to be honest, so i kind of like the idea of just a simple script/cron like i mentioned) or Pterodactyl(see https://pterodactyl.io/ , i haven't use it myself, but it looks quite nice. i've noticed an explosion of popularity of the past few months)

with the devs not recommending it, should the systemd section just be removed? with PZ server having a console, it really doesn't seem like a good way of doing it.

Since you describe these auto restarts and such, all of these things are added very easily with systemd. Personally I use systemd to sandbox my server. If you read the forum discussion you will see more of my thoughts on systemd and the devs thoughts aswell. Most of the issues related to systemd will be fixed with a proper sigterm handler in the Java code.

Third-party software is probably best avoided for the upstream game wiki documentation.

i agree with Tripodzomboid about installing PZ server into a home directory intead of /opt/. This makes even more sense when you think about how PZ installs workshop mods into that folder, so it wouldn't really make sense to have it used as a system-wide install, especially since there are lots of conflicting mods. You may also want to edit the ProjectZomboid64.json or start-server.sh scripts per-server. Is anyone against changing that?

I think the Linux server section should likely be it's own page as currently it's very cluttered, and definitely not very user friendly. Personally I do use /opt/ to manage my server files. Now I've reconsidered and I would think that ideally /home/ should not be writable by the Zomboid server process with SystemD sandboxing, but as you said the way Zomboid manages it's server files doesn't allow this. Either way is fine.

You can sign your talk messages with four tildas, it should help make the discussion a little easier.

https://www.mediawiki.org/wiki/Help:Talk_pages

Zomboidtripod (talk) 22:12, 25 November 2023 (UTC)


So it's probably because I'm modifying the service files for an existing PZ server install, but occasionally when quitting, the zomboid.control fifo will get 'quit' written to it as if it's a normal file, which then causes the server to always quit immediately after it starts.

Any reason to not use the built-in RCON to control the process instead?

ExecStart=/zomboid_directory_here/start-server.sh -servername ServerNameHere
ExecStop=rcon_tool_here -H 127.0.0.1 -P 27015 -p rcon_password quit

Zomzom (talk) 19:36, 2 December 2023 (UTC)

That's because you are managing the service through the service. You should be starting and stopping the server via the socket. The wiki instructions are incorrect, I'll fix it now. Zomboidtripod (talk) 21:27, 2 December 2023 (UTC)

Changes made by Diparcu seem to have an incorrect order of operations. Diparcu says to run `sudo chown pzuser:pzuser /opt/pzserver` before the user pzuser is added to the system. I have no idea how to notify the person of this. Anyone know the proper procedure here? Or should we just fix it? Dan39 (talk)

Well, It's been several days with no fix or response, so I just did it myself. Dan39 (talk) 02:27, 31 December 2023 (UTC)

Thanks for being transparent and asking first, I was having this change on patrolled, but didn't have time to check, so I assume you are right unless someone proves wrong. As far as contacting, you can try leaving a message on their talk page, or sending an e-mail through MediaWiki, or, better yet, talk to all the editors on Discord, questions are easier to keep track there :) —Faalagorn/ 00:26, 4 January 2024 (UTC)

IPv6 Hosting

Will i be able to host a ProjectZomboid Server if i don't have a real public IPv4 (only a shared one via cgnat from ISP) but an IPv6? User:Combreaker

I believe so, though I guess you're better off asking support people on Discord or on the forums, as we'll get less folks looking here! —Faalagorn/ 23:43, 17 February 2024 (UTC)