# Static error/help pages the gateway serves for routes it has # special-cased, all rendered from one Catppuccin-styled template. # Useful pages instead of nginx's default 404/502 — see # `docs/networking/gateway.md::Per-agent error pages` for the design rationale + # page-vs-status semantics. Consumed by ./vhosts.nix. { pkgs }: let mkPage = { name, title, accent, body, }: pkgs.writeText "hive-gateway-${name}.html" ''
No agent matches the requested /agent/<name>/ path on this hive.
Operator: check the agent name in the dashboard.
''; }; unreachable = mkPage { name = "agent-unreachable"; title = "agent unreachable"; accent = "#f9e2af"; body = ''The agent's harness web server isn't responding. Container restarting, or the agent crashed.
Operator: dashboard → check the container status / journal; the page will recover on retry once the harness is back up.
''; }; # Shown when the authelia vhost's upstream refuses the connection: authelia # is down behind a working gateway, and the raw 502 points at the proxy. ssoUnavailable = mkPage { name = "sso-unavailable"; title = "sso unavailable"; accent = "#f9e2af"; body = ''The swarm's identity provider isn't answering. The gateway is fine — nothing is listening behind it.
Check the container: journalctl -M swarm-authelia -u authelia-swarm. This page recovers on reload once the provider is up.
This hive is protected by HTTP Basic auth. Valid credentials are required.
Operator: add a user with hivectl gateway create-user:
hivectl gateway create-user \
<username> --password-stdin
Then reload your browser and enter the credentials when prompted.
''; }; }