Skip to Content

Deploy Uptime Kuma with Docker Compose and Caddy on Ubuntu (Production Guide)

A practical, secure setup for teams who need reliable uptime alerts without SaaS lock-in.

Primary keyword: Uptime Kuma Docker Compose deployment

Need a dependable monitoring page for customer-facing services without paying per-check fees? This guide shows a full Uptime Kuma Docker Compose deployment with a Caddy reverse proxy on Ubuntu. It's a solid fit for agencies, SaaS teams, and internal IT ops that need status visibility, SSL, and easy alerting.

What you'll build (real-world use case)

You will deploy Uptime Kuma behind Caddy with automatic HTTPS, persistent storage, restart policies, and a minimal firewall profile.

Prerequisites

  • Ubuntu 22.04+ server
  • DNS A record for status.example.com
  • SSH sudo access
  • Ports 80/443 open

Step 1: Install Docker Engine + Compose plugin

sudo apt update
sudo apt install -y ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo $VERSION_CODENAME) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl enable --now docker
sudo usermod -aG docker $USER

Step 2: Project structure

sudo mkdir -p /opt/uptime-kuma/{data,caddy}
sudo chown -R $USER:$USER /opt/uptime-kuma
cd /opt/uptime-kuma

Step 3: Compose and Caddy config

services:
  kuma:
    image: louislam/uptime-kuma:1
    container_name: uptime-kuma
    restart: unless-stopped
    volumes:
      - ./data:/app/data
    expose:
      - "3001"
    healthcheck:
      test: ["CMD", "node", "/app/extra/healthcheck"]
      interval: 30s
      timeout: 10s
      retries: 5

  caddy:
    image: caddy:2.8
    container_name: uptime-caddy
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - ./caddy/Caddyfile:/etc/caddy/Caddyfile:ro
      - caddy_data:/data
      - caddy_config:/config
    depends_on:
      - kuma

volumes:
  caddy_data:
  caddy_config:
status.example.com {
  encode zstd gzip
  reverse_proxy kuma:3001
  header {
    Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
    X-Content-Type-Options "nosniff"
    X-Frame-Options "SAMEORIGIN"
    Referrer-Policy "strict-origin-when-cross-origin"
  }
}

Step 4: Launch and validate

cd /opt/uptime-kuma
docker compose pull
docker compose up -d
docker compose ps
docker compose logs --tail=80 caddy kuma

Configuration and security best practices

  • Back up /opt/uptime-kuma/data daily.
  • Use key-only SSH + fail2ban.
  • Patch monthly: docker compose pull && docker compose up -d.
  • Test notifications for every on-call channel.

Secondary keywords covered: Caddy reverse proxy, HTTPS monitoring dashboard, self-hosted uptime monitoring, Docker health checks, and Ubuntu server hardening.

Alternative deployment options

  • Docker Compose + Traefik
  • Kubernetes + Ingress
  • Docker + Cloudflare Tunnel

Verification checklist

  1. TLS certificate valid
  2. Monitors passing
  3. Alert test received
  4. Services survive reboot
sudo reboot
# after reconnect
cd /opt/uptime-kuma && docker compose ps

Common issues and fixes

Cert not issued

Fix DNS and open port 80 for ACME challenge.

502 from Caddy

Check upstream service name kuma and container health.

No notifications

Re-test webhook/SMTP and firewall egress rules.

FAQ

Can one instance handle many apps?

Yes, group monitors by tags and status pages.

Production-ready?

Yes for SMB workloads, with backups and host monitoring.

How often should I update?

Monthly minimum, sooner for CVEs.

Can I put Cloudflare in front?

Yes, use Full (strict) TLS mode.

How to add SSO?

Place Authelia/Authentik in front of Caddy admin routes.

Suggested internal links

OpenClaw Docker VPS Deploy: Advanced Cron Automation, Discord Integration, Skill Chaining, and Production Hardening
Take your OpenClaw VPS deployment to the next level with sophisticated cron-based automation workflows, Discord channel access, multi-skill pipeline chaining, and the production hardening that keeps an always-on AI assistant reliable under real-world conditions.