Skip to content

How to Set Up Zabbix on a Linux Server for Monitoring Servers, Services, and Networks

Install Zabbix as a One-Click App or with Docker Compose, connect servers using the Zabbix Agent, and set up alerts.

1 December 202612 min read0 Views0 helpful

Introduction

Zabbix is an open-source platform for monitoring servers, network devices, services, and applications. Zabbix collects metrics such as CPU load, free memory, availability, and website response times, evaluates them using triggers, and sends you an email or messenger notification when something goes wrong. Dashboards, maps, and reports give you an at-a-glance view of your infrastructure. More than 300 ready-made templates for Linux, Windows, databases, web servers, and network devices take care of most of the setup for you.

In this guide, we’ll show you two ways to get started: the easy way, using a One-Click App that makes the Zabbix server, web interface, and MySQL database available over HTTPS; and a manual installation using the official Docker images. Then you’ll connect your first server using the Zabbix Agent and set up notifications.

When it makes sense to run Zabbix on a VPS

Your own monitoring server shouldn’t run on the machines it monitors. If one of those machines goes down, you still want Zabbix to be able to report it. A VPS is a good fit if:

  • You want to keep an eye on multiple servers or services, such as game servers, web servers, databases, or dedicated servers, and be notified immediately if there’s a problem.
  • You need historical data, such as how RAM, disk space, or network traffic changes over several weeks, so you can spot bottlenecks before they cause an outage.
  • You want to add network devices that you can query over SNMP, or websites and APIs whose availability Zabbix can check over HTTP.
  • You want multiple people to receive alerts, with their own accounts, permissions, and escalation levels.
  • You want monitoring to run around the clock, independently of your PC or home network.

Zabbix is less suitable if you only want to check whether a handful of websites are reachable. A lightweight tool such as Uptime Kuma is enough for that. If you mainly want to build attractive dashboards from existing data sources, take a look at Grafana. And if you want to document your infrastructure rather than monitor it, NetBox is the right tool.

The easy way: Zabbix as a One-Click App

The fastest way to get Zabbix is through your VPS’s One-Click Apps. The app launches Zabbix 8.0 with the server, web interface, and MySQL 8.4. With a domain, it’s available directly over HTTPS and creates the database on its first start. You don’t need a reverse proxy or certificate.

Requirements

  • A Linux VPS (Debian or Ubuntu) with One-Click Apps set up. See Setting up One-Click Apps for instructions.
  • At least 1 GB of RAM and 1 vCPU core for a small environment. 2 GB of RAM and 2 vCPU cores are recommended.
  • At least 5 GB of free disk space; 20 GB is recommended. The metrics history grows with every server you monitor.

Install

  1. Open your VPS in the ZapX dashboard and switch to the One-Click Apps tab.
  2. Search the app catalog for Zabbix and click Install app on its card.
  3. Use a custom subdomain or zap.cloud is already selected. Leave it enabled and enter a name, for example my-monitoring. Without a domain, Zabbix is only available over HTTP. The names zabbix, monitoring, and anything starting with zabbix- are reserved and will be rejected.
  4. You don’t need to enter anything under App configuration. The app generates the password for your Zabbix account and the two internal database passwords automatically.
  5. Click Queue installation.

On its first start, Zabbix creates its database schema, then the app sets the password for your account. The web interface starts only after that. In our test, it was available after about four minutes.

First login

During installation, the One-Click App replaces the default password zabbix from the official documentation with a randomly generated password. This means the Admin / zabbix combination does not work with the One-Click App.

  • Username: Admin (with a capital A). This is fixed. The app card mentions it under Login, but doesn’t specify the username itself.
  • Password: the SERVICE_PASSWORD_ZABBIXADMIN value in the app settings (gear icon), under App environment > Automatically generated values.

To log in:

  1. Open the app settings using the gear icon and switch to the App environment tab.
  2. Under Automatically generated values, copy the value for SERVICE_PASSWORD_ZABBIXADMIN. Use the eye icon to display it and the icon next to it to copy it.
  3. Open your app using the Access link.
  4. Log in with the username Admin and the password you copied.

The other two values, SERVICE_PASSWORD_MYSQL and SERVICE_PASSWORD_MYSQLROOT, are the passwords for the internal MySQL database. You don’t need them to log in to Zabbix.

Set your own password

You can keep the generated password or replace it with your own in Zabbix:

  1. Open User settings > Profile in the lower-left corner and click Change password.
  2. Enter your current password under Current password, then enter your new password under Password and Password (once again), and save with Update.

