Production‑ready Munin master in Docker (Debian 13). It serves on‑demand HTML and graphs via FastCGI, uses rrdcached to batch RRD writes, and supports e‑mail alerts via msmtp. Nodes and contacts are generated from environment variables.
-
Copy env and edit values
cp .env.sample .env
-
Build and run
docker compose up -d --build
-
Open the UI
- On‑demand HTML and graph rendering via FastCGI (default)
- rrdcached enabled for reduced disk I/O
- E‑mail alerts using your own SMTP server (opt‑in)
- Nodes/contacts generated from environment
- Timezone configurable via
TZ
- Bind mounts for persistence under
./data
Bind mounts (created automatically):
./data/munin/lib
->/var/lib/munin
./data/munin/www
->/var/www/munin
./data/log/nginx
->/var/log/nginx
./data/log/munin
->/var/log/munin
(also containsmsmtp.log
)
All settings live in .env
(see .env.sample
).
Variable | Default | Description | Example |
---|---|---|---|
NGINX_PORT_HTTP |
80 |
Host port mapped to container 80/tcp . |
82 |
TZ |
UTC |
Container timezone. | Europe/Moscow |
USE_MAIL_NOTIFICATIONS |
0 |
Enable e‑mail alerts (1 to enable). |
1 |
NODES |
empty | Multi‑line name:address pairs (one per line). Prefer defining in compose environment using a block scalar. |
server1:10.0.0.101 server2:10.0.0.102 |
ALERT_FROM |
— | Envelope sender for alerts (used when mail is enabled). | noreply@example.com |
ALERT_TO |
— | Space‑separated recipient list (used when mail is enabled). | ops@example.com |
SMTP_HOST |
— | SMTP server host (mail on). | smtp.example.com |
SMTP_PORT |
587 |
SMTP server port (mail on). | 587 |
SMTP_USER |
— | SMTP username (mail on). | noreply@example.com |
SMTP_PASSWORD |
— | SMTP password (mail on). | •••••• |
SMTP_AUTH |
on |
SMTP auth toggle (mail on). | on |
SMTP_TLS |
on |
Use TLS (mail on). | on |
SMTP_STARTTLS |
on |
Use STARTTLS (mail on). | on |
SMTP_FROM |
— | From header (display name + address). | "Munin Bot <noreply@example.com>" |