# 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/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" '' ${title} ◆ hyperhive

◆ ${title}

${body} ''; in { notFound = mkPage { name = "agent-not-found"; title = "agent not found"; accent = "#cba6f7"; body = ''

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. # Leads with the bootstrap because that is overwhelmingly the cause: # authelia treats an empty user store as a FATAL startup error, so an # enabled-but-unbootstrapped swarm crash-loops behind a vhost that is # working perfectly, and the raw 502 points at the proxy instead. 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.

Most likely: no users exist yet. Authelia refuses to start with an empty user store, so it never finishes booting. Add the first account on the host running it:

swarmctl user add <username> \
      --display-name <Name> --email <addr> --group admins

Otherwise check the container: journalctl -M swarm-authelia -u authelia-swarm. This page recovers on reload once the provider is up.

''; }; unauthorized = mkPage { name = "unauthorized"; title = "unauthorized"; accent = "#f38ba8"; body = ''

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.

''; }; }