Open Source · GitHub

Uptime Kuma Cluster

Turn single-node Uptime Kuma into a highly available cluster — smart load balancing, automatic failover and health checks, started with a single Docker Compose command.

View on GitHubStar on GitHub
⭐ Free · Open Source (MIT)🐳 Self-hosted · One-command Docker Compose
Cluster architecture
Affiliate pick

A travel eSIM covering 190+ destinations worldwide

Use TRAVEL30 for 30% off sitewide. Cannot be combined with other promo codes.

See eSIM 226 plans

Affiliate link. Buying through it may earn this site a small commission, at no extra cost to you.

Core Features

Built to stay highly available under large-scale monitoring

⚖️

Smart load balancing

A two-stage OpenResty + Lua router assigns each new monitor to the least-busy node based on its current monitor count and status.

🔁

Automatic failover

When a node goes down its monitors are redistributed to healthy nodes, then restored when it recovers — without interruption.

❤️

Health checks

Periodically checks each node's /api/v1/health endpoint; consecutive failures mark it down and trigger failover (30s by default).

🗄️

Shared database

MariaDB replaces local SQLite as shared state, supporting concurrent reads and writes across nodes.

➕

Horizontal scaling

Add or remove Uptime Kuma nodes dynamically — scale out by adding machines as your monitoring grows.

🧩

RESTful API

Adds the /api/v1 REST API the original lacks: create, read, update and delete monitors, nodes, status pages and groups over HTTP, plus /lb cluster operations endpoints.

📌

Fixed-node debugging

Pin traffic to a specific node with a cookie for debugging; the pin clears automatically when that node goes offline.

🐳

One-command Docker

docker-compose-cluster.yaml brings up OpenResty, multiple nodes and MariaDB in a single command.

Original vs Cluster

What this project adds on top of the original Uptime Kuma

FeatureOriginal Uptime KumaThis project (Cluster)
ArchitectureSingle nodeMulti-node HA cluster
DatabaseSQLite (local)MariaDB (shared)
Load balancingNoneOpenResty + Lua smart routing
Failure handlingService interruptionAutomatic monitor redistribution
Horizontal scalingNot supportedDynamic add/remove nodes
Health checksNonePeriodic endpoint checks
Cluster management APINone/lb endpoints for status, health checks and rebalancing
RESTful APINone (monitor changes only via the web UI's Socket.IO)/api/v1 CRUD + Swagger docs

Cluster Management API

All prefixed with /lb for automated monitoring and management

GET
/lb/ping

Liveness check

GET
/lb/health

Cluster health status

GET
/lb/system-status

Full system status report

GET
/lb/available-nodes

List nodes with load metrics

GET
/lb/fixed-node/{node}

Pin traffic to a specific node

POST
/lb/trigger-health-check

Manually trigger a health scan

GET
/lb/trigger-rebalancing

Force monitor redistribution

GET
/lb/rebalancing-status

View rebalancing progress

RESTful API (/api/v1)

The original Uptime Kuma only lets you manage monitors in the web UI. This API lets CI/CD, scripts and internal systems manage the whole cluster with plain HTTP and JSON.

GET
/api/v1/monitors

List all monitors

POST
/api/v1/monitors

Create a monitor; without node_id it goes to the online node with the fewest monitors

GET
/api/v1/monitors/{id}

Get one monitor

PUT
/api/v1/monitors/{id}

Update a monitor

DELETE
/api/v1/monitors/{id}

Delete a monitor

GET
/api/v1/monitors/{id}/heartbeats

Fetch heartbeats for a time period

GET
/api/v1/nodes

List cluster nodes (POST / PUT / DELETE also available)

GET
/api/v1/nodes/{id}/monitors

See which monitors a node is running

GET
/api/v1/status-pages

List status pages (POST / PUT / DELETE by slug)

POST
/api/v1/groups

Create a monitor group (GET / PUT /api/v1/groups/{id} too)

GET
/api/v1/notifications

List notification settings

GET
/api/v1/health

Node liveness check (no auth, no rate limit)

  • Auth: send Authorization: Bearer <JWT>. The server verifies the token and checks the account is still active. /api/v1/status and /api/v1/health need no login.
  • Rate limit: 100 requests per IP per 15 minutes by default, then 429. Adjust with the API_RATE_LIMIT environment variable.
  • Capacity: each node holds up to 1,000 active monitors. When every node is full the API returns an error instead of overloading one.
  • Responses always look like { ok, msg, data }; validation failures list their reasons in errors.
  • Docs: /api-docs serves Swagger UI for trying requests in the browser; /api-docs.json is the OpenAPI 3.0 spec for generating clients.

Example: create an HTTP monitor with curl

curl -X POST http://localhost:8084/api/v1/monitors \
  -H "Authorization: Bearer $UPTIME_KUMA_JWT" \
  -H "Content-Type: application/json" \
  -d '{"name":"Website","type":"http","url":"https://example.com","interval":60}'

# 201 => {"ok":true,"msg":"Monitor created successfully","data":{"monitor_id":42,"node_id":"node2"}}

Quick Start

  1. 1

    Clone https://github.com/markku636/uptime-kuma-cluster and enter the project directory.

  2. 2

    Run the Docker Compose command below to bring up OpenResty, three Uptime Kuma nodes and MariaDB at once.

  3. 3

    Verify with curl http://localhost:8084/lb/health and /lb/available-nodes that the cluster is healthy.

Requires Docker and Docker Compose; node count, health-check interval and more are configurable via environment variables.

Need a highly available platform that handles monitoring at scale?

Free, open source (MIT) and self-hostable. See the full docs, Docker Compose and source on GitHub.

Support open source

Every tool here is free and open source

No paywall, no sign-up, and the source is public on GitHub. If one of them saved you time, buy me a coffee so the updates and the next tool keep coming.

Buy me a coffee

Custom amount·Secure PayPal checkout

eSIM 226

Deal

Stay online when you work abroad

eSIM 226 is a travel eSIM covering 190+ destinations worldwide: buy the plan before you fly, scan the QR code on landing and you are online. No SIM swap, no roaming bill, and your own number stays in the phone to keep receiving bank SMS. Japan 3GB / 15 days starts around US$3.4, so a short trip never costs a full month. Use TRAVEL30 for 30% off sitewide. Cannot be combined with other promo codes.

  • 190+ destinations across Asia, Europe and the Americas
  • Instant QR activation, nothing to ship or queue for
  • Local rates instead of roaming, no bill shock at home

Affiliate link. Buying through it may earn this site a small commission, at no extra cost to you.

See plans