SSD Nodes Learn Hosting plans →
How to do am Matt ConnorBy Matt Connor · Updated 2026-08-07

How to Install Zabbix 7.0 on Ubuntu 24.04

Install Zabbix 7.0 LTS for Ubuntu 24.04: add repo, import MySQL schema, configure nginx and agent2, then fix common setup errors wey fit block login.

Wetin you dey build

One Ubuntu 24.04 VPS wey dey run the complete Zabbix 7.0 LTS stack: the zabbix-server daemon wey dey poll and send alerts, MariaDB/MySQL database wey dey store every metric, PHP frontend wey nginx dey serve, and zabbix-agent2 wey dey collect metrics from the machine itself. Once e don start well, point am to another server, attach template, and you go get email immediately disk fill or service stop.

Zabbix heavy pass status-page tool: na real time-series system wey get templates, triggers, escalation, and history retention. Most of the wahala dey inside 3 steps wey people dey skip: import the database schema, set the database password wey the server actually dey read, and uncomment 2 lines for nginx config. If you do those ones correctly, the remaining work na wizard. If na only up/down checks and shareable status page you want, lightweight Uptime Kuma status monitor fit do am inside one container; Zabbix worth the extra weight when you need per-metric thresholds and escalation across plenty hosts.

Use the 7.0 LTS line: the server, frontend, agent2, and schema versions dey match, and e go continue to get security fixes for years. Before you copy the repository filename below, check the official Zabbix download page small. The latest release package always resolve to the newest 7.0 point release, but if you prefer to pin exact 7.0-N build, the page list that filename too. Every other command here stable across the complete 7.0 line.

Sizing, ports and prerequisites

Assume say na fresh Ubuntu 24.04 KVM VPS wey get root or sudo. Make we dey realistic about resources: 2 GB RAM and two vCPUs na the practical minimum for server, database, nginx and PHP wey dey one box and dey monitor small number of hosts. 1 GB box go boot, but database go lack memory as history dey grow. Plan for 4 GB once you pass some dozen hosts. If hosts pass hundred, move database go its own server. Disk usage dey grow based on how many items you collect and how long you keep history. Budget some gigabytes to start. The housekeeper go prune old data based on the retention windows wey you set.

Ports: 80 and 443 for the frontend. You fit make dem public or restrict dem to your own IP. The server listens on TCP 10051 for active agents wey dey push data come in. Each agent listens on TCP 10050 for the server wey dey poll am. If firewall dey in front, open only the ports wey you expose. E good make you get DNS A record for the frontend, because you go want real certificate for there. Since Zabbix box dey watch every other service wey you run, e belong for the wider self-hosting stack wey worth running for 2026, instead of adding am later as afterthought.

Step 1, Add official Zabbix 7.0 repository

The zabbix-release package get only one job: e go put apt source list and signing key for your system. Install am, then refresh the index.

wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.0+ubuntu24.04_all.deb
sudo dpkg -i zabbix-release_latest_7.0+ubuntu24.04_all.deb
sudo apt update

If wget return 404 Not Found, the filename don move. Open the Zabbix download page, choose Ubuntu 24.04, and copy the exact zabbix-release URL wey e show. A clean apt update go show one repo.zabbix.com line and no key warning. The following signatures couldn't be verified because the public key is not available mean say the release package no install its key, so run dpkg -i again and update again.

Step 2, Install server, frontend, and agent

Install the server wey build for MySQL, the PHP frontend, the nginx config, the SQL schema files, and agent2 all at once.

sudo apt install -y zabbix-server-mysql zabbix-frontend-php \
  zabbix-nginx-conf zabbix-sql-scripts zabbix-agent2

zabbix-server-mysql na the server wey compile for MySQL/MariaDB; if na PostgreSQL you dey use, install zabbix-server-pgsql instead and adjust the database steps wey dey below. zabbix-sql-scripts carry the schema wey you go import next. For 7.0, e dey come as separate package, and if you forget am, na why the import path go later show say e no dey. None of these packages install database engine, so install MariaDB now if the box no already get one.

sudo apt install -y mariadb-server
sudo systemctl enable --now mariadb

Step 3, Create database with correct character set

Zabbix strict dey for collation: database must be utf8mb4 with utf8mb4_bin, otherwise import go stop halfway with foreign-key errors. Open root shell with sudo mysql and run:

CREATE DATABASE zabbix CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
CREATE USER zabbix@localhost IDENTIFIED BY 'choose-a-strong-password';
GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost;
SET GLOBAL log_bin_trust_function_creators = 1;
FLUSH PRIVILEGES;

