install zabbix on raspberry pi

DIY Monitoring Solution: Installing Zabbix on Raspberry Pi

If you click our links and make a purchase, we may earn an affiliate commission. Learn more

Zabbix is a unified monitoring solution for your network, servers, and applications. There is a free version, and the Raspberry Pi is officially supported (which is pretty rare for that kind of enterprise-focused application). Let’s see how to install it on your device.

Zabbix requires a heavy setup (web server, database server, monitoring agent, and interface), but can be installed on Raspberry Pi OS with a few command lines. A package is available on the official website for all architectures.

Even if the Raspberry Pi is supported, it doesn’t mean it’s easy to set up, so let me guide you step-by-step to get it running on your Pi in a few minutes. I’ll also show you how to configure it and start using it once installed.

If you’re new to Raspberry Pi or Linux, I’ve got something that can help you right away!
Download my free Linux commands cheat sheet – it’s a quick reference guide with all the essential commands you’ll need to get things done on your Raspberry Pi. Click here to get it for free!

Prerequisites to Install Zabbix on Raspberry Pi

Let’s start by making sure if you have the right hardware and software before we begin installation.

Hardware Requirements

There are no strict requirements for in terms of hardware to use Zabbix on Raspberry Pi, but there are many services you’ll have to run to make it work, so using a Raspberry Pi 4 or Pi 5 for this project is recommended.

A wired network connection is also recommended for more stability (you can’t build a decent network monitoring project if the Wi-Fi is disconnected regularly).

Warning: current prices are all over the place for a new Raspberry Pi. Make sure to check this article to pay the right price when buying a Raspberry Pi. I also give a few tips to find one in stock (which currently isn’t that easy).

Software Prerequisites

Here are the prerequisites in terms of software before installing Zabbix:

  • Operating System: Raspberry Pi OS is officially supported and is still the best choice for the Raspberry Pi, so I would use it if possible. I recommend using the Bookworm release, as that’s what’s listed on the official website for the newest versions of Zabbix.

    You can read my guide on how to install Raspberry Pi OS here if you need some guidance.
  • Up-to-date System: You’ll need to install many packages. To avoid any conflict later on, make sure your system is up-to-date first. You can do this with these commands:
    sudo apt update
    sudo apt upgrade


    Reboot the Raspberry Pi after the installation if there are a lot of updates available.
  • Database Server: MySQL and PostgreSQL are supported. Pick the one you prefer, but you need to install the database first. Don’t go any further before making sure it’s running and with a root password set.

    You can read my MySQL server installation guide (MariaDB) here for more details.
  • Web Server (optional): Installing a web server lets you use the web interface frontend.
    You can read my Apache server installation guide for more details.

For your information, I tested this tutorial on my Raspberry Pi 4, with the Lite edition of Raspberry Pi OS Bookworm (64-bit), MySQL (MariaDB), and Apache.

Something not working as expected?
You can get answers from real experts in minutes.
Get help with your setup

Install Zabbix on Raspberry Pi

Here are the main steps to install Zabbix on a Raspberry Pi:

  • Add the Zabbix repository to the package manager.
  • Download and install the Zabbix packages with APT.
  • Create the database and user for Zabbix.
  • Edit the Zabbix configuration and restart the services.

I’ll now explain each step in detail.

Use the Website for Up-To-Date Instructions

To be honest, Zabbix has pretty good documentation, and also something that’s pretty rare. Raspberry Pi OS is included, which is perfect for us.

When you go to the download page, you’ll see a menu that looks like this:

By picking your architecture from each column, you’ll get customized instructions for your setup:

There are a few things missing, so I’ll give you the exact commands I used next, but it’s probably a good idea to check their page for updated command lines. (If there is a new version available, it will be updated on the Zabbix website, not here.)

Add the Zabbix Repository to Your System

The first step is to add the Zabbix repository to your system. It means your package manager (APT) will be connected to the Zabbix server, so it can access their packages directly.

Zabbix has made this simple with a “.deb” package installer you can get:

  • Download the .deb file:
    wget https://repo.zabbix.com/zabbix/7.4/release/raspbian/pool/main/z/zabbix-release/zabbix-release_latest_7.4+debian12_all.deb
  • Install the .deb file:
    sudo dpkg -i zabbix-release_latest_7.4+debian12_all.deb
  • Refresh the package lists:
    sudo apt update

I’m testing version 7.4, but make sure to check their website for the latest one available.

Tip: Command lines can be a pain to memorize. I put the essential Linux commands on a printable cheat sheet so you don't have to keep googling them. You can grab the PDF here if you want to save some time.