Your custom password remains in place after restarts and app updates; the app won’t overwrite it. The SERVICE_PASSWORD_ZABBIXADMIN value in App environment no longer applies, even if the app card still refers to it.

Info: Installed Zabbix before December 1, 2026?

Older installations keep their existing password. After an app update, the card may display a note about a generated password, but that password doesn’t apply to your installation. Continue using your own password. If you’re still using the default password zabbix, change it immediately as described above. Otherwise, anyone who knows the address can log in as a Super Admin.

After logging in, you’ll see the Global view dashboard with system information, problems, and the availability of your hosts.

Why “Zabbix server” appears as unavailable

Zabbix includes the Zabbix server host, which is intended to monitor itself. The Zabbix server health template provides metrics about the Zabbix server itself. The second template, Linux by Zabbix agent, expects a Zabbix Agent at 127.0.0.1:10050, which the One-Click App doesn’t include. An agent would need extensive access to the VPS, which an app container deliberately doesn’t have. After a few minutes, Zabbix reports the problem “Linux: Zabbix agent is not available (for 3m),” and Host availability on the dashboard counts one host as Not available. This isn’t an installation error, but the alert will remain until you remove the template.

To clear the alert, open Data collection > Hosts, click Zabbix server, and remove the Linux by Zabbix agent template from the Templates field using Unlink and clear. Save with Update. The problem will disappear after a few minutes, and the Zabbix server health template will remain. Monitor the VPS itself like any other server using an agent; see “Monitor your first server” below.

Updates and backups

Update Zabbix in the app settings (gear icon), under App update. Click Check for updates and install a new version using Apply update. If it says the app is up to date, there isn’t a newer version in the app catalog yet. The app uses the alpine-8.0-latest images, so it stays on Zabbix 8.0 and receives its bug fixes.

All hosts, templates, users, settings, and metrics are stored in the app’s MySQL database. The database is preserved during updates, but a volume is not a backup. Use SSH on your VPS to back up the database:

