Self Host Wizard Docs

Web analytics (umami)

Web analytics on a Self Host Wizard box: the umami piece, served at analytics.<apps domain>, forward sign-in, memory limit 360 MB.

At a glance

FieldValue
Addresshttps://analytics.<apps domain>
Sign-inforward: Caddy asks Authelia before the app sees a request (forward auth)
Memory limit360 MB (ram_mb: measured peak × 1.3)
Databasepostgres
Needsauthelia, postgres
Needed bynothing
Containersumami, umami-sso
Image: umamighcr.io/umami-software/umami:3.5.0@sha256:b64f40400d77bcadd39cf5c62a1e368c99524ca442024f96e1133355a19a5dbc
Image: umami-ssoghcr.io/umami-software/umami:3.5.0@sha256:b64f40400d77bcadd39cf5c62a1e368c99524ca442024f96e1133355a19a5dbc
Only these groups get inadmins
Open without sign-in/script.js /api/send /api/batch /recorder.js /api/record /p/* /q/*
Set-up script after startscripts/post-up.sh, daily
Licence (from the README)MIT
Upstream (from the README)https://github.com/umami-software/umami

Turn it on

thx enable adds umami and everything it needs to the box's state; thx apply then installs it. Apps are applied only once site_domain is set.

sudo thx enable umami
sudo thx apply

Engineering notes (pieces/umami/README.md)

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)

PathWhy
/script.jsthe tracker script sites embed
/api/send, /api/batchcollect endpoints the tracker posts to
/recorder.js, /api/recordsession 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).

Facts on this page come from these files in the selfhostwizard repository:

  • pieces/umami/piece.toml
  • pieces/umami/compose.yaml
  • pieces/umami/README.md
  • internal/piece/piece.go

This page is generated from the code at build time, so it changes when the code does.