Install Zabbix Packages

The next step is to install the Zabbix packages for your server. This command will be different depending on which web server and database server you are using.

If you decided to use Apache and MariaDB (MySQL) like me, you can copy and paste this command:
sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent

In other cases, get the command from the official documentation, and make sure to add “sudo” in front (instructions are written for Debian with root access I think).

Recommended next step
Master Raspberry Pi in 30 Days

If you want a clearer path than jumping from tutorial to tutorial, my book gives you a step-by-step roadmap to really understand your Raspberry Pi.

Check the book here

All dependencies will be installed automatically if needed (Apache server and MySQL client if you don’t have it yet, for example).

Setting Up the Zabbix Database

Zabbix uses a database to store all the data and most of the configuration. Before proceeding further, we need to manually create the database and establish a specific user with all privileges.

I’ll give you the instructions for a MySQL server but it will be slightly different with PostgreSQL.

You need the MySQL server already set up with an administrator login and password to continue. If you haven’t done it yet, you can follow this tutorial first, and come back here after doing it.

Create the Database and User

Connect to the MySQL server console with:
mysql -uroot -p
Enter the root password and you’ll get access to the MariaDB monitor, where you can paste all of the following commands.

Create the database and the Zabbix user for MySQL:
create database zabbix character set utf8mb4 collate utf8mb4_bin;
create user zabbix@localhost identified by 'password';
grant all privileges on zabbix.* to zabbix@localhost;
set global log_bin_trust_function_creators = 1;
quit;

Just replace the password with something stronger when you execute the commands.
If everything goes well, you should get something like this:

Initialization

We’ve created an empty database, and we’ll now use the SQL script from the Zabbix installation directory to initialize it (creating tables and filling them with the minimal data required).

Here’s the command you can run for this:
zcat /usr/share/zabbix/sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix

Enter the password for the Zabbix user (the one you just created), and wait a minute while it processes. The “server.sql.gz” file is basically a text file with a ton of SQL queries, that will do everything for you. We simply send them to the “mysql” command, to execute them.

Once done, we can reset the log_bin_trust_function_creators flag we changed earlier. We don’t need it any more. Connect to the MariaDB monitor once again:
mysql -uroot -p
Enter the root password (not the same as the Zabbix user), and then this:
set global log_bin_trust_function_creators = 0;
quit;

Adjust Zabbix Server Configuration

The last thing we need to do to complete the server configuration is to tell Zabbix the MySQL password:

  • Edit the server configuration file:
    sudo nano /etc/zabbix/zabbix_server.conf
  • Find the paragraph about “DBPassword” (you can use CTRL+W to do a search with Nano).
  • Then add this line:
    DBPassword=password
    (Replace “password” with the one you set for the MySQL user you created for Zabbix.)
  • Save & exit (CTRL+X).

Restart Services

That’s it, the Zabbix server is installed and configured, we just need to restart the services to apply the changes:
sudo systemctl restart zabbix-server zabbix-agent apache2

It’s also probably a good idea to make sure all these services are started automatically on boot:
sudo systemctl enable zabbix-server zabbix-agent apache2

You’ll want the server to be running all the time to collect data from the different hosts you monitor 24/7. The agent gathers data for the Raspberry Pi system and Apache2 is the web server used for the frontend interface.

Zabbix Quick-Start Guide on Raspberry Pi

The hard part is done. We can do almost everything from the web interface from here on out. Let me guide you to get started quickly with Zabbix on your Raspberry Pi.

Get the IP address

To access the web interface you’ll need the Raspberry Pi IP address. If you’re still in the terminal the fastest way to get it will be to use this command:
ip a

You should be able to quickly find the IP address in the output, it looks like this:

And if you need more options or details, I have a specific tutorial on how to find the current IP address on Raspberry Pi. Click on the link to read it now, and come back once you have it.

Go to the Web Interface

Once you know the Raspberry Pi IP address, you can access the web interface from any computer on the same network. The URL to use follows this format:
http://<IP>/zabbix

Replace <IP> with the Raspberry Pi IP address and you’ll get access to a welcome page that looks like this:

Click “Next step” to continue to check prerequisites.

Fix Locale Errors

On the next page, I got a bunch of errors about language, saying “Locale for language ‘en_US’ is not found on the web server.”

My understanding is that Zabbix is set to use the “en_US” locale by default, while Raspberry Pi OS is installed with “en_GB” (the Foundation is based in the UK).

