Skip to content
Follow
Ubuntu Linux

Install Zabbix with Nginx on Ubuntu 24.04

Richard
Written by
Richard
Feb 14, 2025 Updated Sep 15, 2026 5 min read
Install Zabbix with Nginx on Ubuntu 24.04
Install Zabbix with Nginx on Ubuntu 24.04

Zabbix with Nginx on Ubuntu 24.04 sets up a monitoring system to track the health of your servers, computers, and network devices. Zabbix is free software that watches network traffic and hardware stats, while Nginx serves as the web server that displays all this data in your browser.

Advertisement

Ubuntu 24.04 LTS (Long Term Support) provides five years of security updates and modern software packages for your server setup. Running these tools together gives you a fast dashboard to spot computer problems before they break your network.

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

Advertisement

Install PostgreSQL server

To install PostgreSQL server on Ubuntu 24.04 for your monitoring setup, update your package list and then run the apt install command in your terminal. PostgreSQL acts as the backend database where Zabbix stores all collected system metrics and performance data.

PostgreSQL handles 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.

Advertisement

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

To install Zabbix packages on Ubuntu 24.04, download the official Zabbix repository release file using wget and install it with dpkg. This adds the correct software source to your system so you can download the main server and agent components.

First, download and install the Zabbix repository for Ubuntu by running the command below.

Advertisement
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:

Advertisement
  • 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

To configure Zabbix with PostgreSQL, create a dedicated database and user account for the monitoring platform, and then import the initial schema. This gives Zabbix the proper permissions and table structures it needs to save system data.

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

⚠️WarningWhen prompted, create a password for the account.
Advertisement

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.

Advertisement
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

To set up Nginx for Zabbix, open the default Nginx configuration file for the monitoring platform and adjust the port and server name directives. This allows the web server to properly serve the Zabbix dashboard pages.

Run the command below to open the Nginx configuration for Zabbix '/etc/zabbix/nginx.conf'.

Advertisement
sudo nano /etc/zabbix/nginx.conf
💡TipChange the highlighted lines to match the ones below.
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

To restart Zabbix services and apply your configuration changes, use the systemctl command to restart and enable the Zabbix server, agent, Nginx, and PHP-FPM. Running this ensures all background daemons run correctly with the new settings.

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

To access Zabbix for the first time, open your web browser and go to your server address using port 8080. Log in with the default username Admin and password zabbix to complete the setup and view your monitoring dashboard.

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

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?

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.

Advertisement

📚 Related Tutorials

How to Install Nginx on Ubuntu Linux
Ubuntu Linux How to Install Nginx on Ubuntu Linux
How to Install i-doit on Ubuntu with Apache (Free IT Asset)
CMS How to Install i-doit on Ubuntu with Apache (Free IT Asset)
How to Install Apache on Ubuntu Linux
Ubuntu Linux How to Install Apache on Ubuntu Linux
How to Install Ubuntu Linux
Ubuntu Linux How to Install Ubuntu Linux

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

Leave a Comment

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