Skip to main content

Self-Hosting Guide: Deploy Uptime Kuma for Monitoring

·OSSAlt Team
uptime-kumamonitoringself-hostingdockerguide

Self-Hosting Guide: Deploy Uptime Kuma for Monitoring

Uptime Kuma is the most popular open source monitoring tool with 62K+ GitHub stars. It replaces Better Stack, Pingdom, and UptimeRobot. One Docker command gives you monitoring for all your services with 90+ notification channels.

Requirements

  • VPS with 512 MB RAM minimum
  • Docker
  • Domain name (e.g., status.yourdomain.com)
  • 5 GB disk

Step 1: Deploy with Docker

docker run -d \
  --name uptime-kuma \
  --restart unless-stopped \
  -p 3001:3001 \
  -v uptime-kuma:/app/data \
  louislam/uptime-kuma:latest

That's it. Uptime Kuma runs on port 3001.

Step 2: Reverse Proxy (Caddy)

# /etc/caddy/Caddyfile
status.yourdomain.com {
    reverse_proxy localhost:3001
}
sudo systemctl restart caddy

Step 3: Initial Setup

  1. Open https://status.yourdomain.com
  2. Create your admin account
  3. Start adding monitors

Step 4: Add Monitors

Monitor types available:

TypeUse Case
HTTP(s)Website availability, API endpoints
TCP PortDatabase, Redis, custom services
PingServer reachability
DNSDNS record verification
Docker ContainerContainer health via Docker socket
Steam Game ServerGame server monitoring
MQTTIoT broker monitoring
gRPCgRPC service health
KeywordCheck if a page contains specific text
JSON QueryValidate API response values
PushReceive heartbeats from your services

Example monitors to set up:

Website:         https://yourdomain.com          (HTTP, 60s interval)
API:             https://api.yourdomain.com/health (HTTP, 30s interval)
Database:        db.internal:5432                 (TCP, 60s interval)
Redis:           redis.internal:6379              (TCP, 60s interval)
Mail server:     mail.yourdomain.com:587          (TCP, 300s interval)
DNS:             yourdomain.com (A record)        (DNS, 300s interval)

Step 5: Configure Notifications

Uptime Kuma supports 90+ notification services. Most popular:

ServiceSetup
SlackIncoming webhook URL
DiscordWebhook URL from channel settings
TelegramBot token + chat ID
Email (SMTP)Host, port, username, password
PagerDutyIntegration key
PushoverUser key + app token
NtfyTopic URL (self-hostable too)
GotifyServer URL + app token

Setting up Discord notifications:

  1. Discord channel → Edit ChannelIntegrationsWebhooks
  2. Copy webhook URL
  3. In Uptime Kuma → SettingsNotificationsSetup Notification
  4. Select Discord, paste webhook URL
  5. Set as default notification for all monitors

Step 6: Create Status Pages

  1. Click Status Pages in the sidebar
  2. Create a new status page
  3. Add monitor groups (e.g., "Website", "API", "Infrastructure")
  4. Assign monitors to groups
  5. Customize with your logo and description
  6. Share the public URL with your team or users

Custom domain for status page:

# /etc/caddy/Caddyfile
status.yourdomain.com {
    reverse_proxy localhost:3001
}

Step 7: Docker Socket Monitoring (Optional)

Monitor Docker containers directly:

# Updated docker-compose.yml
services:
  uptime-kuma:
    image: louislam/uptime-kuma:latest
    container_name: uptime-kuma
    restart: unless-stopped
    ports:
      - "3001:3001"
    volumes:
      - uptime-kuma:/app/data
      - /var/run/docker.sock:/var/run/docker.sock:ro

Now add monitors of type Docker Container to track container health.

Step 8: Push Monitors for Cron Jobs

For monitoring cron jobs and background tasks:

  1. Create a Push type monitor in Uptime Kuma
  2. Copy the push URL
  3. Add to your cron job:
# At the end of your cron job
curl -s "https://status.yourdomain.com/api/push/YOUR_PUSH_TOKEN?status=up&msg=OK"

If the push doesn't arrive within the heartbeat interval, Uptime Kuma alerts you.

Production Hardening

Backups:

# Backup SQLite database (daily cron)
docker cp uptime-kuma:/app/data/kuma.db /backups/kuma-$(date +%Y%m%d).db

Updates:

docker pull louislam/uptime-kuma:latest
docker stop uptime-kuma
docker rm uptime-kuma
docker run -d \
  --name uptime-kuma \
  --restart unless-stopped \
  -p 3001:3001 \
  -v uptime-kuma:/app/data \
  louislam/uptime-kuma:latest

Security:

  • Enable 2FA in account settings
  • Use a strong admin password
  • Put behind reverse proxy with HTTPS
  • Consider restricting dashboard access by IP

Resource Usage

MonitorsRAMCPUDisk
1-50256 MB1 core1 GB
50-200512 MB1 core5 GB
200+1 GB2 cores10 GB

VPS Recommendations

ProviderSpecPrice
Hetzner2 vCPU, 2 GB RAM€4.50/month
DigitalOcean1 vCPU, 1 GB RAM$6/month
Linode1 vCPU, 1 GB RAM$5/month

Uptime Kuma is extremely lightweight — it can share a VPS with other services easily.


Compare monitoring tools on OSSAlt — features, notification channels, and self-hosting options side by side.