Install Zabbix with Nginx on Ubuntu 24.04
Installing Zabbix with Nginx on Ubuntu 24.04 sets up a powerful system to watch over your network’s health.
Zabbix is a free tool that monitors IT equipment, and Nginx acts as its speedy web server. Nginx delivers the Zabbix web page quickly, which is important for showing lots of monitoring details.
This guide focuses on Ubuntu 24.04 LTS, making sure you use the newest updates for a stable and secure setup.
Putting Zabbix and Nginx together on Ubuntu 24.04 helps you get better monitoring performance and manage your computer resources well.
Install Zabbix with Nginx on Ubuntu 24.04 by first installing PostgreSQL, then the Zabbix repository and packages using `apt`. Configure Zabbix server with your PostgreSQL details and set up Nginx by editing its configuration file.
Install PostgreSQL server
Installing PostgreSQL on Ubuntu 24.04 creates the database for your Zabbix Nginx setup. This database stores all the information Zabbix collects about your systems. Run the command below to install PostgreSQL and its add-ons.
This guide uses PostgreSQL, a powerful database, to help Zabbix efficiently store and retrieve monitoring data.
Run the command below to install PostgreSQL.
sudo apt update
sudo apt install postgresql postgresql-contrib
After installation, enable PostgreSQL services to start automatically and check their status with these commands.
This guide details installing PostgreSQL, a powerful database system, and using PostgreSQL on Ubuntu 24.04. You will learn the steps to set up PostgreSQL for your Zabbix monitoring system, ensuring your data is stored and managed efficiently.
Install Zabbix packages
Next, install the main Zabbix software and add the official Zabbix update source to your Ubuntu 24.04 system. This ensures you get the latest Zabbix Nginx Ubuntu 24.04 version. To download and install the Zabbix repository for Ubuntu, run the command provided.
First, download and install the Zabbix repository for Ubuntu by running the command below.
wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest+ubuntu24.04_all.deb
Run the command below to install the Zabbix repository.
sudo dpkg -i zabbix-release_latest+ubuntu24.04_all.deb
After adding a new repository, refresh your package index (this updates the list of available software) by running the command below.
sudo apt update
Now that the Zabbix repository is set up on your Ubuntu system, you can install the necessary packages with the following command.
sudo apt install zabbix-server-pgsql zabbix-frontend-php php8.3-pgsql zabbix-nginx-conf zabbix-sql-scripts zabbix-agent
This command installs several key components:
- Zabbix with PostgreSQL database support
- Zabbix web application or frontend
- PHP and modules, including the ‘pgsql’ module for the PostgreSQL driver
- Nginx and configuration for Zabbix
- Zabbix SQL scripts
- Zabbix agent for monitoring the Zabbix system
Configure Zabbix
After installing the Zabbix packages, you must set up its database for the Zabbix Nginx Ubuntu 24.04 installation by creating a specific PostgreSQL database and a user account just for Zabbix. Create a new PostgreSQL user and database named ‘zabbix’ using the commands below. You’ll be prompted to set a password.
First, create a new database and account to use with Zabbix.
Run the two commands below to create a new PostgreSQL user and database called ‘zabbix‘.
After creating the Zabbix database and user, run the command `zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -u root -p zabbix` to import the database schema. This sets up the necessary tables and structures for Zabbix Server to function correctly.
Confirm the password created above.
zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix
You’ll see a success message if everything works.
You can open the Zabbix server configuration file, located at `/etc/zabbix/zabbix_server.conf`, by running a specific command. This file contains all the settings for the Zabbix server, so editing it allows you to customize Zabbix’s behavior, such as changing the port it uses or the database connection details.
sudo nano /etc/zabbix/zabbix_server.conf
Change the default configuration of ‘DBName‘, ‘DBUser‘, and ‘DBPassword‘ with your PostgreSQL database details.
### Option: DBName
# Database Name
# Mandatory: yes
# Default:
# DBName=
DBName=zabbix
### Option: DBUser
#Database user.
# Mandatory: no
# Default:
# DBUser=
DBUser=zabbix
### Option: DBPassword
#Database password.
# Mandatory: no
# Default:
DBPassword=Type_DBuser_password
Save the file and exit the editor when finished.
Set up Nginx
To access Zabbix using your web browser on Ubuntu 24.04, you need to set up Nginx. This involves opening its configuration file and making specific changes for Zabbix. Run the command below to open the Nginx configuration file for Zabbix, located at ‘/etc/zabbix/nginx.conf’.
Run the command below to open the Nginx configuration for Zabbix ‘/etc/zabbix/nginx.conf‘.
sudo nano /etc/zabbix/nginx.conf
server {
listen 8080;
server_name zabbix.example.com;
root /usr/share/zabbix;
index index.php;
............................................When done, save the file and exit the editor.
Restart Zabbix services
After setting up PostgreSQL and Nginx for your Zabbix Nginx Ubuntu 24.04 system, it’s important to restart the Zabbix server, agent, and Nginx services. This ensures all your recent changes are applied correctly. Run the commands below to restart these services.
Run the commands below to restart the services.
sudo systemctl restart zabbix-server zabbix-agent nginx php8.3-fpm
sudo systemctl enable zabbix-server zabbix-agent nginx php8.3-fpm
You can check the status when the services are restarted by running the command below.
sudo systemctl status zabbix-server zabbix-agent nginx php8.3-fpm
Access Zabbix
Once all services are restarted, you can finally access the Zabbix web interface on Ubuntu 24.04. Go to your server’s address in a web browser to complete the setup. Enter the server name and continue, then select your preferred installation language and proceed.
http://zabbix.example.com:8080
Select the installation language and continue.

Configure the database

Type in the server name and continue.

Zabbix should be installed and ready to use.
Enter the default account below and sign in.
- Username: Admin
- Password zabbix

That should do it!
Conclusion:
Installing Zabbix with Nginx support on Ubuntu 24.04 is a manageable process that significantly enhances monitoring capabilities. Key takeaways include:
- Comprehensive Monitoring: Zabbix offers robust monitoring for various network services, servers, and hardware.
- Enhanced Performance: Utilizing Nginx allows for high performance and low resource consumption, which is beneficial for handling large traffic volumes.
- Database Flexibility: PostgreSQL is reliable for Zabbix, ensuring efficient data management and storage.
- User-Friendly Interface: The web front of Zabbix makes it accessible and easy to configure.
- Security Improvements: Nginx contributes to better security measures when managing the Zabbix environment.
- Community Support: As an open-source solution, Zabbix has strong community backing, providing abundant resources and documentation.
Following the outlined steps allows for the setup of a robust monitoring solution tailored to your IT infrastructure needs. This solution uses Zabbix software and Nginx web server for efficient performance, enabling you to track over 50 different types of metrics.
What is the URL for Zabbix UI when using nginx?
If you have installed Zabbix from packages, the URL is: for Apache: http:///zabbix. for Nginx: http://
Was this guide helpful?
About the Author
Richard
Tech Writer, IT Professional
Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.
No comments yet — be the first to share your thoughts!