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

Use Icinga 2 as the monitoring engine and Icinga Web as its browser interface. On a single Ubuntu VPS, a practical stack consists of Icinga 2, Icinga DB, Redis, a SQL database, Icinga Web and, optionally, Icinga DB Web and Icinga Director. Icinga 2 runs checks and publishes state changes; Redis transports data; the Icinga DB daemon writes monitoring data to SQL; and the web modules display and manage that data.

This walkthrough uses Ubuntu 24.04 LTS (Noble Numbat) as the example. Repository names, signing-key paths and package availability change between Ubuntu releases, so verify the current Icinga repository instructions for your release immediately before running the installation.

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

What you are installing

Icinga is not one package with one purpose. The components have separate jobs:

  • Icinga 2: the core scheduler and checker. It evaluates host and service checks, records state, sends notifications and exposes the API.
  • Icinga DB: the current data path made up of Icinga 2’s publishing feature, the Icinga DB daemon and the web module. It moves monitoring events into a SQL database.
  • Redis: the fast transport used by the Icinga DB data path. On a small installation it can run locally and listen only on the VPS.
  • Icinga Web: the PHP web application that provides authentication, dashboards, status views and configuration access.
  • Icinga DB Web: the web module that reads current monitoring data through Icinga DB.
  • Icinga Director (optional): a structured interface and automation workflow for managing hosts, services, templates and deployment instead of editing files alone.

A SQL database is mandatory for the monitoring data collected by Icinga. Co-locating every component on one VPS is the simplest topology for a small environment; split the database, Redis or web tier later when isolation, capacity or high availability justifies the extra operational work.

Requirements and preparation

Choose and identify the VPS

Use a supported Ubuntu VPS with administrative access, a stable fully qualified hostname and enough disk space for your expected history and logs. Create DNS for the hostname if people will reach the interface from the internet. Confirm the release and codename before adding any repository:

cat /etc/os-release
hostnamectl
hostname -f

The example in this guide is Ubuntu 24.04 LTS, codename noble. Do not substitute noble into a different release’s repository entry. The current Icinga Ubuntu guide should be treated as authoritative for the repository line and keyring path.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

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

Plan network access before installation

  • Allow SSH only from your administration networks, preferably with keys rather than passwords.
  • Allow HTTPS (TCP 443) to the web interface only from users or networks that need it.
  • Keep the Icinga API, Redis and SQL ports private. They should not be open to the public internet.
  • If remote agents will connect, decide which source addresses may reach the Icinga API and agent endpoints.
  • Use a DNS name and TLS certificate before exposing the setup wizard publicly.

Apply host-firewall rules with your distribution’s normal firewall tooling, and verify the rules from a separate session before ending your current SSH connection.

Update Ubuntu and add the Icinga repository

Update the operating system first so that dependencies and security fixes are current:

sudo apt update
sudo apt full-upgrade -y

Install the tools required to trust and retrieve an HTTPS package repository:

sudo apt install -y apt-transport-https wget gnupg

Icinga recommends its official repositories rather than relying on an older distribution package. Follow the current Ubuntu installation page to download and install Icinga’s archive keyring, then create the repository entry using the codename returned by /etc/os-release. Because keyring locations and repository components are release-sensitive, copy that current command exactly instead of reusing a line from an older tutorial.

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

After the entry is in place, refresh package metadata and confirm that the Icinga packages are visible:

sudo apt update
apt-cache policy icinga2

If the candidate version is missing, stop here. Check the codename, repository file, keyring permissions and system clock before attempting installation.

Install and initialize Icinga 2

Install the monitoring engine from the repository:

sudo apt install -y icinga2

Enable the API feature. The API is used by the web interface, agents and administration tools, so initialize it even when the first checks will run locally:

sudo icinga2 api setup
sudo systemctl restart icinga2
sudo systemctl enable icinga2

Check the service and inspect recent errors:

sudo systemctl status icinga2 --no-pager
sudo journalctl -u icinga2 -n 100 --no-pager

Keep the generated API credentials and certificates private. You will use the API endpoint and certificate material when connecting Icinga Web, Icinga DB or additional agents.

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

Build the Icinga DB data path

Install and protect Redis

Install Redis on the VPS when you are keeping the components together:

sudo apt install -y redis-server
sudo systemctl enable --now redis-server
sudo systemctl status redis-server --no-pager

For a single-node setup, bind Redis to the loopback address or another private interface and enable authentication or an ACL as supported by your installed Redis version. Never expose an unauthenticated Redis listener to the internet. If Redis is on another host, use a private network, TLS where available and credentials stored outside public configuration snippets.

Enable Icinga 2 publishing

Enable the Icinga DB feature on the Icinga 2 master (a single VPS acts as its own master), then restart the engine:

sudo icinga2 feature enable icingadb
sudo systemctl restart icinga2

