Website Vidya
Linux & ServersStep-by-Step Guide

How to Install and Configure Zabbix on Ubuntu 24.04

Learn how to install and configure Zabbix on Ubuntu 24.04 LTS with PostgreSQL or MariaDB, Nginx web frontend, and Zabbix agent for server monitoring.

RR
Rajesh RayLead Systems Educator
Published:
6 min read
PDF Cheat Sheet
How to Install and Configure Zabbix on Ubuntu 24.04
AI Executive SummaryWebsiteVidya AI

6 min read

Learn how to install and configure Zabbix on Ubuntu 24.04 LTS with PostgreSQL or MariaDB, Nginx web frontend, and Zabbix agent for server monitoring.

Key Highlights
  • Prerequisites and Supported Releases
  • Step 1: Updating System Packages and Adding the Official Zabbix Repository
  • Step 2: Installing Zabbix Server, Frontend, and Agent Packages
Grounded in full engineering runbookWebsiteVidya AI Engine

Zabbix is an enterprise-class, open-source distributed monitoring solution engineered to track the availability, health, and performance of millions of metrics collected from servers, virtual machines, cloud instances, network switches, and databases in real time. Boasting high scalability, agent-based and agentless polling (via SNMP and IPMI), customizable alert triggers, and flexible notification integrations (email, Slack, Webhooks), Zabbix gives IT infrastructure teams complete visibility into their digital operations.

Deploying Zabbix 7.0 LTS on Ubuntu 24.04 LTS creates a robust, self-hosted monitoring command center with long-term vendor support, PostgreSQL timescaledb performance, and a sleek web console. Understanding how to install and configure zabbix on ubuntu 24.04 allows systems administrators to establish real-time distributed telemetry, automated alert notifications, and historical performance graphing.

In this step-by-step tutorial, we demonstrate how to install and configure Zabbix on Ubuntu 24.04 LTS (Noble Numbat). We cover importing the official Zabbix 7.0 LTS package repository, installing the Zabbix server, web frontend, and Zabbix agent, provisioning a dedicated PostgreSQL database, importing initial schemas, configuring daemon parameters in /etc/zabbix/zabbix_server.conf, and completing the web frontend setup wizard.

Advertisement

Prerequisites and Supported Releases

This guide is thoroughly verified on Ubuntu 24.04 LTS (Noble Numbat). The instructions apply cleanly to cloud instances (AWS EC2, Google Compute Engine, DigitalOcean, Hetzner), bare-metal servers, and local virtual machines.

Before proceeding, ensure you have the following requirements satisfied:

  • A cloud server, VPS, or dedicated machine running Ubuntu 24.04 LTS.
  • A non-root user account configured with administrative sudo privileges.
  • A registered domain name or static IP address to access the Zabbix monitoring dashboard.
  • At least 2 GB of RAM (4 GB recommended for monitoring multiple remote hosts and storing metrics history).

Step 1: Updating System Packages and Adding the Official Zabbix Repository

Before installing Zabbix, update your local APT repository index and upgrade installed packages.

The official Zabbix 7.0 LTS repository provides optimized, up-to-date packages for Ubuntu 24.04 (Noble Numbat).

Advertisement

Download the official Zabbix repository release package directly from the Zabbix distribution servers.

Install the release package using dpkg and refresh your APT package lists.

# Update APT package repositories
sudo apt update && sudo apt upgrade -y

# Download official Zabbix 7.0 LTS repository package
cd /tmp
wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.0+ubuntu24.04_all.deb

# Install repository package
sudo dpkg -i zabbix-release_latest_7.0+ubuntu24.04_all.deb

# Refresh local package index
sudo apt update

# Clean up temporary installer
rm -f zabbix-release_latest_7.0+ubuntu24.04_all.deb

Step 2: Installing Zabbix Server, Frontend, and Agent Packages

Install the core Zabbix server daemon, Apache web frontend integration, and the local Zabbix agent using APT.

