Workload · Running Zabbix monitoring

Zabbix server requirements for your own monitoring box

For a small setup watching around 1,000 metrics, Zabbix suggests starting with 8 GiB of memory and 2 processor cores; at 10,000 metrics that becomes 4 cores and 16 GiB. You will also want a database you trust (MySQL, MariaDB, Percona or PostgreSQL), enough fast disk for the history you keep, and a machine that is not sitting next to the servers it watches. Below, in order: how to size it, which server fits, how to install it in an evening, and the few security steps people skip and regret.

The short version
  1. About 1,000 metrics? Zabbix's example begins at 2 cores with 8 GiB
  2. Items, polling interval and how long you keep history decide how much disk you need
  3. Change the Admin / zabbix login while the page is still private to you
  4. Run it apart from what it watches, so an outage there does not silence your alerts

How big does the server need to be?

It depends on how many things you measure and how often. Zabbix counts in monitored metrics, and its rough rule is that one metric is one item, one trigger and one graph. The current documentation (Zabbix 7.4) gives these example sizes:

What you watchZabbix calls itCoresMemory
About 1,000 metricsSmall28 GiB
About 10,000 metricsMedium416 GiB
About 100,000 metricsLarge1664 GiB
About 1,000,000 metricsVery large3296 GiB

Treat these as a first guess. Zabbix itself says each installation is unique, that the active item count and how often each is polled matter a great deal, and that you should test in a staging setup before going live. Two more points from the same page: extra memory makes the database faster, and that makes Zabbix faster; and for large installations, it strongly recommends moving the database onto a server of its own.

How much disk your history will use

