Dit deel is nog niet vertaald. Je ziet de Engelse tekst.
$ als gewone gebruiker# als root (of met sudo)
Know it before you install
A monitor is one check (HTTP, keyword, TCP port, ping, DNS, certificate, Docker, database, push …) with an interval and retries. Notifications are the channels. Status pages show selected monitors to customers or users. A push monitor waits for your job to call a URL — if the call does not come, it alerts.
| Item | Value |
|---|---|
| Image | louislam/uptime-kuma (use the current major tag, for example :2) |
| Data | /app/data in the container (a volume) — SQLite database, or MariaDB in v2 |
| Port | 3001 (web UI) |
| Runs on | any Linux with Docker or Podman; also Node.js directly |
Op het werk
Run Uptime Kuma outside the infrastructure it watches (another provider or a small VPS) — if your data center is down, the monitor must still work.
Install with Docker (RHEL and Ubuntu)
Install Docker first (see the Docker guide), then:
services:
uptime-kuma:
image: louislam/uptime-kuma:2
restart: unless-stopped
ports:
- "127.0.0.1:3001:3001"
volumes:
- data:/app/data
volumes:
data:Put Nginx with HTTPS in front (Certbot for the certificate). Uptime Kuma uses WebSockets:
server {
listen 443 ssl;
server_name status.example.com;
ssl_certificate /etc/letsencrypt/live/status.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/status.example.com/privkey.pem;
location / {
proxy_pass http://127.0.0.1:3001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
}Open https://status.example.com and create the admin account at once (the first visitor creates it).
First configuration: settings, notifications, monitors
| Where | Setting | Why |
|---|---|---|
| Settings → Security | Two-factor authentication on | The admin can change and see everything. |
| Settings → Reverse Proxy | Trust proxies: yes | Correct client IPs behind Nginx. |
| Settings → Notifications | Add Telegram / Slack / Teams / SMTP email; "Default enabled" | Every new monitor alerts automatically. |
| Settings → Backup / Monitor History | Keep history 90–180 days | The database stays small. |
| Settings → TLS Certificate Expiry | Notify 21, 14, 7 days before | No surprise expired certificates. |
Good first monitors:
- HTTP(s) - Keyword for each website: URL, keyword that must be on the page (for example the shop name) — catches "200 but broken" pages. Interval 60 s, retries 2.
- HTTP(s) for APIs with the health URL, accepted status codes
200-299, Certificate expiry notification on. - TCP Port for SSH, SMTP, databases (from where it is allowed).
- DNS check for your main domain records (A, MX).
- Docker container (with the Docker socket — read-only, see security).
Push monitors for cron jobs and backups
Create a monitor of type Push with "Heartbeat interval" a bit longer than the job (for example 25 h for a daily backup). Uptime Kuma shows a push URL. Call it at the end of the job, only on success:
/usr/local/bin/backup.sh && curl -fsS -m 10 "https://status.example.com/api/push/Xk29aPq7?status=up&msg=OK" >/dev/nullIf the backup fails or does not run, no push arrives and you get an alert.
Status pages and daily use
Status Pages → New: choose a slug (/status/shop), add groups and monitors, a description and a logo; optionally a custom domain. Post incidents and maintenance windows there (maintenance also pauses alerts).
docker compose -f ~/uptime-kuma/compose.yaml logs --tail 50
docker compose -f ~/uptime-kuma/compose.yaml pull && docker compose -f ~/uptime-kuma/compose.yaml up -d
docker run --rm -v uptime-kuma_data:/data -v "$PWD":/backup alpine tar czf /backup/kuma-$(date +%F).tgz -C /data .Real uses at work:
- Outside-in checks of all websites and APIs, with certificate expiry warnings.
- A public status page for customers; maintenance announcements.
- Heartbeats for cron jobs, backups and batch jobs (push monitors).
Make it safe
Security checklist:
- Create the admin account right after the first start; 2FA on.
- HTTPS through Nginx; the container port only on
127.0.0.1. - Docker monitoring: mount the socket read-only, or better use a socket proxy — the socket is root access.
- Status pages show only what customers should see (no internal hostnames or IPs).
- Back up the data volume; pin the major version and update regularly.
Update and remove
Fix common problems
| Problem | Cause | Fix |
|---|---|---|
| UI loads but stays "connecting…" | WebSocket not proxied. | Add Upgrade/Connection headers and proxy_http_version 1.1. |
| False "down" alerts | Timeout too short, or a single network glitch. | Retries 2–3, longer timeout, check from a second monitor. |
| Keyword monitor fails although the site works | Keyword not in the HTML (loaded by JavaScript) or case. | Choose text from the HTML source; check "case sensitive". |
| Push monitor alerts every day | Heartbeat interval shorter than the job period. | Set it a bit longer than the schedule (for example 25 h for daily). |
| Lost all monitors after an update | No volume (data was inside the container). | Always use a named volume for /app/data; restore from backup. |
| Notifications do not arrive | Wrong token/webhook or SMTP blocked. | Use "Test" in the notification settings; check the logs. |
Next steps
- Quick how-tos: Monitor a website from outside, Monitor TLS certificates.
- What runs it: Docker, Nginx, Certbot.
- Deep metrics and alerting: Prometheus + Alertmanager, or Zabbix.
- Back up what it watches: restic.
1Why run Uptime Kuma outside your own data center?
If the data center is down, the monitor must still run to send the alert.
2How does a push monitor catch a backup job that did not run?
The job calls the push URL only on success; if no call arrives within the heartbeat interval, Uptime Kuma alerts.