A REST API wrapper for Uptime Kuma
5.0K
Full details on the Website
A REST API wrapper for Uptime Kuma. Manage monitors, tags, notifications, proxies, Docker hosts, maintenance windows, and status pages with plain authenticated HTTP calls.
Uptime Kuma's own REST endpoints are limited to badge images, /metrics, and status page data. There is no REST API for monitors, tags, notifications, or maintenance. Those only exist over its Socket.IO API, which also only authenticates with a username and password, not an API key.
This image bridges the two: it holds one persistent, logged-in Socket.IO session internally, and exposes a conventional REST API on top of it. Every request to the wrapper is authenticated with a real Uptime Kuma API key over HTTP Basic Auth.
REST client --Basic Auth, API key--> kuma-restapi-wrapper --Socket.IO, user/pass--> Uptime Kuma
1. Create an API key in Uptime Kuma Settings → API Keys → Add API Key.
2. Run the container
docker run -d \
--name kuma-restapi-wrapper \
-p 3100:3100 \
-e KUMA_URL=http://uptime-kuma:3001 \
-e KUMA_USERNAME=username \
-e KUMA_PASSWORD=password \
pocketsized/kumarestapi
3. Call it
curl -u api:your_api_key http://uptimekuma:3100/monitors
services:
kuma-restapi-wrapper:
image: pocketsized/kumarestapi
restart: unless-stopped
ports:
- "3100:3100"
environment:
KUMA_URL: http://uptime-kuma:3001
KUMA_USERNAME: username
KUMA_PASSWORD: password
# KUMA_TOTP_SECRET: your_2fa_secret # only if 2FA is enabled
# APIKEY_CACHE_TTL: "30"
KUMA_URL needs to resolve from inside the container — use the service name if Uptime Kuma runs in the same Docker network, or host.docker.internal if it runs on the host.
| Variable | Required | Description |
|---|---|---|
KUMA_URL | yes | Base URL of your running Uptime Kuma instance. |
KUMA_USERNAME | yes | A real Uptime Kuma account the wrapper logs in as internally. |
KUMA_PASSWORD | yes | Password for that account. |
KUMA_TOTP_SECRET | no | Base32 2FA secret, if that account has 2FA enabled. The wrapper computes TOTP codes itself for unattended startup. |
PORT | no | The wrapper's own REST server port. Defaults to 3100. |
APIKEY_CACHE_TTL | no | Seconds a validated API key is cached before re-checking against Uptime Kuma. 0 validates every request. |
All routes are exposed via the Swagger UI. Anything you want as the username and your Uptime Kuma API key as the password.
| Method | Path | Description |
|---|---|---|
GET | /api-docs | Interactive Swagger UI |
GET | /openapi.json | Raw OpenAPI 3.0 spec |
node:24-alpine; only production dependencies ship in the final image.HEALTHCHECK polling /healthz every 30 seconds.latest — most recent stable buildx.y.z — pinned releasesContent type
Image
Digest
sha256:52e0759bc…
Size
59.4 MB
Last updated
2 months ago
docker pull pocketsized/kumarestapi