Code
N=$(docker ps --format '{{.Names}}' | grep -E '^zabbix-server-[a-z0-9]{24}$')
U=${N#zabbix-server-}
docker exec mysql-server-$U sh -c 'exec mysqldump --single-transaction -uroot -p"$MYSQL_ROOT_PASSWORD" zabbix' | gzip > zabbix-db-$(date +%F).sql.gz

The first line finds the Zabbix server container. The second reads its installation ID, which is also part of the database container’s name. mysqldump reads the password from the container itself, so it doesn’t appear in your shell. Don’t store your only backup on the VPS itself.

Manual installation

The rest of this guide covers manual installation using the official Zabbix Docker images. This option is useful, for example, if you don’t use One-Click Apps on your server, need active agents with port 10051, or want to run Zabbix behind your own reverse proxy.

Requirements

  • A Linux VPS with Debian or Ubuntu and SSH access; see First SSH connection.
  • Docker and Docker Compose (Compose v2); see Installing Docker. Check the installation with docker --version and docker compose version.
  • A domain or subdomain whose A record points to your VPS’s IP address (e.g., zabbix.example.com).

The values below are guidelines for a small to medium-sized environment. Zabbix’s storage requirements depend primarily on the number of hosts and how long you keep metrics. See the official requirements overview for details.

HardwareMinimumRecommended
CPU1 vCPU core2 vCPU cores
RAM1 GB2 GB
Storage5 GB20 GB

Prepare the firewall

The web interface listens on port 8080 inside the container and will run behind a reverse proxy. You only need port 10051 if agents need to send data to the server themselves (active checks). With ufw, first allow only SSH and the ports for the reverse proxy:

Code
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
Warning: Docker bypasses ufw

Ports published by Docker with ports: are reachable from outside even if ufw blocks them. So, as shown below, bind the web interface to 127.0.0.1 only. If you publish port 10051, restrict it to the IP addresses of your monitored servers using your VPS’s Network firewall in the ZapX dashboard. For more information, see Managing the firewall on Linux.

Install with Docker Compose

Create a directory and generate the two database passwords. These commands write them directly to the .env file without displaying them:

Code
mkdir -p /opt/zabbix && cd /opt/zabbix
echo "MYSQL_PASSWORD=$(openssl rand -hex 24)" > .env
echo "MYSQL_ROOT_PASSWORD=$(openssl rand -hex 24)" >> .env
chmod 600 .env

Then create the docker-compose.yml file:

Code
services:
  mysql-server:
    image: mysql:8.4
    restart: unless-stopped
    command:
      - mysqld
      - --skip-mysqlx
      - --character-set-server=utf8mb4
      - --collation-server=utf8mb4_bin
      - --log_bin_trust_function_creators=1
    environment:
      MYSQL_DATABASE: zabbix
      MYSQL_USER: zabbix
      MYSQL_PASSWORD: ${MYSQL_PASSWORD}
      MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
    volumes:
      - ./mysql:/var/lib/mysql
    healthcheck:
      test: ["CMD-SHELL", "mysqladmin ping -h 127.0.0.1 --silent"]
      interval: 10s
      retries: 12

  zabbix-server:
    image: zabbix/zabbix-server-mysql:alpine-8.0-latest
    restart: unless-stopped
    depends_on:
      mysql-server:
        condition: service_healthy
    environment:
      DB_SERVER_HOST: mysql-server
      MYSQL_DATABASE: zabbix
      MYSQL_USER: zabbix
      MYSQL_PASSWORD: ${MYSQL_PASSWORD}
      MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
    ports:
      - "10051:10051"

  zabbix-web:
    image: zabbix/zabbix-web-nginx-mysql:alpine-8.0-latest
    restart: unless-stopped
    depends_on:
      - zabbix-server
    environment:
      ZBX_SERVER_HOST: zabbix-server
      ZBX_SERVER_NAME: My Monitoring
      DB_SERVER_HOST: mysql-server
      MYSQL_DATABASE: zabbix
      MYSQL_USER: zabbix
      MYSQL_PASSWORD: ${MYSQL_PASSWORD}
      PHP_TZ: Europe/Berlin
    ports:
      - "127.0.0.1:8080:8080"

The most important lines:

  • mysql:8.4: Zabbix 8.0 requires MySQL 8.4 or later. The options under command set the character set required by Zabbix and allow the triggers Zabbix creates when it sets up the schema.
  • MYSQL_ROOT_PASSWORD on the server: This allows the Zabbix server to create the database schema itself on first startup.
  • ports: 10051:10051: Only needed for active agents. If you’re using passive checks only, where the server queries the agents, remove these two lines.
  • 127.0.0.1:8080:8080: The web interface is only available locally; external access goes through the reverse proxy.
  • ZBX_SERVER_NAME appears in the upper-left corner of the web interface, and PHP_TZ sets the default time zone.

Start Zabbix:

Code
docker compose up -d
docker compose logs -f zabbix-server

On the first start, the server creates the schema, which takes one to two minutes. Press Ctrl+C to stop displaying the logs; the containers will keep running.

First visit

First, set up the reverse proxy in the next section, or check Zabbix beforehand using an SSH tunnel from your PC:

Code
ssh -L 8080:127.0.0.1:8080 root@SERVER_IP

Then go to http://localhost:8080 and log in with Admin and zabbix. Change the password immediately under User settings > Profile > Change password, as described above for the One-Click App.

Access over HTTPS using a reverse proxy

To access Zabbix externally, put a reverse proxy with a valid certificate in front of it. For the basics, see Setting up a reverse proxy with nginx and Creating an SSL certificate (Let's Encrypt). Here’s a server block for nginx:

Code
server {
    listen 80;
    server_name zabbix.example.com;

    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Then get the certificate using certbot --nginx -d zabbix.example.com. Certbot adds HTTPS and HTTP redirection to the block. For more tips on securing your setup, see Linux security tips.

Back up your data

Everything important is stored in the MySQL database. Create a backup from the /opt/zabbix directory:

Code
cd /opt/zabbix
docker compose exec -T mysql-server sh -c 'exec mysqldump --single-transaction -uroot -p"$MYSQL_ROOT_PASSWORD" zabbix' | gzip > zabbix-db-$(date +%F).sql.gz

Also back up the .env and docker-compose.yml files. With many hosts, the backup can be large because it contains the entire metrics history. Set how long Zabbix keeps metrics under Administration > Housekeeping.

Update Zabbix

Back up the database first and read the Zabbix release notes. Then pull the new images and restart the stack:

Code
cd /opt/zabbix
docker compose pull
docker compose up -d

The alpine-8.0-latest tags provide all bug fixes for Zabbix 8.0. To upgrade to a new major version, change the tags in docker-compose.yml. On startup, the Zabbix server adjusts the database to the new version automatically. After that, the only way to roll back is to restore your backup. Zabbix displays the installed version at the bottom of every page.

Monitor your first server

After setup, Zabbix isn’t monitoring any of your servers yet. Install Zabbix Agent 2 on every server you want to monitor, then add it to Zabbix.

Install Zabbix Agent 2

On a server running Debian 13, add Zabbix’s official package repository and install the agent. For Debian 12, replace debian13 with debian12. For Ubuntu, use the appropriate file from https://repo.zabbix.com/zabbix/8.0/release/ubuntu/pool/main/z/zabbix-release/:

Code
wget https://repo.zabbix.com/zabbix/8.0/release/debian/pool/main/z/zabbix-release/zabbix-release_latest_8.0+debian13_all.deb
dpkg -i zabbix-release_latest_8.0+debian13_all.deb
apt update
apt install zabbix-agent2

Then open /etc/zabbix/zabbix_agent2.conf and set these lines:

Code
Server=ZABBIX_IP
ServerActive=ZABBIX_IP
Hostname=webserver-01

ZABBIX_IP is the public IP address of the VPS running Zabbix. The agent accepts requests only from this address. You only need ServerActive for active checks over port 10051; with the One-Click App, leave this line out. Start the agent and allow Zabbix access to port 10050:

Code
systemctl restart zabbix-agent2
systemctl enable zabbix-agent2
ufw allow from ZABBIX_IP to any port 10050 proto tcp

Add a host to Zabbix

  1. Open Data collection > Hosts and click Create host.
  2. Under Host name, enter the same name as in Hostname, for example webserver-01.
  3. Under Templates, select Linux by Zabbix agent. Under Host groups, select a group, such as Linux servers.
  4. Under Interfaces, click Add > Agent and enter the monitored server’s IP address and port 10050.
  5. Save with Add.

After one or two minutes, the ZBX icon in the Availability column turns green, and the first metrics appear under Monitoring > Latest data. If it stays red, check the server’s firewall and the Server= entry in the agent’s configuration.

Set up notifications

At first, Zabbix only displays problems on the dashboard. To receive a notification:

  1. Set up a delivery method under Alerts > Media types, such as Email with your mailbox’s SMTP details, or one of the ready-made messenger types, such as Telegram or Discord.
  2. Open Users > Users, select your account, and enter your address for that delivery method in the Media tab.
  3. Under Alerts > Actions > Trigger actions, enable the existing Report problems to Zabbix administrators action or create your own.

Use Test for a media type first to check that delivery works.

One-Click App limitations

  • No active agents: The One-Click App doesn’t publish port 10051. Agents can’t send data on their own, and automatic registration of new agents (autoregistration) isn’t available either. Passive checks, where Zabbix queries agents over port 10050, as well as ping, HTTP, and SNMP checks, work.
  • No agent for the VPS itself: Monitor the server running the app using an agent installed directly on the VPS, not in the app container.
  • Servers behind NAT: A server on your home network without a public address can’t be reached for passive checks. You’ll need a manual installation with port 10051 and active agents instead.

Conclusion

You’ve set up Zabbix on your VPS, logged in with the generated credentials, connected your first server using the Zabbix Agent, and configured notifications. From now on, Zabbix will alert you if a server goes down, a disk fills up, or a service stops responding.

Prefer not to manage Docker yourself? Take the easy route with the One-Click App, as described above under “The easy way: Zabbix as a One-Click App.”

Free tools

Related tools for servers and developers

View all

FAQ

Frequently asked questions

The One-Click App is the fastest option: the Zabbix server, web interface, and MySQL are available over HTTPS on your domain within minutes. The app generates passwords for your admin account and database automatically, and you can install updates from the dashboard. Manual installation is a better fit if you need active agents or automatic agent registration over port 10051, want to monitor servers without public IP addresses, or want to run Zabbix behind your own reverse proxy.
With the One-Click App, log in with the username Admin (capital A). The app generates your password during installation. Find it in the app settings under App environment > Automatically generated values, next to SERVICE_PASSWORD_ZABBIXADMIN. The default password zabbix doesn’t work with the One-Click App. You can set your own password in Zabbix under User settings > Profile > Change password; it will remain in place after restarts and updates. Installations from before December 1, 2026 keep their existing password.
The included Zabbix server host uses the Linux by Zabbix agent template and expects an agent at 127.0.0.1:10050. The One-Click App doesn’t include an agent. Remove the template under Data collection > Hosts > Zabbix server using Unlink and clear. The Zabbix server health template will remain and continue monitoring Zabbix itself.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.