That SET GLOBAL line na safety valve for the import. Zabbix schema dey create stored functions, and account wey no be SUPER, like zabbix, no fit create dem when binary logging dey on. MySQL 8 dey enable binary logging by default, and some managed MariaDB builds dey enable am too (stock MariaDB no dey). If you skip the flag for server wey get binary logging enabled, import go stop with ERROR 1419 (HY000): You do not have the SUPER privilege and binary logging is enabled. Setting am as root go clear the problem; you go turn am off again after the import. Note the password exactly. Server config need the same string byte for byte.

Step 4, Import schema (na step wey people dey skip)

Na this be the most common reason fresh frontend no gree load: database wey you create empty. Load schema wey ship with zabbix-sql-scripts enter am.

zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | \
  mysql --default-character-set=utf8mb4 -uzabbix -p zabbix

E go ask for zabbix password, run for thirty to sixty seconds on small VPS, then e no go print anything if e succeed; silence correct for here. zcat: /usr/share/zabbix-sql-scripts/mysql/server.sql.gz: No such file or directory mean say zabbix-sql-scripts package no dey installed (go back to Step 2). ERROR 1045 (28000): Access denied for user 'zabbix'@'localhost' mean say password or grant from Step 3 wrong. Once e finish, turn the safety flag off again:

sudo mysql -e "SET GLOBAL log_bin_trust_function_creators = 0;"

Confirm the load with sudo mysql -e "SELECT COUNT(*) FROM zabbix.users;". If na number, and no be doesn't exist error, e mean say schema don enter.

Step 5, Set database password for zabbix_server.conf

Server dey read its database credentials from /etc/zabbix/zabbix_server.conf. Na only password need set; DBName and DBUser already dey default to zabbix. Remove comment for # DBPassword= line and set am:

DBName=zabbix
DBUser=zabbix
DBPassword=choose-a-strong-password

Password must match the one from Step 3 byte-for-byte. Blank or wrong DBPassword na the main reason for the "Zabbix server is not running" banner wey you go see later: daemon go start, fail to log in, then exit. Nothing for screen go explain this; na only log go show am.

Step 6, Point nginx go the frontend

The zabbix-nginx-conf package dey install server block for /etc/zabbix/nginx.conf and link am into nginx from /etc/nginx/conf.d/zabbix.conf, but e ship with listen and server_name lines commented out. So nginx no go serve anything for Zabbix until you edit dem:

server {
    listen          80;
    server_name     zabbix.example.com;
    ...
}

Use your domain, or the server public IP if you never get DNS yet. Two things fit cause wahala. Ubuntu default nginx welcome site still dey listen for port 80 and dem mark am as the default server. So e go win for any request wey name no match am. Remove am, otherwise wrong page go load: sudo rm -f /etc/nginx/sites-enabled/default. And if /etc/nginx/conf.d/zabbix.conf somehow dey miss, na known packaging quirk, create the link by hand with sudo ln -s /etc/zabbix/nginx.conf /etc/nginx/conf.d/zabbix.conf. Then test and reload:

sudo nginx -t
sudo systemctl reload nginx

nginx -t suppose print test is successful. If e print nginx: [emerg] a duplicate default server for 0.0.0.0:80 instead, both the default site and the Zabbix block claim default_server. Remove the default site and test again. Most times the test go pass with only a conflicting server name warning, but browser still show the plain welcome page. That one mean the default site win because the name no match. Removing am go fix the problem.

Step 7, Start and enable the services

Start the server, the agent, PHP-FPM and nginx, then enable dem so dem go still dey work after reboot.

sudo systemctl restart zabbix-server zabbix-agent2 nginx php8.3-fpm
sudo systemctl enable  zabbix-server zabbix-agent2 nginx php8.3-fpm

Ubuntu 24.04 ships PHP 8.3, so the FPM service na php8.3-fpm; the zabbix-nginx-conf package dey run e frontend under that same master. Confirm say the server start and remain up:

sudo systemctl status zabbix-server --no-pager
sudo tail -n 20 /var/log/zabbix/zabbix_server.log

Healthy log go end with the server started, with e housekeeper, poller and trapper processes dey run. If you see [Z3001] connection to database 'zabbix' failed: [1045] Access denied for user 'zabbix'@'localhost', the DBPassword from Step 5 no match, so fix am and restart. A [Z3005] query failed: [1146] Table 'zabbix.dbversion' doesn't exist line mean say you skip the schema import for Step 4, so the server get nothing to read.

