Harden it
For: self-hosters putting the server on the internet. At the end: you know what’s locked down already, and the few things that are on you.
Already done for you
Section titled “Already done for you”- Containers. Every wow-stats container runs as its own user (uid 10001), on a read-only
root filesystem with only
/tmpwritable, with every Linux capability dropped andno-new-privileges. The image holds Python’s standard library plus two packages (cryptography for the sealed site, FastMCP for the MCP endpoint), no shell needed at run time. - Listening. Every published port binds
127.0.0.1. VictoriaLogs has no published port at all: onlyuiandpublishreach it. - One view per process. The public view and the full view are separate processes, so a routing mistake can’t hand your full view to a visitor. The public answers are cut to an allow list on the server: a field the code adds later stays private until someone adds it to the list (Privacy tiers).
- Static sites. Files only: no login, no cookie, no backend call. The sealed site’s data is encrypted, and its key never reaches the server, a log or a proxy.
- Host names. The page answers only for localhost, IP addresses and the names you set
(
PUBLIC_URL,MCP_PUBLIC_URL,ALLOWED_HOSTS), so a web page can’t read yours through your browser.AUTH=openrefuses to listen beyond loopback unless you say so (ALLOW_OPEN). - The page. A strict Content Security Policy (scripts, styles and fonts from the server
itself, no third-party code),
Referrer-Policy: no-referrer. Outbound links to Wowhead carry no referrer. - The MCP. OAuth with PKCE, a consent page per client, tokens bound to your
/mcpaddress, an allow list of known clients, a 1 MiB request limit. Who gets in is checked at every token refresh, against your identity provider’s answer. - Uploads.
/ingesttakes events only with its password, and the server screens every event before storing it. - Logs. Never a password, key, token or price.
On you
Section titled “On you”- Keep the ports on
127.0.0.1and reach them through a reverse proxy with HTTPS (Put it behind a reverse proxy). Never publish VictoriaLogs (9428): it answers anyone, with every event. - Put a login on the full view.
UI_AUTH=basicwith a long password, orAUTH=proxybehind a login proxy that replacesX-Forwarded-Useron every request. WithAUTH=proxythe server also needs to know the proxy:PROXY_TRUSTED_CIDRSand/orPROXY_SECRET_FILE.openis only for a port no one else reaches. - Use long random secrets.
INGEST_PASSWORDandBASIC_AUTH_PASSWORDneed 12 characters; use 24 or more. Keep.envatchmod 600. Secrets in files undersecrets/(the_FILEvariables) stay out ofdocker inspect. - Keep
MCP_SIGNING_KEY_FILEprivate and stable. It signs every AI token. - Never route the internal ports: the static server’s upload port, the full view’s share
port, the renderer, the exporter’s
/metrics(HTTP endpoints, never route these). - Give the renderer nothing. If you run it: no secrets, no route to your stores, out to
wow.zamimg.comonly. It runs a third-party script in Chromium without a sandbox. - On Kubernetes, add network policies: the static pod has no route out at all, the publisher reaches the stores and the static pod’s upload port, the renderer only Wowhead (Deploy without compose).
- Update. Read the changelog and upgrade when a release comes out.
What the security review left open on purpose: Security notes. Found a security problem in wow-stats itself? See SECURITY.md.