Configure the Redis endpoint and credentials in the generated Icinga DB feature configuration when they differ from the local defaults. Validate the configuration before restarting after edits:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo icinga2 daemon -C

Install the Icinga DB daemon and SQL integration

Install the Icinga DB daemon package and follow the version-matched component guide for its database schema and connection settings. The daemon consumes data from Redis and synchronizes it into SQL; Icinga Web does not replace this daemon. Configure the SQL host, database name, user and password with least privilege, then enable and start the daemon:

sudo systemctl enable --now icingadb
sudo systemctl status icingadb --no-pager
sudo journalctl -u icingadb -n 100 --no-pager

Create the schema using the migration or import command documented for the exact Icinga DB release you installed. Do not copy a schema from a different major release. A healthy data path has no persistent errors in the Icinga 2, Redis or Icinga DB logs and begins writing current events to SQL.

Install Icinga Web on Ubuntu

Choose Apache or Nginx

Icinga Web requires Icinga 2 and Icinga DB, a web server, PHP 7.2 or newer and MariaDB (or another SQL backend explicitly supported by the current component documentation). Apache is the shortest Ubuntu path because the package supplies an Apache configuration. Nginx is appropriate when your VPS already standardizes on PHP-FPM and a reverse-proxy layout.

Choice Installation approach Trade-off
Apache Install icingaweb2, icingacli and libapache2-mod-php; the package provides an Apache configuration. Fastest path on a new Ubuntu VPS with fewer web-server decisions.
Nginx Install Icinga Web and PHP-FPM, then generate a starting configuration with icingacli setup config webserver nginx --document-root /usr/share/icingaweb2/public. Fits an existing Nginx/PHP-FPM standard but requires you to adapt TLS, server names and socket paths.

Apache installation

sudo apt install -y icingaweb2 icingacli libapache2-mod-php
sudo systemctl enable --now apache2

Install any PHP extensions requested by the package or setup wizard, then restart Apache after enabling them:

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

Nginx installation

Install Nginx, PHP-FPM and the Icinga Web packages using the versions supplied for your Ubuntu release. Generate the baseline server configuration:

sudo icingacli setup config webserver nginx --document-root /usr/share/icingaweb2/public

Place the generated configuration in your Nginx site layout, set the correct PHP-FPM socket, add your hostname and configure TLS. Test before reloading:

sudo nginx -t
sudo systemctl reload nginx

Create the Icinga Web database and setup token

Create a least-privilege MariaDB database

The browser wizard needs a database resource, but the documented local flow does not create the database and user through the Unix socket. Prepare them first in MariaDB (use a different, strong password in your environment):

sudo mariadb
CREATE DATABASE icingaweb2 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'icingaweb2'@'localhost' IDENTIFIED BY 'use-a-unique-secret';
GRANT ALL PRIVILEGES ON icingaweb2.* TO 'icingaweb2'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Use the SQL backend and version combinations supported by the current Icinga Web release. Keep the password in your secret-management process rather than publishing it in shell history or documentation.

Generate the setup token

Create the one-time token that authorizes the initial web wizard:

sudo icingacli setup token create

If you lose the output, display the existing token:

sudo icingacli setup token show

Treat the token as a secret during provisioning. It is not a substitute for normal user authentication and should not be pasted into tickets, screenshots or public notes.

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

Complete the browser setup

  1. Finish TLS and the web-server virtual host first. Browse to https://your-hostname/icingaweb2/setup.
  2. Enter the setup token generated with icingacli.
  3. Let the wizard check PHP modules. If it reports a missing extension, install the Ubuntu package named by the current requirements, restart Apache or PHP-FPM, and reload the page.
  4. Select the database resource for icingaweb2 and enter the MariaDB hostname, database name, user and password.
  5. Choose the authentication method and create the first administrative account. Use a unique password and avoid sharing the account.
  6. Configure the monitoring module and the Icinga DB Web module when offered. Point the monitoring integration at the Icinga 2 API and provide the certificate credentials created during API setup.
  7. Complete the wizard, sign in, and verify that the dashboard displays current host and service state rather than an empty data source.

If the wizard still reports missing packages after installation, check the PHP version loaded by the web server, not only the version returned by a command-line PHP binary. Restart the web service after every PHP-module change.

Add the VPS and monitor another server

Monitor the Icinga VPS itself

Define the installation host as a host object and start with checks that reveal failures affecting the monitoring system:

  • ICMP or TCP reachability, where permitted by your network.
  • Root and data-filesystem usage, inode usage and disk health.
  • Load, memory pressure and swap activity.
  • Running state of icinga2, icingadb, Redis and the web server.
  • HTTPS certificate expiry and the response from the Icinga Web URL.
  • SQL connectivity and available disk space for monitoring history.

