Reverse proxy config
Novak does not run a reverse proxy for the rest of the stack. These are snippets to add to the internal proxy you already run on another host.
One exception, added later and narrower: the portal runs its own small Caddy instance, but only to gate one static page. It does not front Open WebUI, Konzol, or anything else this document covers, and the statement above still holds for all of that.
What problem this solves
Section titled “What problem this solves”Not public access — that’s handled separately (see decisions.md #15: public ingress lives on the VPS, home forwards nothing).
This is about encryption in transit on the local network. Worth being precise about what was and wasn’t already covered:
| Path | Before | Why |
|---|---|---|
| Between Tailscale devices | already encrypted | Tailscale is WireGuard underneath |
| Across the LAN | plaintext | HA → the gateway, browser → console, anything hitting a published port by IP |
So the tailnet was never the exposure. The LAN was.
Which of these may face the internet
Section titled “Which of these may face the internet”None of them. This proxy is internal — it exists for TLS on your own network, not to publish anything. Public ingress is a different proxy, on the VPS, in front of Open WebUI only (decision #15).
That distinction is the one worth holding onto, because the two look identical
in a config file. A reverse_proxy line does not know whether the name in
front of it resolves publicly, and the difference between a private service and
an exposed one is often a single DNS record someone added months earlier.
What goes wrong, per service
Section titled “What goes wrong, per service”Not a ranking of paranoia — each has a specific failure that follows from what it is.
| Service | Public? | What actually happens |
|---|---|---|
| oMLX (8000) | No | An inference API with no rate limiting and no quotas. A stranger with the key gets your GPU; a stranger without one still costs you every connection’s worth of work. Worse, it is one endpoint away from your models and your machine’s memory ceiling — the way to take this house down is to ask it to think. |
| Hindsight (13403, 13404) | No, and loopback-only on the host (decision #62) | Holds every person’s memories. Auth is one shared bearer token: no per-user identity, no rate limit, no lockout. Leak it once and there is no revoking it for one caller. Deletes are permanent, so the damage is not only disclosure. |
| Konzol (13401) | No | Reconfigures the stack. It writes the registry, and the registry decides what runs. Treat public access to it as equivalent to a shell. |
| Wyoming wake word (13407) | No | No authentication of any kind, by protocol design. Anything that reaches the port can speak to your microphones’ pipeline. STT/TTS (whisper/piper) moved to Home Assistant’s own native add-ons, decision #39 — not part of this stack’s exposure surface anymore. |
| Open WebUI (13400) | Yes — via its own public-facing proxy, on a separate host | The only one built for it: accounts, sessions, its own rate limiting, and it expects strangers to knock. It is public because it earned it, not because it was convenient. |
The test
Section titled “The test”Being reachable from the internet is a property a service earns by being designed for it. Concretely, ask of anything you are tempted to expose:
- Does it authenticate individual callers, or does it have one shared secret?
- Does it survive someone hammering it — rate limits, quotas, timeouts?
- If its credential leaked, could you revoke access for one caller without breaking every other?
- Is it maintained closely enough that you will actually apply its security updates?
Anything running directly on a service host fails at least the first two. That is not a criticism of them; they were written for a trusted network, which is exactly where they are.
If you need it from outside
Section titled “If you need it from outside”Use Tailscale. That is the whole reason it is here: the service stays private and you stop needing a decision about exposure at all. Adding a device to the tailnet is not a security event in the way opening a port is — you can see who is on it, and you can take them off.
Never port-forward directly to a service host, and be precise about why:
the whole point is that it forwards nothing today, which is what makes it
safe for oMLX to bind 0.0.0.0 and be reachable across the tailnet. Those
two facts are load-bearing together. Add a forward and you have not
“exposed one port” — you have published a rate-limitless inference API,
because the bind was already permissive on the assumption nothing inbound
could arrive.
If you decide to expose something anyway
Section titled “If you decide to expose something anyway”That is a legitimate decision, not a forbidden one — but write it down with the same shape as a risk acceptance in the registry: what it is, why it needs public reach, what sits in front of it, and who accepted it. A decision recorded is one someone can revisit; a port quietly forwarded is one nobody remembers making.
The shape
Section titled “The shape”Two variants, same idea. Which one applies depends on whether your internal proxy runs on the same host as the services or a different one — both are “an internal proxy you already run,” this doc doesn’t assume which.
browser / HA ──TLS──▶ internal proxy ──Tailscale──▶ the service host (a DIFFERENT host) (WireGuard)
browser / HA ──TLS──▶ internal proxy, same host as the services (loopback — no second hop needed at all)Different host: the proxy host and whichever host runs a given service must both be on the tailnet, and the proxy should reach it by its Tailscale address, not its LAN address. Using the LAN address puts the last hop back in plaintext and undoes the point of the exercise.
Same host (the household’s current real shape, decision #33/#36): when
the proxy and every service it fronts live on one box — Spire, in this
deployment, replacing the earlier plan of a separate proxy host — there is
no second hop to secure. Point reverse_proxy at localhost:<port> (or
127.0.0.1) instead of a Tailscale address. The Tailscale requirement above
only applies when the proxy is genuinely elsewhere.
Certificates
Section titled “Certificates”Use a DNS-01 challenge. It proves you own the domain by writing a DNS record instead of accepting an inbound connection, which is what makes real certificates possible for names that resolve to a private address behind no port forwarding.
Corrected for decision #36 (this household’s real, current shape): the
internal proxy now runs ON Spire itself — the same box as the services it
fronts — replacing the earlier plan of a separate always-on proxy host (and
replacing the original Mac host’s former role once it stopped running as a server,
decision #33). localhost addresses below, not Tailscale hops — see “The
shape” above for why that’s correct here. A deployment that keeps its proxy
on a genuinely separate host should use that host’s Tailscale address
instead — the placeholder form is kept in a comment for that case.
Add to Spire’s own Caddy instance (a separate Caddyfile/site block from
Novak’s own containers — this proxy is still not something docker-compose.yml
runs, except for the portal’s narrower one):
(novak-internal) { encode zstd gzip header { -Server Strict-Transport-Security "max-age=31536000" X-Content-Type-Options "nosniff" }}
# Only if something still needs oMLX directly — most deployments reach it# through the router instead, and this deployment runs Ollama, not oMLX,# so this block doesn't apply here at all; kept for a mixed/oMLX deployment.# Replace <engine-host-ts-ip> with that host's Tailscale address if oMLX# runs elsewhere; omit entirely if nothing calls it internally.# omlx.nov.a64.one {# import novak-internal# reverse_proxy <engine-host-ts-ip>:8000 # OMLX_PORT# }
# Ports below match .env.example's clustered default block (decision# #31, 13400-13409) — real numbers, not placeholders. If this deployment# set its own values instead, use those; a deployment's real .env is# always the source of truth over what's written here. localhost, since# the proxy and the services are the same host (Spire) — see "The shape".memory.nov.a64.one { import novak-internal reverse_proxy localhost:13403 # HINDSIGHT_PORT: API + MCP at /mcp/<bank>/. Loopback, so only a proxy on this host reaches it (decision #62)}
memory-ui.nov.a64.one { import novak-internal reverse_proxy localhost:13404 # HINDSIGHT_UI_PORT}
konzol.nov.a64.one { import novak-internal reverse_proxy localhost:13401 # CONSOLE_PORT — omit if not running the console}
ollama.nov.a64.one { import novak-internal reverse_proxy localhost:11434 # OLLAMA_PORT — only if something needs it directly}Everything above is Tailscale/LAN-only by DNS, not by anything Caddy
itself enforces. Point memory.nov.a64.one etc. at Spire’s Tailscale
IP (or a LAN-only A record, if you’re not exposing this zone publicly at
all) — never at a publicly-routable address, or “internal” stops being
true the moment someone off your tailnet resolves the name. This is the
same DNS-to-private-address pattern decision #16 always described; only the
host running it changed.
Open WebUI is deliberately absent from this internal proxy. It’s the one service meant to face the public internet (decision #15) — that still goes through the separate, public-facing proxy (the LAN-neighbor host with 80/443 forwarded), which now points at Spire instead of wherever it pointed before:
# On the PUBLIC proxy (LAN-neighbor host, forwarded 80/443) — not the# internal instance above. Update the upstream target only; everything# else about that Caddy instance (its own TLS, its own exposure) is# unchanged by Spire replacing whatever host ran Open WebUI before.chat.a64.one { reverse_proxy <spire-ts-ip>:13400 # OPENWEBUI_PORT}Only add a route for Open WebUI on the internal instance if you’re running a second copy purely for local testing.
Your existing tlsAutostrap snippet already handles DNS-01, so these inherit
it from the zone block.
Traefik
Section titled “Traefik”For the planned migration. Same idea, file-provider form:
http: routers: novak-konzol: rule: "Host(`konzol.novak.example.tld`)" service: novak-konzol tls: certResolver: dns-01 # VERIFY resolver name in your static config services: novak-konzol: loadBalancer: servers: - url: "http://<core-host-ts-ip>:13401" # CONSOLE_PORT. Hindsight is loopback-only, so a proxy on another host cannot reach itRepeat per service. Novak publishes no Docker labels, because the containers run on a different host from Traefik — label-based discovery won’t see them. The file provider is the right mechanism here.
Giving Home Assistant access to memory
Section titled “Giving Home Assistant access to memory”Home Assistant’s MCP client authenticates by OAuth only. Its config flow asks
for a Client ID and Secret and offers no field for a bearer token or custom
header. Hindsight authenticates by a static API key in an Authorization
header, and none of its tenant extensions (Default, ApiKey, Supabase) are
OAuth. So HA cannot authenticate to Hindsight directly, and the failure looks
like this:
httpx.HTTPStatusError: Client error '401 Unauthorized' for url 'http://<core-host-ts-ip>:13403/mcp/household/'This page used to describe a small header-adding proxy on the tailnet that held the key for Home Assistant. That is no longer how it works. Hindsight is now published on the host’s loopback only (decision #62), and Home Assistant reaches memory through the gateway, which accepts the key in the URL path for clients that cannot send headers. No proxy is needed for this, and no second copy of the Hindsight key has to be kept and rotated. The setup is in home-assistant.md and the key types are in gateway.md. The old proxy recipe is in git history if you need it.
What stays plaintext, and why
Section titled “What stays plaintext, and why”Wyoming wake word detection (openWakeWord, 13407 — STT/TTS moved to Home Assistant’s own native add-ons, decision #39, and aren’t part of this stack anymore). Wyoming is a TCP protocol, not HTTP, and the ESPHome satellites that speak it can’t do TLS to a hostname. Proxying it here would break them.
The honest consequence: someone on your local network could capture voice audio in transit. That’s a smaller exposure than it first sounds — it’s the same network the microphones are already on — but it’s real, and nothing in this directory fixes it.
Ports on the service host
Section titled “Ports on the service host”For this to work, the services must be reachable from the proxy host, so they bind on the tailnet rather than localhost. That means anything on your tailnet can reach them directly, bypassing the proxy and its TLS.
Tailscale ACLs are the tool for that, not firewall rules on the service host. Worth setting up if devices you don’t fully trust are on the tailnet.
So the tailnet is the real security boundary here — not the proxy, and not the bind address. The proxy adds TLS for LAN clients; it does not restrict who may connect. Everything in Which of these may face the internet above assumes the tailnet stays a set of machines you trust, and a phone you lend to a houseguest is on it until you remove it.
One more thing this directory does not fix: the last hop from the proxy host to whichever host runs the service in question is WireGuard, not TLS. That is not weaker, but it does mean a service here never sees a client certificate and cannot tell one tailnet caller from another. Everything reaching Hindsight presents the same bearer token no matter who is holding it.
Portal: a single page over Open WebUI and Konzol
Section titled “Portal: a single page over Open WebUI and Konzol”Optional, behind the portal compose profile, and unrelated to the rest of
this document’s subject: it protects one page, not the stack. Recorded
because two people using it read different names into “reverse proxy” and
it’s worth being precise about which one this is.
What it is, and what it deliberately isn’t
Section titled “What it is, and what it deliberately isn’t”A static HTML page (portal/index.html) with a tab per app, served by a
Caddy instance that does one other thing: forward-auth every request
against TinyAuth, checked
against Pocket ID’s admins.novak group — the same group that already
gates the console and, since the feat/owui-oauth-group-admin change,
Open WebUI’s own admin role. One Pocket ID group now governs three
surfaces.
It does not reverse-proxy Open WebUI or Konzol. Each app keeps its own
port and its own already-working Pocket ID login; the portal’s iframes
point straight at those ports, and Caddy’s only job is serving the shell
page and gating access to it. This was not a simplicity shortcut. It was
tested directly against the running stack: proxying Open WebUI under a
Caddy subpath (/app/owui/) breaks it, because it ships absolute asset
paths (/static/..., /_app/immutable/...) that resolve against the
proxy’s own root rather than the subpath, and Caddy does no URL rewriting
here to fix that up.
Hindsight’s own web UI is deliberately not a tab. It has no per-caller access control beyond the shared tenant API key (see security.md), and putting it a click away from Open WebUI makes it too easy to open by habit rather than by intent. Add a tab if that trade-off is one you want.
This is not “another TinyAuth instance” in the redundant sense
Section titled “This is not “another TinyAuth instance” in the redundant sense”If you already run TinyAuth somewhere else (e.g. on a VPS, gating whatever
sits behind that host’s own public Caddy), this one isn’t a duplicate of
it — it protects something structurally different. This instance is wired
directly into the portal’s own Caddy (forward_auth tinyauth:3000) and
gates only the portal page; it cannot be pointed at a remote TinyAuth
without rewriting that Caddyfile, and a remote TinyAuth can’t gate this
page without its own forward-auth hop back to wherever the portal runs.
Open WebUI and Konzol both already have their own independent Pocket ID
logins — this TinyAuth was never in either of those paths; it only decides
who even sees the tabs-page shell in front of them. Run it only once you
actually want that shell; there’s no security reason to run it “just in
case” alongside a TinyAuth that protects something else entirely.
Why TinyAuth
Section titled “Why TinyAuth”Chosen over Homepage and Organizr, the two other real candidates:
- Homepage’s iframe widget explicitly does not proxy authentication — each embedded tile authenticates on its own, using whatever session the browser already has for that app’s domain. It’s a launcher, not a login gate.
- Organizr does genuine iframe tabs, which is closer to what’s wanted here, but has no native OIDC of its own. Getting one login working would mean putting a forward-auth proxy in front of Organizr too, which is TinyAuth’s whole job, minus a second app with its own local user accounts competing with Pocket ID as a fourth identity system.
- Pocket ID’s own documentation names TinyAuth as a paired forward-auth
proxy, and TinyAuth supports Pocket ID’s
groupsclaim by name. OpenID Certified (Basic OP) as of v5.1.0, actively maintained, MIT-scale community (8000+ stars) around an AGPL-3.0 core — see credits.md on why running it unmodified keeps that low risk.
What was verified, and what wasn’t
Section titled “What was verified, and what wasn’t”Read directly against the running containers, not assumed from documentation:
TINYAUTH_APPURLmust be a real hostname with a scheme, never an IP. Confirmed directly: TinyAuth refuses to start with “ip addresses not allowed” against a bare Tailscale IP, and separately with “invalid url, must be in format https(s)://host” against a schemeless hostname.http://host.local:13408starts cleanly;http://<tailscale-ip>:13408does not start at all. If the portal needs to be reachable from off the LAN, use your tailnet’s MagicDNS name for the node (visible intailscale status), not the IPnovak portsotherwise reports.- Caddy’s
templatesdirective correctly substitutes{{env "..."}}in the served HTML, and Caddyfile’s own{$VAR}substitution works for the listen port — both tested against a realcaddy:2container before being relied on, not assumed from the docs. - Open WebUI sends no
X-Frame-Optionsor CSPframe-ancestorsheader today, checked directly withcurl -Iagainst the running container, so nothing currently blocks the iframe approach. It does have code capable of settingX-Frame-Options(opt-in via an environment variable, unset here) — if header hardening is ever turned on, keep it atSAMEORIGINor leave it unset, neverDENY, or the portal breaks. - Not verified: the actual OAuth-group restriction against a live
Pocket ID login. The OIDC connection and
TINYAUTH_APPURLvalidation were tested directly; whetherTINYAUTH_APPS_PORTAL_OAUTH_GROUPSandTINYAUTH_APPS_PORTAL_CONFIG_DOMAINactually restrict access the way the flag names imply was not, since that needs a real round trip against a live Pocket ID instance this environment doesn’t have. Confirm with an account not inadmins.novakand expect it refused before trusting this as a real boundary, not just a configured one.
Setting it up
Section titled “Setting it up”- Register a fourth Pocket ID OIDC client (console, Open WebUI, and now
this each need their own — the redirect URI differs every time), with
the
groupsscope. - Fetch that Pocket ID instance’s
/.well-known/openid-configurationand copyauthorization_endpoint,token_endpoint, anduserinfo_endpointverbatim intoTINYAUTH_OIDC_AUTH_URL,_TOKEN_URL,_USERINFO_URL. TinyAuth does not do discovery-document lookup the way Open WebUI and the console’s OIDC libraries do; these three must be spelled out. - Set
PORTAL_APPURLto a real hostname with scheme — see the VERIFY above before picking one. novak secret set TINYAUTH_OIDC_CLIENT_SECRET,novak up.