To fix this, you can either change the Zabbix installer to use en_GB instead (option 1) or add the en_US locale on your system (option 2). Pick the option you prefer, you only need to follow one.

Option 1: Change the Default Language to English (en_GB)

Go back to the first page (Welcome).

Change the “Default language” dropdown to “English (en_GB),” and click Next.

Now the error box should be gone and you can continue.

Option 2: Add the en_US Locale to Your System

If you prefer to install the US locale to your system, the easiest way would be to use the Raspberry Pi Software Configuration Tool for this:

  • Launch the Raspberry Pi Software Configuration Tool:
    sudo raspi-config
  • Navigate to Localisation Options > Locale.
  • Find en_US.UTF-8 in the list and mark it (use the arrow keys and the space bar to select it). Then press TAB and choose “OK” to save the changes.
  • If asked to choose a default locale, choose the en_US.UTF-8 option.
  • Exit the tool, and restart the Raspberry Pi to make it available to the whole system.

Now visit the Zabbix web interface again, and you should be able to continue without errors.

Follow the Configuration Steps

From there, click on “Next step” and follow the instructions to complete the interface configuration.

You’ll need to fill in the database settings—including providing your database password—choose a server name, time zone, and theme.

Click “Finish” once everything is done, and you’ll get redirected to the login page.

First Login

To login to Zabbix for the first time, the default credentials are:

  • Username: Admin
  • Password: zabbix

You can then access the main dashboard, with a menu on the left to access all the features.

Change the User Password

The last thing I recommend doing before starting to use Zabbix on your Raspberry Pi is to change the user password. It’s never a good idea to keep the default values.

You can do this easily from the web interface, in User settings > Profile.
Click Change password, and set it to something strong enough.


🛠 This tutorial doesn't work anymore? Report the issue here, so that I can update it!

Still stuck after following this guide? Drop your question in the RaspberryTips Community — real Pi users answer fast. Post your question here.

Using Zabbix on Raspberry Pi

Once the installation is completed, using Zabbix on a Raspberry Pi is not different from using it on any server. So, you’ll easily find documentation, tutorials, and videos online for anything specific you might be interested in. But let me give you a few tips to get started.

Monitoring the Raspberry Pi

The Raspberry Pi we used to install Zabbix is automatically available in the interface as our first host. The Zabbix Agent has been installed during the server installation, so we get all the data from the Raspberry Pi system directly available in the interface.

You can go to Monitoring > Hosts to find the Raspberry Pi (name “Zabbix Server” by default), and then click on “Graphs” to have an overview of the system usage. Here is an example of disk space usage:

And if you click on “Latest data”, you’ll get a table with a list of all the information collected by the Zabbix agent which looks like this:

It means that for all of these values, we can have graphs and notifications of whatever is important for our project.

Adding a New Host

In most cases, monitoring the Raspberry Pi server won’t be the main goal. You can add as many hosts as you want via the web interface. Just click on “New host” from the Monitoring > Hosts page.

You’ll need a way to access the new host information remotely. In most cases, SNMP is used for applications like this, but other methods are also supported with Zabbix. Using the Zabbix Agent can also be an alternative if needed.

I tested this with my NAS, which has SNMP enabled and it worked perfectly fine on the first try. I just filled in the new host form with the IP address and SNMP configuration:

And a few minutes later, I had my data collected and the first graphs showed up:

Going Further

As mentioned earlier, the Zabbix website is really well laid out, and the documentation is good enough to get started.

They even have several videos you can use as an introduction, like this one which I recommend watching if you are new to this:

From there, you’ll probably try things, see what’s working directly for your network and what needs more help. Head to their forums if you have specific questions. It’s very active and you’ll likely find an answer quickly there.

I used Nagios and Cacti for network and server monitoring when I worked as a sysadmin. I don’t have as much experience with Zabbix, but it looks like a great alternative. Let me know how it goes if you use it!

There’s also another easy alternative that we have a full guide on – Cockpit on Raspberry Pi: The Ultimate Monitoring Tool.

And if you are doing network projects like this, you might be interested in these other articles I have for you:

Not getting the same result?

Even when you follow every step, small differences in OS version, hardware or config can change the outcome. Instead of wasting time guessing, get help from people who have already fixed the same kind of issue.

Ask your question now
🔒 No risk. Cancel anytime.
  • Get help on your exact issue
  • Access step-by-step videos for tricky setups
  • Browse the website without ads

Similar Posts

Leave a Reply

Community members only
Comments are reserved for RaspberryTips Community members. Join the community to ask questions, get help, and interact with other Raspberry Pi users.

Join the community  or  log in