Use templates and service groups so that common checks are defined once and applied consistently. Begin with files and the CLI when you need transparent, reviewable configuration; introduce Icinga Director when a team needs a structured UI, imports or repeatable automation.

Monitor a remote Linux or Windows server with an agent

Install the Icinga agent on the remote machine when checks need local visibility into disks, processes, memory or operating-system counters. Establish the API trust relationship with the master, exchange certificates securely and restrict the agent’s listener to the monitoring network. Define the endpoint and zone on the master, then assign host and service objects to it.

Free tools Windows power users keep installed

One-click scans. No signup required.

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

Use network checks without an agent

For a reachable service, an agent may be unnecessary. Use network and application checks for HTTP, HTTPS, DNS, SMTP, database ports and other exposed endpoints. These checks show what a client can reach; they cannot inspect private disk, process or operating-system state. Combine both approaches when external availability and internal health are important.

Keep API passwords, agent certificates and database credentials out of examples and source repositories. Store them using your normal secret-management process and rotate them when administrators or infrastructure change.

Topology and configuration choices

Decision Option A Option B Practical result
Web server Apache package path Nginx with generated configuration and PHP-FPM Apache is quicker on a clean Ubuntu VPS; Nginx fits an existing reverse-proxy standard but needs more tuning.
Component placement All components on one VPS Separate SQL, Redis and web or build a highly available design One node is simpler and cheaper to operate; separation improves isolation and scaling but adds network, backup and maintenance work.
SQL backend MySQL or MariaDB versions supported by the installed release Another backend only when the current component guide explicitly supports it Match the exact schema and version matrix; do not assume compatibility from a generic PHP database driver.
Configuration workflow Files and CLI Icinga Director Files are transparent and easy to review; Director supplies structured objects, imports and a UI workflow.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Backups, upgrades and recovery

Back up configuration, trust material, runtime state and data separately so that a lost VPS can be rebuilt:

  • /etc/icinga2 — Icinga 2 configuration and feature settings.
  • /var/lib/icinga2/ca — the master CA key pair. Losing the CA changes the recovery and certificate-trust process.
  • /var/lib/icinga2/certs — node certificates and keys.
  • /var/lib/icinga2 — runtime files that your installed release identifies as persistent.
  • The SQL database containing Icinga DB and Icinga Web data.
  • Redis persistence, if your topology and retention policy rely on it.

Protect backups as carefully as live certificates and passwords. Test a restoration on a separate host, including SQL import, certificate placement, file ownership and service startup. Patch Ubuntu and Icinga packages on a schedule, read release notes before major upgrades and monitor disk space: SQL history, logs and performance data can silently consume a small VPS.

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

Security checklist before public access

  • Serve Icinga Web only over HTTPS with a valid certificate.
  • Restrict the setup URL after provisioning through web-server rules or an administrative network boundary.
  • Limit API, Redis and SQL listeners to trusted addresses; do not publish them through the VPS firewall.
  • Use unique, long credentials for SQL, Icinga Web users and API clients.
  • Rotate credentials and revoke certificates when staff or hosts are removed.
  • Keep the setup token, CA private key and agent keys out of logs, screenshots and public repositories.
  • Review web-server, PHP, Icinga and database logs after every configuration change.

Troubleshooting common installation failures

apt update cannot find Icinga packages

Confirm that the repository codename matches Ubuntu 24.04’s noble value, that the current signing keyring is installed and readable, and that the system clock is correct. Run apt-cache policy icinga2 and inspect the repository file before retrying.

Icinga 2 will not restart

Run sudo icinga2 daemon -C to identify syntax or feature errors, then inspect journalctl -u icinga2. A malformed endpoint, duplicate object name or incorrect certificate path must be corrected before the service can start.

Icinga DB shows no monitoring data

Check all three links: Icinga 2 must have the icingadb feature enabled, Redis must be reachable and authenticated, and the Icinga DB daemon must be connected to the SQL database with the correct schema. Review both service logs and verify that the SQL database is receiving new rows.

The setup wizard rejects the token

Run sudo icingacli setup token show on the same host, copy the value exactly and confirm that the web user can read the setup state. Generate a new token only when necessary, and remove access to the setup endpoint after provisioning.

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

The page loads but PHP errors appear

Check the PHP version and extensions loaded by Apache or PHP-FPM, install the missing module named by the wizard, restart the relevant service and reload the setup page. With Nginx, verify the PHP-FPM socket and the generated document root /usr/share/icingaweb2/public.

What a successful installation looks like

You should be able to sign in to Icinga Web over HTTPS, see the local VPS as a monitored host, view current check results and find no recurring errors in the Icinga 2, Icinga DB, Redis, SQL or web-server logs. Add one remote host or service as a controlled test, confirm that an intentional test failure changes state and recovers, then document the objects, credentials, firewall rules and restore procedure for the people who will operate the system.

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.