Zabbix's settings take almost nothing, normally 10 MB or less. What fills the disk is the data you keep, and the documentation walks through an example you can scale to your own numbers.

  1. Work out values per second: 3,000 items checked every 60 seconds gives 50.
  2. Multiply by how long you keep raw history: 30 days at 50 per second is about 130 million values.
  3. Multiply by the size of a value: around 90 bytes for a number, so about 10.9 GB in this example. Text and log values are nearer 500 bytes each.
  4. Add hourly trends (about 2.2 GB a year for those 3,000 items) and events (Zabbix's worst case, one per second for three years, is around 30 GB plus tags).

Zabbix notes that these estimates are based on MySQL. The good news: the database does not grow forever. Once the housekeeper begins deleting old data at the age you chose, the size levels off. Because Zabbix is writing all day, put that database on NVMe dedicated servers instead of hard drives as soon as you outgrow a small setup.

The server that fits

Here is how we would match the Zabbix sizes to what is on our dedicated server catalogue. This is our suggestion, not Zabbix's.

  • Watching a small office or a handful of servers: one of the compact cartridges with four cores, NVMe and 16 GB or more. It clears the small row with memory left over for the database.
  • A growing estate, around the medium row: the Xeon D-1587 cartridge (16 cores) with its 1.92 TB NVMe drive, and 32 GB or 64 GB of memory.
  • Large: one of the two-processor servers with 64 GB of memory or more. These are rack servers and blades, so you also get an out-of-band console.
  • Very large: two servers, one for Zabbix and one for the database, which is what Zabbix itself advises at that size.

Whichever you choose, the whole machine is yours: all of its cores, memory and disks, with root access and no other customer on it. A ready server is handed over within 30 minutes of your payment being approved, it is month to month, and the port is unmetered.

Up and running in an evening

Zabbix asks you to use its own repository rather than the Zabbix packages some Linux distributions ship, because those are unsupported and can be out of date. These steps follow what the Zabbix download page gives for version 7.4 on Ubuntu 24.04 with MySQL and Apache. Do them as root, with a MySQL (8.0.30 to 9.7) or MariaDB (10.5 to 12.3) server already installed and running.

  1. Before installing anything, shut the server to everything except SSH: ufw allow OpenSSH, then ufw enable. Allow SSH first or you lock yourself out. ufw's default policy refuses all other incoming traffic, and on Ubuntu its rules cover IPv6 as well as IPv4, so the Zabbix web page and ports 10050/10051 stay private until you open them.
  2. Set up Zabbix's package repository, then install the server, web frontend and agent (first box below).
  3. Create the database and its user in the MySQL prompt, then load the starting data (second box). Swap password for a long one of your own.
  4. Open /etc/zabbix/zabbix_server.conf and set DBPassword= to that same password, then run the last two lines of the second box to start the services and have them come back after a reboot.
  5. Open the setup page through the SSH tunnel described in the next section (http://localhost:8080/zabbix on your own computer), not at your server's public address.
wget https://repo.zabbix.com/zabbix/7.4/release/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.4+ubuntu24.04_all.deb
dpkg -i zabbix-release_latest_7.4+ubuntu24.04_all.deb
apt update
apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent
mysql -uroot -p
mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
mysql> create user zabbix@localhost identified by 'password';
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> set global log_bin_trust_function_creators = 1;
mysql> quit;

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

# then switch the option back off
mysql -uroot -p
mysql> set global log_bin_trust_function_creators = 0;
mysql> quit;

# after setting DBPassword= in /etc/zabbix/zabbix_server.conf
systemctl restart zabbix-server zabbix-agent apache2
systemctl enable zabbix-server zabbix-agent apache2

Would you rather run the long-term support branch? Take the Zabbix 7.0 LTS commands straight from the same download page. Do not just change the version number in the ones above, because the repository path is different too.

Lock the doors before you share the link

The setup wizard is the first thing a fresh Zabbix page shows, so our working assumption is that whoever reaches the address before you could complete it. After the wizard, Zabbix documents the default sign-in as Admin with the password zabbix, an account that can do everything, and strongly recommends changing that password straight after your first login. Until both are done, nobody else should be able to reach the page.

  1. Keep the web ports closed (step one of the install did this) and reach the page through an SSH tunnel from your own computer, using the login you already use for the server: ssh -L 8080:127.0.0.1:80 your-user@your-server, then open http://localhost:8080/zabbix.
  2. Finish the wizard, sign in, and change the Admin password first.
  3. Only then open things up, each to the machines that need it (box below). Port 443 comes last, once the Admin password is changed and HTTPS is set up.
# on the Zabbix server: agents that send their own data
ufw allow from <monitored-host-ip> to any port 10051 proto tcp

# on each monitored host that runs ufw: checks from the Zabbix server
ufw allow from <zabbix-server-ip> to any port 10050 proto tcp

# on the Zabbix server, only after Admin's password is changed and HTTPS works
ufw allow 443/tcp

Three more habits that matter:

  • Protect the config file. zabbix_server.conf holds your database password. We suggest owner root, group zabbix and mode 640: run chmod 640 and chown root:zabbix on /etc/zabbix/zabbix_server.conf. Zabbix itself runs as the zabbix user, so it can still read the file. It does not stop a Zabbix agent sharing that same zabbix account, the default setup, so Zabbix suggests giving an agent on the same box a separate user of its own.
  • Open the two Zabbix ports narrowly. Your Zabbix server listens on 10051 for agents that send their own data: allow only your monitored hosts. On every monitored host, the agent listens on 10050 so the server can ask it questions: allow only the machine that polls it (your Zabbix server, or a proxy if you use one), and name that machine in the Server= line of the agent's config. Make sure each rule covers IPv6 as well as IPv4 (ufw on Ubuntu handles both). Zabbix advises never exposing these ports straight to the internet.
  • Leave global scripts off. A new 7.x install ships with them disabled (EnableGlobalScripts=0 in zabbix_server.conf); switch them on only if you need them.
  • Keep the clock right. Zabbix says accurate time on the server is very important, and the same goes for every machine running a Zabbix component.

Who keeps an eye on Zabbix?

Your monitoring cannot tell you it is down. A few precautions cover that gap:

  • Put the Zabbix server in a different city from the servers it watches. We run five, listed on our data center locations page.
  • Check the Zabbix page from outside with something small and separate, such as Uptime Kuma on another machine.
  • Dump the Zabbix database every night, copy it off the server along with /etc/zabbix, and test a restore now and then. Our PostgreSQL dedicated server page goes deeper on database care if you pick PostgreSQL instead.

If you break something while tuning, you can reinstall the operating system yourself from the control panel and start clean, as many times as you need.

When this is more server than you need

If you are watching a few machines with the default templates, a whole dedicated server is generous; a small cartridge is plenty. And remember the split of jobs: you manage the server and its software, and we keep the hardware and the network running. If nobody on your side will apply Zabbix and database updates, plan for that before you start.

Questions people ask

What is the smallest server Zabbix will run well on?
Zabbix's own smallest example pairs 2 cores with 8 GiB of memory, for roughly 1,000 metrics. You can go lower for a test, but the database is happier with spare memory. A four-core cartridge with 16 GB gives you headroom.
Do I have to use MySQL?
No. Zabbix 7.4 supports MySQL and Percona from 8.0.30, MariaDB from 10.5, and PostgreSQL 13 to 18. The download page gives install commands for both MySQL and PostgreSQL. Pick the one you already know how to back up.
Can I put the database on the same server?
Yes, for small and medium setups; the standard package install does exactly that. Once you are in the large range, Zabbix strongly advises giving the database its own server, so plan on a second machine.
Which firewall ports does Zabbix need?
Port 10051 on the Zabbix server, for agents that push their own data and for the web frontend, and port 10050 on each monitored host, for checks the server starts. Your browser reaches the frontend on 80 or 443. Allow each port only from the machines that use it.
How soon can I start installing?
A ready server reaches you within 30 minutes of your payment being approved. Payment and fraud checks come first and are the part whose length varies.

Give your monitoring a home of its own

Pick a server sized for what you watch, with NVMe for the history and no contract to sign.

Get a server for Zabbix

Read next