How to Install Zabbix Server 7.0 on Docker Step-by-Step
Monitoring your infrastructure is essential for any IT environment. In this guide, you’ll learn how to install Zabbix Server 7.0 on Docker using Docker Compose. We’ll cover everything from setting up the database to accessing the web interface, with all required containers configured for optimal performance.
Whether you’re running this on your local machine or deploying it to a production server, Docker simplifies the setup by packaging all the necessary services. Let’s dive in!
Prerequisites
Before you install Zabbix Server 7.0 on Docker, ensure you have the following installed on your machine:
- Docker (v20 or higher) — Install Docker
- Docker Compose (v1.29+ or Compose Plugin) — Install Docker Compose
- At least 2 CPUs and 4 GB RAM (8 GB recommended for production)
- Internet access. Or check our tunnel SSH guide.
Create Your Docker Project
Create a new working directory for your setup:
mkdir zabbix-docker && cd zabbix-docker
Inside, create a file called docker-compose.yml
.
Docker Compose File for Zabbix 7.0
Here’s a production-ready Docker Compose configuration:
version: '3.5'
services:
mysql-server:
image: mysql:8.0
container_name: zabbix-mysql
restart: unless-stopped
command: --log-bin-trust-function-creators=1
environment:
MYSQL_ROOT_PASSWORD: zabbixrootpass
MYSQL_DATABASE: zabbix
MYSQL_USER: zabbix
MYSQL_PASSWORD: zabbixpass
volumes:
- ./mysql-data:/var/lib/mysql
zabbix-server:
image: zabbix/zabbix-server-mysql:alpine-7.0-latest
container_name: zabbix-server
restart: unless-stopped
environment:
DB_SERVER_HOST: mysql-server
MYSQL_USER: zabbix
MYSQL_PASSWORD: zabbixpass
MYSQL_DATABASE: zabbix
depends_on:
- mysql-server
ports:
- "10051:10051"
zabbix-web:
image: zabbix/zabbix-web-nginx-mysql:alpine-7.0-latest
container_name: zabbix-web
restart: unless-stopped
environment:
DB_SERVER_HOST: mysql-server
MYSQL_USER: zabbix
MYSQL_PASSWORD: zabbixpass
MYSQL_DATABASE: zabbix
ZBX_SERVER_HOST: zabbix-server
PHP_TZ: Europe/Madrid
depends_on:
- mysql-server
ports:
- "8080:8080"
zabbix-agent:
image: zabbix/zabbix-agent:alpine-7.0-latest
container_name: zabbix-agent
restart: unless-stopped
environment:
ZBX_SERVER_HOST: zabbix-server
depends_on:
- zabbix-server
Launch the Stack
To install Zabbix Server 7.0 on Docker, run:
docker compose up -d
Once everything is up, check logs to make sure all services are healthy:
docker compose logs -f
Access the Zabbix Web UI
Open your browser and navigate to:
http://localhost:8080
Log in using the default credentials:
- Username:
Admin
- Password:
zabbix
Change the password after logging in for better security.
What Services Are Installed?
With the above configuration, you get:
- Zabbix Server 7.0
- MySQL 8.0
- Zabbix Web Interface (Nginx + PHP)
- Zabbix Agent
Security Recommendations
If you’re deploying in production:
- Use Docker secrets for sensitive credentials.
- Secure access with HTTPS using a reverse proxy like HAProxy or Traefik.
- Keep your images up to date with
docker compose pull
.
Final Thoughts
This guide has shown you how to install Zabbix Server 7.0 on Docker quickly and efficiently using Docker Compose. It’s a great way to test and deploy the platform in controlled environments or small-scale setups. However, for production-grade infrastructures, we highly recommend deploying Zabbix in a high availability (HA) architecture. This ensures resilience against the failure of a single node or even an entire data center, maintaining your monitoring system’s continuity and reliability. Scalability, redundancy, and disaster recovery should always be part of your long-term monitoring strategy.