Console
Configuration
console.yaml, environment variables and flags, in order of precedence.
Precedence, highest first: flags, then VIEWPORT_CONSOLE_* environment variables, then <home>/console.yaml,
then defaults. Paths in console.yaml resolve relative to the file.
console.yaml
host: 127.0.0.1 # default; Console refuses a non-loopback host in local mode
port: 7071
public_url: https://console.example.com # the origin users and gates reach; also an allowed Host
auth:
mode: tailscale # local | tailscale | cloudflare-access | header
default_role: viewer # proxy modes: role of a proven identity with no user entry (default: refused)
tailscale: { socket: /var/run/tailscale/tailscaled.sock, trust_serve_headers: false } # see the proxy auth guide
cloudflare_access: { team: acme, audience: "<AUD tag>" }
header: { identity_header: X-Forwarded-Email, trusted_proxies: [10.0.0.0/8], secret_env: VIEWPORT_CONSOLE_PROXY_SECRET }
users:
"[email protected]": controller
"[email protected]": { role: viewer, tenants: [acme] }
sources:
- { kind: evals, name: support-agent, dir: /data/evals/runs }
- { kind: receipts, name: refunds, path: /data/receipts.jsonl, anchor: "sha256:..." }
- { kind: trajectories, name: bookings, dir: /data/trajectories }
- { kind: hitl_store, name: refunds-store, path: /data/hitl.sqlite }
cache: { output: true } # false: never cache terminal output; read it from the daemon
retention: { sessions_days: 30, inbox_days: 90 } # swept at start and hourly; receipts are never deleted
auto_pair: true # pair the daemon running as this user on start
receipts: { anchor_to: /backup/console-anchors.jsonl }
daemon:
home: /home/dana/.viewport/daemon # default VIEWPORT_HOME, else ~/.viewport/daemon
local_direct_url: ws://127.0.0.1:7070/v1/connectUnknown keys and wrong types are refused at start, naming the key.
Environment
| Variable | Meaning |
|---|---|
VIEWPORT_CONSOLE_HOME | Home directory |
VIEWPORT_CONSOLE_HOST, VIEWPORT_CONSOLE_PORT | Bind address |
VIEWPORT_CONSOLE_PUBLIC_URL | Public origin |
VIEWPORT_CONSOLE_AUTH | Auth mode |
VIEWPORT_CONSOLE_ENCRYPTION_KEY | 32 random bytes as hex or base64url; seals relay tokens, HITL secrets, the identity and the review key |
VIEWPORT_CONSOLE_PROXY_SECRET | The header mode secret (or the variable auth.header.secret_env names) |
VIEWPORT_CONSOLE_CACHE_OUTPUT | false to stop caching terminal output |
VIEWPORT_CONSOLE_AUTO_PAIR | false to stop pairing the local daemon on start |
VIEWPORT_HOME | The daemon's home, used to find the local daemon |
VIEWPORT_CONSOLE_URL, VIEWPORT_CONSOLE_TOKEN | Read by connect() from @viewportai/console/client |
Home directory
Mode 0700, one writer at a time (console.lock, never stolen), refused inside the current directory or the OS
temp directory. It holds console.db, identity.json when no keychain is available, console.yaml, cli-token
and, while serving, server.json.