Geavanceerd
Zoeken inInstallatiegidsen
Zo zoek je
  • Plak een foutmelding tussen aanhalingstekens, bijv. "permission denied", om de oplossingstabel te vinden.
  • Kies een gebied en een deel van de gids (installeren, eerste instellingen, dagelijks gebruik, beveiliging, oplossingen) om direct naar de juiste stap te gaan.
  • "twee woorden" vindt precies die zin.
  • Gewone woorden vinden namen, teksten en voorbeelden.
  • ↑ ↓ bewegen · Enter openen · Esc sluiten · / zoeken
Probeer:

Gids 83Uptime Kuma · Monitoring

Install and set up Uptime Kuma (uptime checks and status page)

Uptime Kuma is a simple, beautiful self-hosted monitor: it checks websites, APIs, ports, DNS, certificates, Docker containers and cron jobs every minute, sends an alert to Telegram, Slack, Teams, email and 90+ other services when something is down, and shows public status pages. It is perfect for small teams, agencies and as an outside "is it really up?" check next to Prometheus or Zabbix. This guide runs it with Docker behind Nginx with HTTPS, creates monitors and notifications, a status page and push monitors for cron jobs.

  • 9 Lessen
  • 7 Commando's

Dit deel is nog niet vertaald. Je ziet de Engelse tekst.

$ als gewone gebruiker# als root (of met sudo)

83.1

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.

ItemValue
Imagelouislam/uptime-kuma (use the current major tag, for example :2)
Data/app/data in the container (a volume) — SQLite database, or MariaDB in v2
Port3001 (web UI)
Runs onany 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.

83.2

Install with Docker (RHEL and Ubuntu)

Install Docker first (see the Docker guide), then:

mkdir -p ~/uptime-kuma && cd ~/uptime-kuma
~/uptime-kuma/compose.yaml
services:
  uptime-kuma:
    image: louislam/uptime-kuma:2
    restart: unless-stopped
    ports:
      - "127.0.0.1:3001:3001"
    volumes:
      - data:/app/data
volumes:
  data:
docker compose up -d
docker compose logs -f
… Listening on 3001

Put Nginx with HTTPS in front (Certbot for the certificate). Uptime Kuma uses WebSockets:

/etc/nginx/conf.d/status.example.com.conf
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;
    }
}
nginx -t && systemctl reload nginx

Open https://status.example.com and create the admin account at once (the first visitor creates it).

83.3

First configuration: settings, notifications, monitors

WhereSettingWhy
Settings → SecurityTwo-factor authentication onThe admin can change and see everything.
Settings → Reverse ProxyTrust proxies: yesCorrect client IPs behind Nginx.
Settings → NotificationsAdd Telegram / Slack / Teams / SMTP email; "Default enabled"Every new monitor alerts automatically.
Settings → Backup / Monitor HistoryKeep history 90–180 daysThe database stays small.
Settings → TLS Certificate ExpiryNotify 21, 14, 7 days beforeNo 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).

83.4

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/null

If the backup fails or does not run, no push arrives and you get an alert.

Commando's in deze les

83.5

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).

83.6

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.

83.7

Update and remove

cd ~/uptime-kuma
docker compose pull && docker compose up -d
docker compose down

Back up the data volume before a major upgrade (v1 → v2 migrates the database).

83.8

Fix common problems

ProblemCauseFix
UI loads but stays "connecting…"WebSocket not proxied.Add Upgrade/Connection headers and proxy_http_version 1.1.
False "down" alertsTimeout too short, or a single network glitch.Retries 2–3, longer timeout, check from a second monitor.
Keyword monitor fails although the site worksKeyword not in the HTML (loaded by JavaScript) or case.Choose text from the HTML source; check "case sensitive".
Push monitor alerts every dayHeartbeat 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 updateNo volume (data was inside the container).Always use a named volume for /app/data; restore from backup.
Notifications do not arriveWrong token/webhook or SMTP blocked.Use "Test" in the notification settings; check the logs.

83.9

Next steps

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.

Alle commando's in dit hoofdstuk