Step 8, Complete the web setup wizard

Browse go http://your-domain-or-ip. Zabbix setup wizard go open. Follow these steps:

  1. Welcome, choose language.
  2. Check of pre-requisites, every row suppose read OK immediately; the packaged /etc/zabbix/php-fpm.conf pool don already increase the PHP limits wey Zabbix need.
  3. Configure DB connection, database type na MySQL, host na localhost, port na 0 (wey mean the default port or socket), database name na zabbix, user na zabbix, and use the password from Step 3. Wrong credentials or missing schema go show for here.
  4. Settings, leave Zabbix server host as localhost, port as 10051, then give the installation name.
  5. Pre-installation summary, then choose Install. The wizard go write /etc/zabbix/web/zabbix.conf.php.
  6. Finish, log in as Admin (capital A) with password zabbix, then change that password immediately under Users.

If the wizard report Cannot create the configuration file, e mean say the web user no fit write to /etc/zabbix/web/. Download the zabbix.conf.php wey e offer, put am there manually with sudo, then click Finish.

Step 9, Add local host and attach template

Zabbix no dey monitor itself automatically. Go Data collection → Hosts → Create host, set host name to zabbix-server, add am to Linux servers group, then add Agent interface with IP 127.0.0.1 and port 10050. Under Templates, link Linux by Zabbix agent (the passive-poll variant; Linux by Zabbix agent active get the agent push instead). Save am.

Within one minute, host row go show green ZBX label and metrics go arrive under Monitoring → Latest data. Red ZBX label mean say server no fit reach agent. Na failure mode wey we cover below, no be mistake for this step.

Step 10, One useful trigger and an email alert

The Linux by Zabbix agent template don already get triggers for high CPU, low memory and full disks, so alerts go dey available as soon as you link am. To see how dem build one, add your own: open the host, go Triggers → Create trigger, name am Root filesystem over 90% full on {HOST.NAME}, set severity to High, and use this expression:

last(/zabbix-server/vfs.fs.dependent.size[/,pused])>90

