Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

You can install Nagios Core on Ubuntu 24.04 either by building it from source or by using Ubuntu’s package-based route. This guide follows Nagios’s documented source-build procedure for Ubuntu 22.x and 24.x, including the web interface and plugins. Ubuntu documents a separate APT-based route; use one method rather than mixing their steps.

Choose an installation method

Method What it involves What to keep in mind
Nagios source build Build and install Core and Nagios Plugins using Nagios’s documented commands. Follows the upstream build and gives you control over the build process. You are responsible for managing updates to the source installation.
Ubuntu packages Install and configure Nagios Core 4 through Ubuntu’s documented package route. Uses Ubuntu’s package-management approach. The package names and exact commands are not established in the available Ubuntu 24.04 repository details, so follow Ubuntu’s current instructions rather than guessing.

The rest of this article uses the Nagios source-install guide, which explicitly covers Ubuntu 22.x and 24.x. For the alternative, see Ubuntu’s Nagios installation documentation. Nagios lists Ubuntu 24.04 LTS as supported for Core; its Core product page also lists Ubuntu 20.04 and 22.04 LTS.

Check the server and prerequisites

Nagios publishes minimum requirements of 2 CPU cores, 2 GB RAM, and 20 GB of free disk space. It recommends 4 or more cores and 4 GB or more of RAM for larger deployments. These are general minimums and recommendations, not a guarantee that a particular monitoring workload will fit.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For the source build, Nagios’s Ubuntu procedure calls for build tools and libraries, Apache, PHP, GD development files, OpenSSL development files, and UFW. The documented package list includes autoconf, GCC, libc, make, wget, unzip, Apache, PHP, libgd development files, UFW, OpenSSL, and libssl development files. OpenSSL is required as of Core 4.4.7, according to Nagios’s source-install documentation.

Use the current commands in that guide for the prerequisites, download, build, and installation rather than pinning an unverified release number. The guide’s download behavior tracks the latest release, which can change over time.

Build and install Nagios Core

  1. Install prerequisites. In a terminal on the Ubuntu server, install the dependencies listed in the Nagios source guide. Confirm that the package installation completes before proceeding.
  2. Download and extract Core. Follow the guide’s current download and extraction commands. Its release download is not a fixed version, so do not assume an older copied command still points to the current release.
  3. Configure and compile. Run the documented configure command with the Apache configuration path, then compile the source as shown in the guide. Stop and resolve any missing-library or compiler errors before installing.
  4. Create the service users and groups, then install Core. The source procedure creates the Nagios users and groups, installs the binaries, daemon initialization files, command mode, sample configuration, and Apache configuration.
  5. Configure Apache and the firewall. Enable the Apache modules required by the guide and allow Apache through UFW as directed. Restrict access to the web interface to the networks and users you intend to authorize.
  6. Create the web login and restart Apache. Use the guide’s htpasswd procedure to create the login, then restart Apache using its documented command.

For exact command syntax and the current release download, follow the official Nagios source-build instructions. Do not substitute commands from Nagios’s older Ubuntu quickstart: that quickstart is explicitly based on Ubuntu 14.04 and examples tested with Nagios 4.2.1 and Nagios Plugins 2.1.3, so its package and PHP examples are legacy.

Install Nagios Plugins

Core needs plugins to run checks. After installing Core, use the same Nagios source guide to download, compile, and install Nagios Plugins. Keep the plugin build steps separate from Core’s build; installing Core alone does not complete this part of the setup.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Validate the web interface and a check

  1. Open the Nagios web interface in a browser using the server address and path specified by the installation guide, then sign in with the account created using htpasswd.
  2. Confirm that the interface loads and that the expected Nagios configuration is visible.
  3. Schedule a check from the interface as described in the guide, then verify that the plugin response appears.

If the page does not load, check that Apache is running, the required Apache modules are enabled, and the firewall permits intended access. If the interface opens but a check does not return a plugin result, verify that Nagios Plugins installed successfully and that the check is configured to use the installed plugin.

Secure access before relying on the interface

The basic Apache login and UFW rules in the installation procedure are starting points, not a complete production security design. Decide which users may authenticate and which networks may reach the interface; configure Apache authentication and authorization accordingly, and avoid exposing the interface to networks that do not need it. Ubuntu’s documentation also points administrators to Apache and Nagios guidance for authentication and authorization.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose Core or XI based on how you want to administer monitoring

Nagios Core is free and configured through text files. Nagios XI is a paid product that adds a web-based interface with configuration wizards, dashboards, reports, and professional support. Core is suitable when you are comfortable managing configuration in files; XI is aimed at administrators who want more GUI-led setup and reporting.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.