Updated: 28 September 2026 · Applies to: NRPE 4.1 on AlmaLinux and Rocky Linux 9 and 10 and RHEL 9 and 10 (EPEL); nagios-nrpe-server on Ubuntu 24.04 and 26.04 and Debian 13
NRPE is the small agent that lets a Nagios server run checks on a remote Linux server. This guide covers installing it securely on current systems. The CentOS 6 and 7 steps of older guides (compiling from source, xinetd) are no longer needed: NRPE is packaged and runs as a systemd service. We tested it with NRPE 4.1.2 on AlmaLinux 9. For defining the checks themselves, see how to monitor CPU, disk and load with NRPE and Nagios.
1. Install
dnf install epel-release dnf install nrpe nagios-plugins-disk nagios-plugins-load nagios-plugins-swap nagios-plugins-procs # AlmaLinux, Rocky Linux, RHEL apt install nagios-nrpe-server monitoring-plugins-basic # Ubuntu, Debian
2. Allow only your Nagios server
Edit /etc/nagios/nrpe.cfg:
allowed_hosts=127.0.0.1,::1,203.0.113.50 dont_blame_nrpe=0
allowed_hosts lists who may connect. Keep dont_blame_nrpe=0, so the Nagios server cannot pass arguments into the commands; allowing arguments has led to command injection in the past.
3. Start it and open the port
systemctl enable --now nrpe # AlmaLinux, Rocky Linux, RHEL systemctl enable --now nagios-nrpe-server # Ubuntu, Debian firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="203.0.113.50" port port="5666" protocol="tcp" accept' firewall-cmd --reload
With UFW: ufw allow from 203.0.113.50 to any port 5666 proto tcp. Only the Nagios server needs access; do not open port 5666 to everyone.
4. Test
/usr/lib64/nagios/plugins/check_nrpe -H 127.0.0.1 # on the server itself (Red Hat family path) /usr/lib64/nagios/plugins/check_nrpe -H 203.0.113.10 # from the Nagios server
Both should print the NRPE version, for example NRPE v4.1.2. On Ubuntu and Debian, check_nrpe is in /usr/lib/nagios/plugins/ and comes with the nagios-nrpe-plugin package.
Encryption
NRPE 4 encrypts the connection with TLS by default. For strong authentication, give NRPE and the Nagios server certificates and set ssl_client_certs and the certificate options in nrpe.cfg, as described in NRPE's SSL documentation.
Official documentation: NRPE on GitHub.