Estadísticas web (umami)
Estadísticas web en una caja Self Host Wizard: la pieza umami, en analytics.<dominio de apps>, ingreso forward, límite de memoria 360 MB.
De un vistazo
| Dato | Valor |
|---|---|
| Dirección | https://analytics.<dominio de apps> |
| Ingreso | forward: Caddy le pregunta a Authelia antes de que la app vea el pedido (forward auth) |
| Límite de memoria | 360 MB (ram_mb: pico medido × 1,3) |
| Base de datos | postgres |
| Necesita | authelia, postgres |
| La necesitan | nada |
| Contenedores | umami, umami-sso |
Imagen: umami | ghcr.io/umami-software/umami:3.5.0@sha256:b64f40400d77bcadd39cf5c62a1e368c99524ca442024f96e1133355a19a5dbc |
Imagen: umami-sso | ghcr.io/umami-software/umami:3.5.0@sha256:b64f40400d77bcadd39cf5c62a1e368c99524ca442024f96e1133355a19a5dbc |
| Solo entran estos grupos | admins |
| Abierto sin ingresar | /script.js /api/send /api/batch /recorder.js /api/record /p/* /q/* |
| Script de configuración al arrancar | scripts/post-up.sh, diario |
| Licencia (según el README) | MIT |
| Proyecto original (según el README) | https://github.com/umami-software/umami |
Cómo activarla
thx enable agrega umami 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 umami
sudo thx apply
Notas técnicas (pieces/umami/README.md)
Las notas técnicas de cada pieza están en inglés, tal como están en el repositorio.
Upstream: Umami 3.5.0, https://github.com/umami-software/umami, MIT.
Image: ghcr.io/umami-software/umami:3.5.0@sha256:b64f40400d77bcadd39cf5c62a1e368c99524ca442024f96e1133355a19a5dbc
(multi-arch index; docker buildx imagetools inspect lists linux/amd64, linux/arm64).
postgresql-latest currently points at the same digest; the v3 image is Postgres-only.
Served at https://analytics.<apps_domain>, 127.0.0.1:18091 → container 3000. Database: the shared
Postgres (db = "postgres", THX_DB_*); Umami migrates it itself on start. APP_SECRET from
THX_SECRET_APP_SECRET. Telemetry and update checks off.
Login: one sign-in (umami-sso)
auth = "forward", LLDAP group admins only. Umami has no SSO and no header login, and
DISABLE_LOGIN only hides the login page (checked in the 3.5.0 build), so a second service,
umami-sso (same image, node /thx/sso.js, from files/sso.js), holds the published port and
passes every request to umami:3000 unchanged, except GET /login: there it signs in to Umami as
admin with THX_SECRET_ADMIN_PASSWORD, stores the token in the browser the way Umami's own form
does (localStorage["umami.auth"]) and sends the person on (?redirect= only to same-site paths).
So an admin who opens Analytics lands inside with no form. A /login without Remote-User (not
from Caddy's forward auth) gets 403. Umami's "Log out" signs straight back in; leaving is the
office sign-out.
Everyone shares the one Umami account admin (Umami's teams would need per-person Umami users
and a team switcher; not done). Umami ships admin / umami; post-up.sh runs
umami-setup.js in the container and replaces that password with THX_SECRET_ADMIN_PASSWORD
(prints changed only then). Box admins read the password with the secret tooling (under
/etc/thx/secrets/umami/); nobody needs it to get in.
Crawlers are counted
DISABLE_BOT_CHECK=1: Umami normally answers a bot User-Agent with {"beep":"boop"} and records
nothing. Here every visit counts, crawlers included (owner decision 2026-11-30). Only visitors that
run the tracker script are seen at all.
Public paths (exact list, [forward] public_paths)
| Path | Why |
|---|---|
/script.js | the tracker script sites embed |
/api/send, /api/batch | collect endpoints the tracker posts to |
/recorder.js, /api/record | session replay (v3; off unless enabled per website) |
/p/*, /q/* | tracking pixels and tracked links |
Everything else (UI, /api/* admin API, /_next/* UI assets, /share/*) needs login.
Consequence: Umami share links (public dashboards) do not work, because the share page calls
the private API and needs /_next/*. Opening those is possible (Umami's API checks its own
token) but widens what anonymous users reach; not done.
Embed on a company site:
<script defer src="https://analytics.<apps_domain>/script.js" data-website-id="<id>"></script>
Measured (dev PC, amd64, test.sh)
Peak 256 MiB (during the start-up migration), 167 MiB idle after → umami mem_limit 340m
(256 × 1.3). umami-sso peak 13 MiB → 20m. ram_mb = 360.
Test
HEAVY_CLASS=check ~/.cache/run-heavy.sh 4G pieces/umami/test.sh — throwaway LLDAP + Authelia +
Caddy + Postgres; proves post_up idempotence, admin/umami refused and the box secret accepted,
/, /login, /websites, /api/websites → 302 to Authelia, alice → 403, a direct /login to
the shim → 403, boss's /login hands over a working token with no password field, headless Chrome
signed in to the office only opens / and lands inside Umami with no input (zero-click), boss
creates a website, /script.js and POST /api/send (no login) work for a browser and for Googlebot,
and both pageviews show in /api/websites/<id>/stats. Mutation: without DISABLE_BOT_CHECK the
crawler step fails ({"beep":"boop"}).
Known gaps
- One shared Umami account (above).
org-*groups are not mapped. - Share links off (above).