Self Host Wizard Documentación

Página de estado y monitor (uptime-kuma)

Página de estado y monitor en una caja Self Host Wizard: la pieza uptime-kuma, en status.<dominio de apps>, ingreso forward, límite de memoria 270 MB.

De un vistazo

DatoValor
Direcciónhttps://status.<dominio de apps>
Ingresoforward: Caddy le pregunta a Authelia antes de que la app vea el pedido (forward auth)
Límite de memoria270 MB (ram_mb: pico medido × 1,3)
Base de datosninguna compartida: guarda sus datos en THX_DATA
Necesitaauthelia, lldap
La necesitannada
Contenedoresuptime-kuma
Imagen: uptime-kumalouislam/uptime-kuma:2.5.12@sha256:8e4b6bef96417ec98a35dc103c99cc64fc229a01e584e56d95d9004d2003c02a
Solo entran estos gruposadmins
Abierto sin ingresar/status/* /api/status-page/* /api/badge/* /api/push/* /api/entry-page /assets/* /upload/* /icon.svg /icon.svg.* /icon.png /icon-192x192.png /icon-512x512.png /favicon.ico /apple-touch-icon.png /manifest.json /serviceWorker.js /robots.txt
Script de configuración al arrancarscripts/post-up.sh, diario
Licencia (según el README)MIT
Proyecto original (según el README)https://github.com/louislam/uptime-kuma

Cómo activarla

thx enable agrega uptime-kuma y todo lo que necesita al estado de la caja; después thx apply la instala. Las apps se aplican recién cuando site_domain está definido.

sudo thx enable uptime-kuma
sudo thx apply

Notas técnicas (pieces/uptime-kuma/README.md)

Las notas técnicas de cada pieza están en inglés, tal como están en el repositorio.

Upstream: Uptime Kuma 2.5.12, https://github.com/louislam/uptime-kuma, MIT. Image: louislam/uptime-kuma:2.5.12@sha256:8e4b6bef96417ec98a35dc103c99cc64fc229a01e584e56d95d9004d2003c02a (multi-arch index; docker buildx imagetools inspect lists linux/amd64, linux/arm64, linux/arm/v7).

Served at https://status.<apps_domain>, 127.0.0.1:18090 → container 3001. SQLite in THX_DATA (/app/data), set by UPTIME_KUMA_DB_TYPE=sqlite, so the first-run "pick a database" page never shows; embedded MariaDB off.

Login: forward auth is the only gate

auth = "forward", LLDAP group admins only ([forward] groups). Kuma has no SSO and no REST admin API, so post-up.sh pipes kuma-setup.js into node inside the container and uses the UI's own socket.io events:

  1. first-run setup: user admin, password THX_SECRET_ADMIN_PASSWORD (never used by people);
  2. disableAuth = true: whoever passes Authelia lands in the dashboard as that admin;
  3. monitors for the box's own services, added by name when missing: Authelia (http://authelia:9091/api/health), LLDAP (tcp lldap:3890), Stalwart SMTP (tcp stalwart:25) and IMAPS (tcp stalwart:993), over the piece network thx-uptime-kuma (apply joins authelia and lldap to it as depends, and stalwart to every piece network);
  4. public status page /status/thx listing them; saved only when its monitor list differs.

It prints changed only when it changed something; the test runs it twice and the second run prints nothing.

Consequence of (2): **socket.io is the admin API, so /socket.io/ must never be public.** It is not in public_paths; the test proves anonymous and non-admin requests to it are refused.

Public paths (exact list, [forward] public_paths)

PathWhy
/status/*status page HTML (SPA does not open socket.io on these pages)
/api/status-page/*status page data, heartbeats, manifest, incident history, badge
/api/badge/*per-monitor badges (Kuma serves them only for monitors on a public page)
/api/push/*push monitors: external jobs report in here, by token
/api/entry-pagethe SPA asks it on load
/assets/*, /upload/*JS/CSS bundles; status-page logos
/icon.svg, /icon.svg.*, /icon.png, /icon-192x192.png, /icon-512x512.png, /favicon.ico, /apple-touch-icon.png, /manifest.json, /serviceWorker.js, /robots.txtstatic files

Everything else — /, /dashboard, /settings, /socket.io/, /metrics, /setup-database-info — goes through forward auth. Verified: every src/href in the /status/thx HTML answers 200 without login.

Measured (dev PC, amd64, test.sh)

Peak 206 MiB (max of three runs: 198, 206, 172) over setup, 4 monitors checking, status page and dashboard requests → ram_mb = 270 (206 × 1.3, rounded up). CPU: one node process; checks every 60 s.

Test

HEAVY_CLASS=check ~/.cache/run-heavy.sh 4G pieces/uptime-kuma/test.sh — throwaway LLDAP + Authelia + Caddy + mail catcher (as stalwart); proves post_up idempotence, public status page + API + assets without login, seeded monitors reporting UP, /, /dashboard, /socket.io/, /metrics → 302 to Authelia, alice (not admin) → 403, boss (admins) → dashboard and socket.io autoLogin.

Known gaps

  • Which monitors to seed is fixed to the core services: the piece cannot see which other pieces are enabled. A THX_PIECES variable (enabled pieces with host + port) would let it add one HTTP monitor per app.
  • Notifications (mail on down) are not configured yet; Kuma's SMTP notification would use THX_SMTP_*.
  • No per-company status pages; one page for the box. Kuma has no team concept, so org-* groups map to nothing; admins only.

Los datos de esta página salen de estos archivos del repositorio selfhostwizard:

  • pieces/uptime-kuma/piece.toml
  • pieces/uptime-kuma/compose.yaml
  • pieces/uptime-kuma/README.md
  • internal/piece/piece.go

Esta página se genera desde el código al compilar el sitio, así que cambia cuando cambia el código.