In this guide, we use PostgreSQL as the backend relational database, which provides exceptional scalability and native support for TimescaleDB partitioning.

Advertisement

Install zabbix-server-pgsql, zabbix-frontend-php, php8.3-pgsql, zabbix-apache-conf, zabbix-sql-scripts, and zabbix-agent.

# Install Zabbix server with PostgreSQL, Apache frontend, and agent
sudo apt install -y zabbix-server-pgsql zabbix-frontend-php php8.3-pgsql zabbix-apache-conf zabbix-sql-scripts zabbix-agent postgresql

Step 3: Creating Dedicated PostgreSQL Database and User for Zabbix

Next, configure a dedicated database and database user inside PostgreSQL for the Zabbix server.

Switch to the default postgres system administrative user and open the psql shell.

Create a database user named zabbix with a strong password, and create a database named zabbix owned by the user with UTF8 encoding.

Exit the PostgreSQL shell.

# Switch to postgres user and open psql
sudo -u postgres psql

# In psql prompt, execute:
CREATE USER zabbix WITH PASSWORD 'StrongZabbixPass123!';
CREATE DATABASE zabbix OWNER zabbix ENCODING 'UTF8';
\q

Step 4: Importing the Initial Zabbix Database Schema

The Zabbix package provides a pre-compressed SQL script containing all necessary database tables, constraints, foreign keys, and default metrics definitions.

Import the initial schema into the newly created zabbix database using zcat.

When prompted, enter the password you defined for the zabbix database user in Step 3.

This import process may take one to two minutes depending on your disk I/O performance.

# Import initial database schema (prompts for zabbix user password)
zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix

Step 5: Configuring Database Credentials in zabbix_server.conf

Configure the Zabbix server daemon to communicate with your PostgreSQL database.

Open the server configuration file at /etc/zabbix/zabbix_server.conf with administrative privileges.

Locate the DBPassword parameter, uncomment it, and specify the password you assigned to the zabbix database user.

Save and close the configuration file.

# Set DBPassword in /etc/zabbix/zabbix_server.conf
sudo sed -i 's/# DBPassword=/DBPassword=StrongZabbixPass123!/' /etc/zabbix/zabbix_server.conf

# Verify active DB settings in configuration file
grep -E '^DB(Host|Name|User|Password)=' /etc/zabbix/zabbix_server.conf

Step 6: Configuring UFW Firewall for Zabbix Ports

Zabbix uses port 10051 (TCP) for the Zabbix server to receive metrics from active agents and proxies, and port 10050 (TCP) for the local agent to listen for server polls.

Additionally, the Apache web frontend operates on standard HTTP port 80 and HTTPS port 443.

Allow the necessary ports in Ubuntu's Uncomplicated Firewall (UFW).

# Allow web traffic
sudo ufw allow 80/tcp comment 'HTTP Web'
sudo ufw allow 443/tcp comment 'HTTPS Web'

# Allow Zabbix server and agent communication
sudo ufw allow 10051/tcp comment 'Zabbix Server Trapper'
sudo ufw allow 10050/tcp comment 'Zabbix Agent'

# Verify active firewall status
sudo ufw status numbered

Step 7: Starting and Enabling Zabbix Daemons

Start the Zabbix server daemon, the Zabbix agent daemon, and the Apache web server.

Enable all three services to launch automatically at system boot.

Confirm that the zabbix-server service is actively running and tail the log file at /var/log/zabbix/zabbix_server.log to ensure no database connection errors occur.

# Restart and enable services
sudo systemctl restart zabbix-server zabbix-agent apache2
sudo systemctl enable zabbix-server zabbix-agent apache2

# Verify service status
sudo systemctl status zabbix-server zabbix-agent --no-pager

# Inspect recent log entries
sudo tail -n 20 /var/log/zabbix/zabbix_server.log

Step 8: Completing the Zabbix Web Setup Wizard

Open your web browser and navigate to http:///zabbix to launch the web installation wizard.

Step 1: Select your default language and click Next step.

