Skip to content

Web Dashboard Configuration

This document describes the configuration for the Scion Web Dashboard. The web UI is served by the Go scion binary with the --enable-web flag.

The Web Dashboard is a client-side SPA served by the Go server, which also handles OAuth, session management, SSE real-time events, and API routing. Configuration is managed through CLI flags and environment variables.

FlagDefaultDescription
--enable-webfalseEnable the web dashboard.
--web-port8080The HTTP port the web UI listens on.
--session-secretSecret key for signing session cookies. Must be set in production.
VariableDefaultDescription
SCION_SERVER_WEB_PORT8080The HTTP port the web UI listens on (overridden by --web-port).
SESSION_SECRETSecret key for signing session cookies (overridden by --session-secret).

These variables are required for standard user login in production.

VariableDescription
SCION_SERVER_AUTH_GOOGLE_CLIENTIDGoogle OAuth 2.0 Client ID.
SCION_SERVER_AUTH_GOOGLE_CLIENTSECRETGoogle OAuth 2.0 Client Secret.
SCION_SERVER_AUTH_GITHUB_CLIENTIDGitHub OAuth App Client ID.
SCION_SERVER_AUTH_GITHUB_CLIENTSECRETGitHub OAuth App Client Secret.
SCION_SERVER_AUTH_AUTHORIZEDDOMAINSComma-separated list of email domains allowed to sign in.

Used for local testing without setting up full OAuth.

VariableDefaultDescription
SCION_DEV_TOKENExplicit development token for Hub API access.
SCION_DEV_TOKEN_FILE~/.scion/dev-tokenPath to the token file generated by the Hub.

The Go server includes a pre-configured Content Security Policy (CSP) that allows connections to the Hub and necessary CDNs (Shoelace). HSTS is automatically enabled in production with a 1-year max-age.

The Web Dashboard is served by the same Go binary as the Hub API. In production, enable it with --enable-web and ensure --session-secret and the OAuth provider variables are configured.