Skip to content
Follow
Ubuntu Linux

Install Zabbix with Nginx on Ubuntu 24.04

Richard
Written by
Richard
Feb 14, 2025 Updated Jul 11, 2026 6 min read
Install Zabbix with Nginx on Ubuntu 24.04
Install Zabbix with Nginx on Ubuntu 24.04

You can install Zabbix with Nginx on Ubuntu 24.04 to create an efficient IT monitoring system for tracking your network's performance.

Zabbix, an open-source monitoring solution for IT infrastructure, uses Nginx as a high-performance web server. Nginx efficiently serves the Zabbix web interface, which is crucial for handling large amounts of monitoring data.

This guide specifically focuses on Ubuntu 24.04 LTS, ensuring you leverage the latest stability and security features for your Zabbix deployment.

Implementing Zabbix with Nginx on Ubuntu 24.04 allows you to optimize monitoring performance and better manage your server resources.

⚡ Quick Answer

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

PostgreSQL installation on Ubuntu 24.04 creates a database for your Zabbix Nginx Ubuntu 24.04 setup. This database holds all the information Zabbix collects about your systems. Run the command below to install PostgreSQL and its useful add-ons.

This guide uses the PostgreSQL database to work with Zabbix. PostgreSQL is a powerful database that helps Zabbix store and retrieve monitoring data efficiently.

Run the command below to install PostgreSQL.

🐧Bash / Shell
sudo apt update
sudo apt install postgresql postgresql-contrib

After the installation, run the command below to enable PostgreSQL services to start up automatically and check the PostgreSQL service status.

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.

How to install PostgreSQL on Ubuntu

Install Zabbix packages

You will install the main Zabbix software and add the official Zabbix update source to your Ubuntu 24.04 system. This action ensures you receive 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.

💻Code
wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest+ubuntu24.04_all.deb

Next, run the command below to install the Zabbix repository.

🐧Bash / Shell
sudo dpkg -i zabbix-release_latest+ubuntu24.04_all.deb

After adding a new repository, you need to refresh your package index (this updates the list of available software) by running the command below.

🐧Bash / Shell
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.

🐧Bash / Shell
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. Run the commands below to create a new PostgreSQL user and database named ‘zabbix’, and set a password when prompted.

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‘.

⚠️Warning
When prompted, create a password for the account.

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. Importing the schema sets up the necessary tables and structures for Zabbix Server to function correctly.

Confirm the password created above.

💻Code
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.

🐧Bash / Shell
sudo nano /etc/zabbix/zabbix_server.conf

Change the default configuration of ‘DBName‘, ‘DBUser‘, and ‘DBPassword‘ with your PostgreSQL database details.

💻Code
### 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‘.

🐧Bash / Shell
sudo nano /etc/zabbix/nginx.conf
💡Tip
Change the highlighted lines to match the ones below.
🐘PHP
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.

🐧Bash / Shell
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.

🐧Bash / Shell
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.

Zabbix installation wizard screen during setup on Ubuntu 24.04
Zabbix installation wizard screen during setup on Ubuntu 24.04

Configure the database

Zabbix installation wizard database
Zabbix installation wizard database

Type in the server name and continue.

Zabbix installation wizard system name
Zabbix installation wizard system name

Zabbix should be installed and ready to use.

Enter the default account below and sign in.

  • Username: Admin
  • Password zabbix
Zabbix installation wizard complete
Zabbix installation wizard complete

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.

You can set up a robust monitoring solution tailored to your IT infrastructure needs by following the outlined steps. This solution uses Zabbix software and Nginx web server for efficient performance, allowing 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?

Was this helpful?
Richard

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.

📚 Related Tutorials

How to Install i-doit on Ubuntu with Apache
CMS How to Install i-doit on Ubuntu with Apache
How to Install GNOME Desktop on Ubuntu 24.04
Ubuntu Linux How to Install GNOME Desktop on Ubuntu 24.04
How to Install KDE Desktop on Ubuntu 24.04
Ubuntu Linux How to Install KDE Desktop on Ubuntu 24.04

No comments yet — be the first to share your thoughts!

Leave a Comment

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