Automatic service restart
- Home
- Documentation
- Service restart

If nginx, MySQL or another service goes down in the middle of the night, Resources brings it back up and tells you, without you having to log in to the server.
Which services it restarts
The services detected on Linux servers: nginx, Apache (httpd or apache2), MySQL or MariaDB, PostgreSQL, PHP-FPM, Redis, Memcached, LiteSpeed, Varnish, MongoDB, Dovecot and Postfix. The panel detects the correct unit name for the distribution by itself (httpd or apache2; mariadb, mysqld or mysql; cPanel's php-fpm; PostgreSQL and PHP versions), so there is nothing to configure.
How it decides to restart
- It confirms the outage over several consecutive readings, so it does not act on a failed reading.
- It checks on the server itself with
systemctl is-activethat the service is really stopped. If it is running, it does not touch it. - It restarts the unit over SSH with
systemctl restart. - If the service goes down again right away, it stops and does not keep restarting it in a loop.
- It has an hourly attempt limit for each service.
Alerts and history
- It alerts by e-mail and WhatsApp for every restart and its result (whether the service came back or not), with mutes, maintenance windows and escalation like the rest of the alerts.
- The restart history is in each server's Services tab.
Turning it on and off
- It is on by default for every detected service.
- It is turned off per service or for the whole server, from the Services tab.
- An off setting is always respected: if you turn it off, the panel does not restart that service, even if it goes down.
Permissions: root or one sudoers line
- With the root user nothing is needed.
- With a non-root user, the panel needs to run with sudo only the restart of those units. In the Services tab the panel shows the ready-made line with the detected units. As an example, on the server, with
visudo -f /etc/sudoers.d/reikor-restart:
Cmnd_Alias REIKOR_RESTART = /usr/bin/systemctl restart nginx.service, /usr/bin/systemctl restart mariadb.service, /usr/bin/systemctl restart php-fpm.service
<user> ALL=(root) NOPASSWD: REIKOR_RESTART
Replace <user> with the SSH user you added the server with and the systemctl path with the one command -v systemctl returns. It only authorizes restarting those units, nothing else.
- If the permission is missing, the service stays at Permission missing and no false restart alerts are sent.
Requirements and plans
- Linux servers with Resources. It is not available on Windows servers.
- Available on the same plans as SYN flood defense: the paid plans, not the Free plan. No extra cost. See pricing.
See also add a server, alerts and automatic SYN flood defense.