NewCode CLOUD — 20% off your first month on all cloud VPSClaim

Uptime Monitoring with Uptime Kuma: Get Alerts When Your Website or Server Goes Down

You should hear that your website is down from your monitoring, not from a customer. Uptime Kuma is a free, self-hosted monitoring tool with a clean web interface. It checks websites, APIs, ports and servers every few seconds or minutes, sends alerts to dozens of channels — Telegram, email, Slack, Discord, WeChat Work, DingTalk and more — and can publish a public status page.

Where to run it

A monitor on the same server it watches cannot report that the server is down. Run Uptime Kuma on a separate, small server, ideally in a different location:

  • Monitoring a Hong Kong server? Run Kuma on a small VPS in Japan or the US.
  • Checking the experience of users in mainland China? Add checks from a machine there too, or combine with online multi-location tools.

A 1 vCPU / 1 GB VPS comfortably runs Uptime Kuma with hundreds of monitors.

Install with Docker

Install Docker first (guide), then:

sudo mkdir -p /srv/uptime-kuma && cd /srv/uptime-kuma

compose.yaml:

services:
  uptime-kuma:
    image: louislam/uptime-kuma:1
    restart: unless-stopped
    ports:
      - "127.0.0.1:3001:3001"
    volumes:
      - ./data:/app/data
docker compose up -d

Put it behind Nginx with HTTPS on a subdomain such as status.example.com — the same reverse proxy configuration as in Node.js with Nginx, including the WebSocket headers (Kuma’s interface uses WebSockets). Or add Caddy as shown in the Docker Compose guide.

Open the URL and create the admin account immediately. Enable two-factor authentication in Settings → Security.

What to monitor

Monitor type Use for Example
HTTP(s) Websites and APIs; checks status code https://example.com/
HTTP(s) – Keyword Page actually renders (not just 200 from an error page) Keyword: your site’s footer text
TCP Port Services without HTTP SSH 22, MySQL over a private network, game servers
Ping Basic reachability of a server Server IP
DNS Records resolve correctly A record of your domain
Push Cron jobs and backups report in Heartbeat URL
Docker container Container is running (on the same host)

Practical settings

  • Interval: 60 seconds is a good default; 20–30 seconds for critical services.
  • Retries: 1–2 before alerting, to avoid alerts from a single lost packet on long international paths.
  • Certificate expiry notification: enable on HTTPS monitors — Kuma warns before SSL certificates expire, catching broken auto-renewal.
  • Accepted status codes: 200–299 by default; adjust for endpoints that redirect.

Check what users see

A homepage returning 200 can still be broken (database error page, PHP warning). Use a keyword monitor for a string that only appears on a working page, and add a monitor for an important function — a health-check endpoint in your app that tests the database:

https://example.com/health   → returns "ok" only if the database responds

Heartbeats for cron jobs and backups

Push monitors invert the logic: your job calls Kuma, and Kuma alerts if the call does not arrive in time. Create a Push monitor, copy its URL, and call it at the end of your backup script:

#!/usr/bin/env bash
set -euo pipefail
/usr/local/bin/backup.sh
curl -fsS -m 10 "https://status.example.com/api/push/AbCdEf123?status=up&msg=OK" > /dev/null

Set the monitor’s interval to slightly longer than the job’s schedule (e.g. 25 hours for a daily job). If the backup fails, set -e stops the script before the push, and you get an alert. More in cron jobs.

Notifications

Settings → Notifications → Setup Notification. Popular options:

  • Telegram: create a bot with @BotFather, get the token, send the bot a message, and use your chat ID. Fast and reliable for teams in Asia.
  • Email (SMTP): use a mail provider’s SMTP credentials.
  • Slack / Discord / Microsoft Teams: webhook URLs.
  • WeChat Work (企业微信), DingTalk (钉钉), Feishu (飞书): webhooks for teams in China.

Attach notifications to each monitor, or mark one as default for new monitors. Test each channel with the Test button.

Think about who gets woken up: send critical production alerts to phones, less important ones to a chat channel.

Status pages

Kuma can publish status pages showing selected monitors, with your logo and incident announcements: Status Pages → New Status Page. Point a domain such as status.example.com at it. Customers can check the status themselves, which reduces support tickets during incidents.

Only include public-facing services; do not expose internal hostnames or IPs.

Maintenance windows

Planned maintenance should not trigger alerts. Maintenance → Schedule Maintenance pauses selected monitors and shows a maintenance notice on the status page.

Backups and updates

Everything is stored in the data directory (an SQLite database). Back it up with your other data (restic).

Update:

cd /srv/uptime-kuma
docker compose pull
docker compose up -d

Interpreting alerts from far away

Long international paths occasionally lose packets. If a monitor in the US flaps for a Hong Kong site while users in Asia are fine, increase retries, compare with a second monitor location, and look at MTR reports from both ends before concluding the server is at fault.