Self-Hosted NMS Zabbix 8
Deploy a production-ready Zabbix 8.0 server on Debian 13 with PostgreSQL, Nginx, and Webmin.
What is a Network Monitoring System (NMS)?
A Network Monitoring System (NMS) is software that continuously monitors the health, availability, and performance of your IT infrastructure. Rather than manually checking every switch, router, firewall, or server, an NMS automatically collects metrics, stores historical data, and can alert you when something goes wrong.
Typical benefits include:
- Detecting outages before users report them.
- Monitoring CPU, memory, storage, and network utilisation.
- Tracking performance trends over time.
- Receiving alerts when thresholds are exceeded.
- Building dashboards and reports for operational visibility.
- Identifying potential capacity or hardware issues before they become critical.
Popular Open Source Monitoring Platforms
There are several excellent monitoring solutions available. Three of the most popular are:
| Platform | Best For |
|---|---|
| Zabbix | Enterprise-grade monitoring with no licensing restrictions and extensive built-in features. |
| LibreNMS | Network-focused monitoring with excellent automatic discovery and broad hardware support. |
| Checkmk | Large-scale infrastructure monitoring with strong automation and scalability. |
Each platform has its strengths, and the right choice depends on your environment and operational requirements.
Why I Chose Zabbix
I chose Zabbix because it offers enterprise-grade functionality while remaining completely open source.
Some of the features that stood out to me include:
- Free to download and use.
- No licensing costs.
- No limits on monitored devices.
- Powerful dashboards and alerting.
- Excellent scalability.
- Large community with hundreds of templates.
For organisations requiring commercial assistance, Zabbix also offers:
- Technical support subscriptions
- Consulting services
- Training
- Implementation and migration assistance
- Integration services
- Template development
- Custom development
This doesn’t mean LibreNMS or Checkmk are inferior products they’re both excellent. Zabbix simply aligns better with my requirements for both home lab environments and enterprise deployments.
Zabbix Server Installation
This guide installs Zabbix 8.0 on a Debian 13 virtual machine using PostgreSQL and Nginx.
Create the Virtual Machine
- Name:
ZABBIX - CPU: 8 vCPU
- RAM: 16 GB
- Storage: 512 GB
- Root account: Locked
- Username:
zabbix - Do not install a desktop environment
- Add SSH Server and standard system utilities
Choose a strong password during installation.
After the first boot, update the operating system.
sudo apt update && sudo apt full-upgrade -y
Installing Zabbix 8.0
Install PostgreSQL
sudo apt install postgresql postgresql-client postgresql-contrib
Install the Zabbix Repository
wget https://repo.zabbix.com/zabbix/8.0/release/debian/pool/main/z/zabbix-release/zabbix-release_latest_8.0+debian13_all.deb
sudo dpkg -i zabbix-release_latest_8.0+debian13_all.deb
sudo apt update
Install Zabbix
sudo apt install \
zabbix-server-pgsql \
zabbix-frontend-php \
php8.4-pgsql \
zabbix-nginx-conf \
zabbix-sql-scripts \
zabbix-agent2
Allow PHP-FPM to Write the Zabbix Configuration
During the initial web setup, Zabbix needs permission to write its configuration file.
Create a systemd override:
sudo systemctl edit php-fpm
Add:
[Service]
ReadWritePaths=/etc/zabbix/web
Reload systemd:
sudo systemctl daemon-reload
Create the PostgreSQL Database
Create the database user:
sudo -u postgres createuser --pwprompt zabbix
Choose a strong database password.
Create the database:
sudo -u postgres createdb \
-E Unicode \
-T template0 \
-O zabbix \
zabbix
Import the initial schema:
zcat /usr/share/zabbix/sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix
Configure Zabbix
Edit:
/etc/zabbix/zabbix_server.conf
Set the database password:
DBPassword=<your_database_password>
Configure Nginx
Remove the default site:
sudo rm /etc/nginx/sites-enabled/default
sudo systemctl reload nginx
Edit:
/etc/nginx/conf.d/zabbix.conf
Uncomment the first two lines and configure your hostname.
For environments without DNS, use:
server {
listen 80;
server_name _;
Start Services
sudo systemctl restart \
zabbix-server \
zabbix-agent2 \
nginx \
php8.4-fpm
Enable services to start automatically:
sudo systemctl enable \
zabbix-server \
zabbix-agent2 \
nginx \
php8.4-fpm
Complete the Web Installation
Open your browser and navigate to:
http://<server-ip>/
Log in using:
| Username | Password |
|---|---|
| Admin | zabbix |
Immediately change the administrator password after logging in.
Installing Webmin
Although optional, I find Webmin useful for managing Linux servers through a web interface.
Install curl:
sudo apt install curl
Download the repository setup script:
curl -o webmin-setup-repo.sh https://raw.githubusercontent.com/webmin/webmin/master/webmin-setup-repo.sh
sudo sh webmin-setup-repo.sh
Install Webmin:
sudo apt update
sudo apt install webmin --install-recommends
Access Webmin:
https://<server-ip>:10000
Once logged in, navigate to System > Software Package Updates> Scheduled Upgrades.
Configure automatic security updates as appropriate for your environment.
Post-Installation Tweaks
Increase the Zabbix Cache Size
For larger environments, increasing the cache improves performance.
Edit:
/etc/zabbix/zabbix_server.conf
Uncomment the CacheSize=32M and change it to:
CacheSize=256M
Restart Zabbix:
sudo systemctl restart zabbix-server
Troubleshooting
Test SNMP Connectivity
The snmpwalk utility is invaluable when troubleshooting SNMP devices.
snmpwalk -v2c -c <community> <device_ip_or_hostname>
ArubaOS-CX SNMP
On ArubaOS-CX switches, SNMP must be enabled on the VRF servicing the monitoring server (typically the default VRF).
Without this configuration, the switch will not respond to SNMP requests.
snmp-server vrf default