Step 2: Check prerequisites; ensure all PHP parameters (such as post_max_size and max_execution_time) report green 'OK' statuses.

Step 3: Configure DB connection; select PostgreSQL, verify database host (localhost), port (5432), database name (zabbix), user (zabbix), and enter your database password.

Step 4: Configure server name and timezone, then complete the wizard.

At the login screen, enter the default administrative credentials: username Admin (case-sensitive) and password zabbix.

Web URL: http://<server_ip>/zabbix
Default Administrator Username: Admin
Default Administrator Password: zabbix
Immediate Action: Navigate to User Settings > Profile to change the default password.

Troubleshooting and Common Errors

When configuring Ubuntu servers, unexpected permission errors, network timeouts, or lock contention can occur. Review these common issues and verified resolutions:

Zabbix server service fails to start: 'cannot connect to [[localhost]:5432]: FATAL: password authentication failed'

Resolution: Verify the DBPassword in /etc/zabbix/zabbix_server.conf matches the PostgreSQL user password set in Step 3. Test connectivity manually: psql -h localhost -U zabbix -d zabbix.

Zabbix web frontend displays 'Zabbix server is not running: the information displayed may not be current'

Resolution: Check the server log at /var/log/zabbix/zabbix_server.log. Verify that SELinux or AppArmor is not blocking network sockets, and confirm port 10051 is listening: sudo ss -tulpn | grep 10051.

Web installer reports PHP prerequisite errors (e.g., 'max_execution_time' or 'memory_limit')

Resolution: Edit /etc/php/8.3/apache2/php.ini, set max_execution_time = 300, memory_limit = 256M, and restart Apache: sudo systemctl restart apache2.

Security Best Practices and Hardening

Change the default administrative password for the 'Admin' user immediately after initial sign-in.

Never run the Zabbix server daemon under the root user; the package automatically manages the unprivileged 'zabbix' system user.

Secure the Apache web frontend with Let's Encrypt TLS encryption using Certbot to protect monitoring credentials and telemetry in transit.

Configure TLS PSK (Pre-Shared Key) or certificate-based encryption between remote Zabbix agents and the central Zabbix server.

Deepen your Linux system administration skills with our related production-tested guides:

Authoritative References and Official Documentation

Frequently Asked Questions

Quick answers to common questions and configurations

3 FAQs
Install the zabbix-agent package on the remote host, specify your Zabbix server IP in /etc/zabbix/zabbix_agentd.conf, and add the remote host in the Zabbix Web UI under Data collection > Hosts.
Yes. Zabbix is released under the AGPLv3 open-source license, permitting free commercial deployment and monitoring without node limits or feature gates.
Because you registered the official Zabbix repository in Step 1, minor updates are installed via sudo apt update && sudo apt upgrade. The Zabbix server automatically executes database schema upgrades upon startup.
RR
Written byVerified Author

Rajesh Ray

I’m Rajesh Rai, a full-stack developer, Linux administrator, and technology enthusiast passionate about making complex technology easier to understand and use.

SPAM-FREE MODERATED DISCOURSE

Join the Conversation & Perspective

Have thoughts, counterpoints, or reflections on this story? Engage directly with fellow readers and editorial contributors.

AT
MP
JV
+2

No comments on this guide yet. Be the first to share your thoughts or ask a question!

Recommended Reading10 Guides

Related Technical Guides

Tested runbooks, server administration walkthroughs, and troubleshooting guides

Featured Infrastructure PartnerUp to 75% OFF + 3 Months Free

Supercharge Your Linux & Cloud Workloads with Hostinger

Deploy high-speed NVMe KVM VPS, Docker containers, and LiteSpeed-accelerated WordPress servers in under 60 seconds with full root access, dedicated IPv4, and 24/7 technical support.

Pure NVMe SSD StorageFull Root Access & SSHFree Domain & Unlimited SSL99.9% Uptime SLA
Plans from$2.99/mo
Claim Hostinger DealAffiliate link • Special discount applied at checkout