vfs.fs.dependent.size[/,pused] na the percent-used item wey the template filesystem discovery create for the root filesystem (7.0's Linux template collect vfs.fs.get once and derive dependent items for each mount), so the trigger go fire without extra data collection. Save am.

A trigger only change the row colour for dashboard until an action notify person. For Alerts → Media types → Email, set the SMTP server, port, sender address, connection security (usually STARTTLS) and any relay credentials, then use Test. If e fail, e mean say the SMTP path get problem before any real alert depend on am. Give the Admin user an address under Users → Users → Admin → Media → Add and choose which severities go notify. Then connect am under Alerts → Actions → Trigger actions → Create action: add condition like Trigger severity >= Warning, and under Operations send am to Admin through Email. Save and enable am. You prefer chat? Zabbix 7.0 get webhook media types for Slack, Discord and Telegram. Configure one the same way as Email and assign am to a user.

Monitor another server with the agent

To monitor another server, add the Zabbix repository for that server too. Ubuntu 24.04 no get Zabbix packages by itself. Then install only the agent:

wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.0+ubuntu24.04_all.deb
sudo dpkg -i zabbix-release_latest_7.0+ubuntu24.04_all.deb
sudo apt update
sudo apt install -y zabbix-agent2

Edit /etc/zabbix/zabbix_agent2.conf. Set Server to the Zabbix server IP for passive polling. For active checks, set ServerActive plus one unique Hostname wey match the host wey you create for the frontend:

Server=10.0.0.10
ServerActive=10.0.0.10
Hostname=web-01

Run sudo systemctl enable --now zabbix-agent2 and allow TCP 10050 from the Zabbix server reach this machine. For the frontend, create a host wey Agent interface point to that machine IP. Link the Linux template. E go start report within one minute.

Failure modes, wey di strings wey you go see

Frontend show Error connecting to database or database error. For wizard DB step, Access denied for user 'zabbix'@'localhost' (using password: YES) mean say password no match Step 3, or GRANT no run at all. If database connect but frontend report The frontend does not match Zabbix database or Table 'zabbix.users' doesn't exist, schema import for Step 4 skip or fail; run am again inside fresh database.

Orange banner: Zabbix server is not running: the information displayed may not be current. Frontend dey up, but e no fit reach any live server. Three causes dey, and the first one most likely. Service don die; check systemctl status zabbix-server and start am. Service dey run, but e no fit reach database; log show [Z3001] connection to database 'zabbix' failed: [1045] Access denied, wey mean wrong or blank DBPassword. Or frontend dey point to wrong server, stored as host localhost port 10051 inside /etc/zabbix/web/zabbix.conf.php. For Ubuntu, SELinux no dey by default, so the SELinux-socket cause wey RHEL guides mention no apply; for here, na almost always database password or stopped service.

Host show red ZBX label; item error Get value from agent failed: cannot connect to [[127.0.0.1]:10050]: [111] Connection refused. Agent no dey run or e no dey listen. Check systemctl status zabbix-agent2 and confirm ListenPort=10050. If na timeout instead of "connection refused", firewall dey drop port 10050. The related Received empty response from Zabbix Agent. Assuming that agent dropped connection because of access permissions. mean agent dey reachable, but e Server= line no list Zabbix server IP; add am, then restart agent.

Plain nginx welcome page, or 502 Bad Gateway. Welcome page mean default site still enabled, or Zabbix block no link. Remove /etc/nginx/sites-enabled/default and confirm say /etc/nginx/conf.d/zabbix.conf dey exist, as e dey for Step 6. A 502 mean nginx reach PHP, but PHP-FPM don stop or e dey listen on different socket. Start php8.3-fpm and check say fastcgi_pass socket for Zabbix block match the pool wey dey run.

Backups, upgrades, and TLS

Database na the complete history, so use mysqldump back am on schedule and keep the dump outside the server:

mysqldump --single-transaction zabbix | gzip > zabbix-$(date +%F).sql.gz

The /etc/zabbix config files small and e good to save too, but you fit rebuild dem; the data no be like that. To restore am, create the database, import the dump, then point the config to am.

Upgrades inside the 7.0 line na normal apt update && apt upgrade runs; the server go apply any schema migrations when e start next time, so upgrade the packages and restart zabbix-server. Future major line na deliberate move. Read the upgrade notes, dump the database first, and expect schema change wey you no fit reverse. Na because of this one-way jump you pin to an LTS line and remain there.

No leave the frontend for plain HTTP. Once DNS point to the server, put certificate for am with Certbot and Let's Encrypt for nginx on Ubuntu 24.04, wey go rewrite the server block to listen on 443 and redirect 80. As you dey harden server wey dey log in to monitor every other server you run, secure the SSH too with fail2ban wey dey ban brute-force SSH attempts. Monitoring login no suppose travel as cleartext, and password-guessers no suppose find the front door open.

FAQ

I need Zabbix agent, or I fit monitor without am?

Both dey work. The agent (agent2) dey give detailed metrics for each host: CPU, memory, disks, processes, services, log files, and e na the normal choice for servers wey you control. Agentless monitoring dey cover devices wey you no fit install software on: SNMP for switches and printers, ICMP ping for reachability, HTTP checks for endpoints, and IPMI for hardware health. Most real deployments dey mix both.

Why frontend dey talk say Zabbix server no dey run?

Frontend dey work, but e no fit reach any live zabbix-server process. Most times, server start, fail to log in because DBPassword for zabbix_server.conf wrong or blank, then e stop immediately. Run systemctl status zabbix-server and read /var/log/zabbix/zabbix_server.log; any [Z3001] connection to database ... failed line dey confirm am. Correct the password and restart, and the banner go clear within one minute.

I must use MySQL, or I fit use PostgreSQL?

Both dey fully supported: zabbix-server-mysql with MariaDB or MySQL as this guide use, or zabbix-server-pgsql with PostgreSQL. For small installs, the choice almost no matter. For large ones, PostgreSQL with the TimescaleDB extension dey partition the history tables and make housekeeping much cheaper. Na why big sites dey prefer am. Pick one and stay with am. If you migrate later, you need full export and re-import; e no be just config switch.

How much RAM Zabbix all-in-one server need?

For one box wey dey monitor small number of hosts, 2 GB na realistic minimum, and 4 GB dey comfortable once hosts pass few dozen. The database cache and the server pollers dey use most of the memory. 1 GB VPS fit run, but database go lack memory as history dey grow. Once hosts pass one hundred, move the database go its own server and tune its buffer pool instead of adding more RAM to one machine.

Zabbix no too much for just two servers?

E fit be. If all you need na “e dey up?” and one page wey you fit share, lighter tool like Uptime Kuma for uptime and status monitoring go set up faster and easier to read quickly. Choose Zabbix when you want thresholds for each metric, historical graphs, templated hosts, and escalation rules. These na things simple pinger no fit provide across plenty servers.