- Jinja 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| defaults | ||
| meta | ||
| tasks | ||
| templates | ||
| .gitignore | ||
| CHANGELOG.md | ||
| LICENSE | ||
| README.md | ||
Uptime Kuma
Deploys Uptime Kuma 2 with SQLite via Docker Compose, routed through Traefik. Optionally puts oauth2-proxy in front of it for an OIDC login (Keycloak), since Uptime Kuma has no SSO of its own.
Requirements
- Docker
community.dockerAnsible collectionuptime_kuma_traefik: trueneeds an existing externaltraefik_webnetwork
Variables
| Variable | Default | Description |
|---|---|---|
uptime_kuma_instance |
uptime-kuma |
Compose project name and container name prefix. |
uptime_kuma_data_path |
/data/uptime-kuma |
SQLite database and uploads. |
uptime_kuma_docker_path |
/docker/uptime-kuma |
Compose file. |
uptime_kuma_version |
2-slim |
louislam/uptime-kuma image tag. |
uptime_kuma_domain |
~ |
Required. Public domain, no protocol. |
uptime_kuma_traefik |
true |
Traefik labels on Kuma, or on oauth2-proxy with SSO. |
uptime_kuma_traefik_certresolver |
default |
Traefik certificate resolver. |
uptime_kuma_extra_domains |
[] |
Further domains for the same instance, e.g. a status page's own domain, see Status page domains. |
uptime_kuma_extra_certresolver |
http |
Traefik certificate resolver for uptime_kuma_extra_domains (HTTP challenge). |
uptime_kuma_port |
~ |
Exposes the same on 127.0.0.1:<port>. |
uptime_kuma_local_port |
~ |
Exposes Uptime Kuma itself on 127.0.0.1:<port>, also with SSO (bypasses oauth2-proxy), e.g. to scrape /metrics. |
uptime_kuma_extra_hosts |
{} |
hostname: IP entries for both containers (SSO provider, own public names). |
uptime_kuma_networks |
[] |
Further Docker networks Kuma joins (e.g. signal_api for Signal notifications). Created if missing. |
uptime_kuma_sso_conf |
~ |
OIDC login, see SSO. |
uptime_kuma_oauth2_proxy_version |
v7.15.5 |
quay.io/oauth2-proxy/oauth2-proxy image tag. |
uptime_kuma_uninstall |
false |
Stops and removes containers and the compose directory. |
uptime_kuma_purge |
false |
Also removes the data directory. Requires uptime_kuma_uninstall: true. Irreversible. |
SSO
With uptime_kuma_sso_conf set, oauth2-proxy takes all traffic and requires an OIDC login (PKCE S256). These stay public: status pages (/status/..., /api/status-page/...), badges (/api/badge/...), push monitors (/api/push/...) and the static files they load.
| Key | Required | Default | Description |
|---|---|---|---|
issuer_url |
yes | — | e.g. https://auth.example.com/realms/<realm> |
client_id |
yes | — | OIDC client ID. |
client_secret |
yes | — | OIDC client secret. |
cookie_secret |
yes | — | 16, 24 or 32 characters (openssl rand -hex 16). |
groups_claim |
no | groups |
Token claim checked against allowed_groups. |
allowed_groups |
no | unset | Only users with one of these values get in. Unset: every user of the realm. |
Redirect URI to register: https://<uptime_kuma_domain>/oauth2/callback.
Uptime Kuma itself only knows one local user. Once after the first deploy:
- Open the domain, log in through SSO, create the Uptime Kuma user (keep its password as break-glass access).
- Settings > Security > Disable Auth.
From then on the SSO login is the only one. Everyone allowed in shares that one Uptime Kuma account.
Status page domains
To serve a status page on its own domain (e.g. status.example.org for the page /status/example):
- Point the domain at the Traefik host and add it to
uptime_kuma_extra_domains. - In Uptime Kuma, add it under the status page's settings > Domain Names.
Uptime Kuma then serves that page at / of the domain. The extra domains get their certificates from uptime_kuma_extra_certresolver, which needs an HTTP challenge when they are outside the DNS zone of the main resolver. With SSO, / is public too (it's the same app shell as /status/...); the dashboard data still needs the login.
Notes
UPTIME_KUMA_DB_TYPE=sqliteskips the database setup screen. MariaDB isn't supported by this role.- The dashboard's live updates use a WebSocket, which oauth2-proxy passes through.
- The rendered
compose.ymlis mode0600(client and cookie secret).