Skip to content

Raamo026/zabbix-docker-compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 

Repository files navigation

🧠 Zabbix on Docker (PostgreSQL + Nginx Frontend)

This repository provides a simple Docker Compose setup to run a full Zabbix monitoring stack using:

  • Zabbix Server (PostgreSQL backend)
  • Zabbix Web Interface (Nginx + PHP-FPM)
  • PostgreSQL Database

It’s designed for quick deployment, testing, or small internal environments.

πŸ“¦ Stack Overview

service image purpose
postgres postgres:latest Database backend for Zabbix
zabbix zabbix/zabbix-server-pgsql:trunk-ubuntu Zabbix server core
nginx zabbix/zabbix-web-nginx-pgsql:ubuntu-trunk Web interface for Zabbix (served via Nginx)

🧰 Requirements

  • Docker >= 20.10
  • Docker Compose >= 1.29
  • Minimum 2GB RAM (recommended)
  • Open ports: 8080, 10051, 5432 (default)

πŸš€ Quick Start

Clone the repository and bring the stack up:

git clone https://github.com/Raamo026/zabbix-docker-compose.git
cd <to/the/project/dir>
docker compose up -d

After all containers start successfully, open your browser and visit:

Default login

When the setup completes, log in to the Zabbix frontend using:

Username password
Admin zabbix

βš™οΈ Service Details

Zabbix Server

  • Container name: zabbix-srv-pstgrs
  • Exposed port: 10051
  • Environment variables:
    • DB_SERVER_HOST=zabbix-db-pstgrs
    • POSTGRES_USER=radmin
    • POSTGRES_PASSWORD=postpass1234567

Zabbix Web Interface

  • Container name: zabbix-web-nginx
  • Exposed port: 8080
  • Environment variables:
    • DB_SERVER_HOST=zabbix-db-pstgrs
    • POSTGRES_USER=radmin
    • POSTGRES_PASSWORD=postpass1234567
    • ZBX_SERVER_HOST=zabbix-srv-pstgrs
    • PHP_TZ=Asia/Tehran

PostgreSQL Database

  • Container name: zabbix-db-pstgrs
  • Exposed port: 5432
  • Volume: zabbixDB:/var/lib/postgresql
  • Credentials:
    • POSTGRES_USER=radmin
    • POSTGRES_PASSWORD=postpass1234567

πŸ—ƒοΈ Volumes

Volume Description
zabbixDB Persistent PostgreSQL data storage

🌐 Network

All containers share a user-defined bridge network:

Network name: zabbix_net
Driver: bridge

πŸ”’ Notes & Recommendations

⚠️ Security Warning:

  • The POSTGRES_PASSWORD is stored in plaintext β€” do not use this in production.
  • Consider adding .env to externalize credentials. (This will be added later)

🧹 Stop & Clean Up

To stop the containers:

docker compose down

To remove containers, networks, and volumes:

docker compose down -v

πŸ“„ License

This repository is provided under the MIT License.

Zabbix and Docker images are licensed under their respective terms.

About

Zabbix on Docker with simple docker compose file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published