Caddy

Restart the service on failure

This will automatically restart the server after 5 seconds if the exit code when crashing was not 1.

To edit the below file, run

sudo systemctl edit caddy
[Service]
RestartPreventExitStatus=1
Restart=on-failure
RestartSec=5s