Install Zabbix with Nginx on Ubuntu 24.04
Zabbix with Nginx on Ubuntu 24.04 sets up a complete system to track the health of your servers, computers, and network devices. Zabbix is a free monitoring tool, and Nginx is the web server that displays all your stats in a web browser.
Ubuntu 24.04 LTS gives you modern software packages and security updates for five years. Running these three programs together gives you a fast and reliable dashboard to spot computer problems before they break your network.
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
Setting up PostgreSQL creates the database where Zabbix stores collected system metrics. Run the command below to install the database server and its required packages.
PostgreSQL provides a scalable relational database backend capable of handling high-volume telemetry data from Zabbix.
Run the command below to install PostgreSQL.
sudo apt update
sudo apt install postgresql postgresql-contrib
Configure the PostgreSQL service to start automatically on system boot and verify its active state using 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, integrate the official Zabbix software repository into the package manager.
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
Refresh the local package index to recognize the newly added software source.
sudo apt update
Execute the installation command below to deploy the required monitoring components.
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
Database initialization requires creating a dedicated user account and storage container within PostgreSQL.
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
Console output confirms successful execution upon completion.
Open the primary server configuration file located at /etc/zabbix/zabbix_server.conf to define connection parameters.
sudo nano /etc/zabbix/zabbix_server.conf
Locate the parameters named 'DBName', 'DBUser', and 'DBPassword', then update them with the PostgreSQL credentials created previously.
### 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
Configuring the web server requires editing specific virtual host directives for the monitoring platform.
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
Restarting backend services applies all configuration modifications across the server environment.
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
Verify that all daemons are running correctly by checking their operational status.
sudo systemctl status zabbix-server zabbix-agent nginx php8.3-fpm
Access Zabbix
Finalize the deployment through the web-based installer by navigating to the server address in a browser.
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

Your monitoring server is now fully operational and ready to track network performance.
Conclusion:
Deploying Zabbix with Nginx support on Ubuntu 24.04 establishes a capable platform for tracking enterprise systems. 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 these procedures establishes an enterprise-grade telemetry gathering platform tailored for complex IT workloads. Integrating PostgreSQL and Nginx ensures dependable performance while collecting extensive operational 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!