• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

BeginnersBox

How to Guides, Tutorials and Much More

  • Home
  • Tutorials
  • Opinions
You are here: Home / Tutorials / How to Install and Configure Zabbix on Ubuntu?

How to Install and Configure Zabbix on Ubuntu?

By Sourabh Verma | August 16, 2025 | Updated on: December 7, 2025

Facebook Share on Facebook Twitter Share on Twitter LinkedIn Share on LinkedIn Reddit Share on Reddit WhatsApp Share on WhatsApp Email Share via Email

In this tutorial, we will install and configure Zabbix on Ubuntu. But before proceeding with the tutorial, let’s se what Zabbix is.

What is Zabbix?

Zabbix is a free, open-source enterprise-grade tool that is very crucial for server administrators. It offers robust features to monitor server performance, network, server health, applications, and many other parameters in real time, helping administrators keep an eye on every problem. You can configure Zabbix to send an email for any problem that arises on the server. Not only that, but you can use Zabbix to generate visualized data for monitoring purposes. I have already written an enterprise-level setup to configure WordPress with nginx. You can follow the guide and get the best possible setup.

For monitoring purposes, you can even use Open Search, which shows analytical data and allows real-time monitoring along with many advanced features. Follow my complete guide to install and configure OpenSearch on Ubuntu 24.

Right after the configuration, you can access Zabbix directly from the browser in the same way as any website. Zabbix can be used as an important tool to monitor the IT infrastructure.

In this tutorial, you will learn

  • Benefits of using Zabbix
  • Install and Configure Zabbix on Ubuntu
  • Prerequisites
  • Step 1 – Update the System Repositories and Packages
  • Step 2 – Install Nginx
  • Step 3 – Install PostgreSQL
  • Step 4 – Install Zabbix Server, Agent and Frontend
  • Step 5 – Configure Database for Zabbix
  • Step 6 – Setup PHP for Zabbix Frontend
  • Step 7 – Configure Let's Encrypt
  • Step 8 – Configuring the Firewall
  • Step 10 – Setting up locale
  • Conclusion

Benefits of using Zabbix

  • It’s Free and Open Source
  • Monitors each and every problem in real time
  • Highly scalable to monitor many devices
  • It’s web-based, so no need to approach the system administrator
  • Supports various platforms like Linux, Windows, Unix, and network devices
  • Supports API integration to automate report generation and other tasks
  • It supports an alert mechanism, which means you get an alert as per your threshold limit
  • Adds security by enabling and monitoring real-time system activity
  • Very easy implementation

Install and Configure Zabbix on Ubuntu

Installation and configuration of Zabbix is very easy, and you can follow the steps below to configure it. We will use Nginx as our web server as it’s fast, performance-oriented oriented and uses fewer resources. We will use PostgreSQL to store the data generated by the server.

Prerequisites

  • A Ubuntu server with initial server configuration done
  • A user with sudo privileges

Step 1 – Update the System Repositories and Packages

The first step before configuring Zabbix is to update the repositories and packages. Let’s do that.

# sudo apt update
# sudo apt upgrade -y
# sudo apt --reinstall install dpkg -y

Step 2 – Install Nginx

Next, let’s install our web server.

# sudo apt install nginx -t

As the installation completes, we will enable the service

# sudo systemctl start nginx
# sudo systemctl enable nginx

Step 3 – Install PostgreSQL

To save the data generated by the server and analyze it later, we need to save the data somewhere. For that we will use PostgreSQL. Let’s install PostgreSQL.

# sudo apt install postgresql postgresql-contrib -y

Next, let’s create a database and a user

CREATE USER zabbix WITH PASSWORD 'password';
CREATE DATABASE zabbix OWNER zabbix;
\q
Note: Make sure to change database name "zabbix", database user "zabbix" and password "password" as per your need.

Step 4 – Install Zabbix Server, Agent and Frontend

Next step is to install Zabbix server, frontend and agent which will allow our web based app to work. Let’s first install Zabbix configuration package

# sudo curl -O https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-6+ubuntu24.04_all.deb
# sudo dpkg -i zabbix-release_6.0-6+ubuntu24.04_all.deb
# sudo dpkg -i zabbix-release_6.0-6+ubuntu24.04_all.deb
# sudo apt update

Next step is to install Zabbix server, agent and frontend

# sudo apt install zabbix-server-pgsql zabbix-frontend-php php8.3-pgsql zabbix-nginx-conf zabbix-sql-scripts zabbix-agent -y

Step 5 – Configure Database for Zabbix

Next step is to configure Zabbix to use our database that we have created in Step 3.

zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix

Now let’s configure Zabbix server to use our database

# sudo nano /etc/zabbix/zabbix_server.conf

Update the given below parameters in the file as per the credentials used in Step 3

DBName=zabbix
DBUser=zabbix
DBPassword=password
Note: Update the above parameters as per the details you have entered in step 3

Save and close the file.

Step 6 – Setup PHP for Zabbix Frontend

Open the file /etc/zabbix/nginx.conf and update the listen and server_name directives as shown below

server {
    listen 80;
    server_name zabbix.your_domain.com;
    ...
}
Note: Update "zabbix.your_domain.com" to your real domain name.

save and close the file

Let’s start the server and enable the service

# sudo systemctl start zabbix-server zabbix-agent nginx php8.3-fpm
# sudo systemctl enable zabbix-server zabbix-agent nginx php8.3-fpm

Step 7 – Configure Let’s Encrypt

We will use certbot as the tool to configure Let’s Encrypt SSL certificate. Let’s first install certbot

# sudo apt install certbot python3-certbot-nginx -y

Generate SSL certificate for your domain

# sudo certbot --nginx -d zabbix.your_domain.com
Note:- Make sure to change "zabbix.your_domain.com" to your real domain name.

Follow the prompts to generate the SSL certificate

Step 8 – Configuring the Firewall

Next step is to install and configure the firewall so that we can access our portal. So first let’s install UFW

# sudo apt install ufw -y

Let’s configure UFW rules

# sudo ufw allow http
# sudo ufw allow https
# sudo ufw reload

Step 10 – Setting up locale

Setting up locale in your server is very important, otherwise your setup won’t work.

# sudo apt-get install locales
# sudo locale-gen en_US.UTF-8
# sudo update-locale LANG=en_US.UTF-8

Now open “your_domain” on any browser and follow the gui based setup. Make sure to use the details as per our Step 3 while setting things up.

Conclusion

With this we have configured Zabbix on our Ubuntu server with PostgreSQL. Keep the server working for a couple of days so that some data is generated to analyze.

Category: Tutorials Tagged In: linux, Server

Facebook Share on Facebook Twitter Share on Twitter LinkedIn Share on LinkedIn Reddit Share on Reddit WhatsApp Share on WhatsApp Email Share via Email

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

About Sourabh

Hi, I am Sourabh. With over 12 years of experience in Linux, Windows, servers, databases and other I.T related areas, I make sure to publish easy and well tested tutorials and opinions. I hope you like my work. Thanks

Stay with BeginnersBox

FacebookFollow on FacebookTwitterFollow on TwitterLinkedInFollow on LinkedInYouTubeSubscribe on YouTubeInstagramFollow on InstagramRSSSubscribe to RSS Feed

Copyright © 2026 · BeginnersBox · All Rights Reserved.

  • Contact Us
  • Privacy Policy
  • Disclaimer