diff --git a/src/en/server-hosting/setting-up-ss14-watchdog.md b/src/en/server-hosting/setting-up-ss14-watchdog.md index 09e0fe24b..6519545b5 100644 --- a/src/en/server-hosting/setting-up-ss14-watchdog.md +++ b/src/en/server-hosting/setting-up-ss14-watchdog.md @@ -390,6 +390,30 @@ If you are not already aware of how to use systemctl [now would be a good time.] To view logs you can use [journalctl](https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs) from now on. +## Server persistence + +Modifying the watchdog's configuration or updating the watchdog requires it to be restarted, and by default, that means restarting all game servers running under the watchdog. Since commit [`6194ed4`](https://github.com/space-wizards/SS14.Watchdog/commit/6194ed481a6007949b7449dcf7140a1387e2ec2f), the watchdog now supports *server persistence*. This allows it to be independently restarted, without affecting the game servers themselves. + +To configure this, you can add the following to your `appsettings.yml`: + +```yml +Process: + PersistServers: true +``` + +With this set, the watchdog will not shut down game servers when it itself is being shut down, and will try to check for the previous game server process on restart, to resume watching them. + +### Systemd + +When hosting the watchdog as a Systemd service, the above is not enough. With Systemd's default settings, restarting the watchdog would cause Systemd to also kill the game server processes itself. This can be avoided by setting the following in your service definition: + +```ini +[Service] +KillMode=process +``` + +This will make Systemd only stop the main watchdog process, without caring about the game server processes below it. This does, of course, mean that trying to `systemctl stop ss14-watchdog` will not stop game servers, even if they are misbehaving/stuck. + ## General Troubleshooting ### Server keeps restarting every 30 seconds