VIEWPORT
Reference

Environment variables

Every env var the daemon, relay, and CLI accept. Defaults, scope, when to use each.

Daemon (vpd)

VariableDefaultWhat it does
VIEWPORT_HOME~/.viewportDaemon home directory. Holds config, logs, pidfiles, identity files.
VPD_HOME(alias of above)Same as VIEWPORT_HOME. Preferred in scripts.
VIEWPORT_API_URLhttps://api.getviewport.comControl plane base URL. Set for self-hosted control plane.
VIEWPORT_APP_URLhttps://app.getviewport.comWhere vpd pair opens in the browser.
VIEWPORT_DAEMON_LISTEN127.0.0.1:7070Local API listen address. Accepts host:port, port, or unix socket path.
VIEWPORT_DAEMON_PROFILElocalOne of local, lan, relay. Profile changes default listen + CORS.
VIEWPORT_DAEMON_AUTH(off)Set to 1 to require token auth on the local API.
VIEWPORT_DAEMON_LOG_LEVELinfoOne of debug, info, warn, error.
VIEWPORT_BUILT_IN_AGENTSclaude,codex,aider,geminiWhich built-in agents the hook installer detects.
VIEWPORT_RELAY_TLS_INSECURE(off)Skip TLS verification when connecting to the relay. Local dev only.

Relay (@viewportai/relay)

VariableDefaultWhat it does
RELAY_LISTEN_PORT7781Port to bind.
RELAY_INTERNAL_KEY(required)Shared secret for relay→platform internal calls.
RELAY_VALIDATE_URL(required)https://api.getviewport.com/api/runtime/internal/relay/validate or self-hosted equivalent.
RELAY_JWKS_URL(required)Where the relay fetches platform JWT signing keys.
RELAY_ADMIN_TOKENnoneBearer token for /state, /logs, /metrics.
RELAY_ENABLE_ADMIN_HTTP0Set to 1 to expose admin endpoints.
RELAY_BACKPLANE_MODEsinglesingle / server / redis.
RELAY_BACKPLANE_URLnoneBackplane endpoint when mode != single.
RELAY_CLIENT_REDIRECT_ENABLED0Allow the relay to redirect clients to the relay holding their daemon.
RELAY_LOG_LEVELinfoOne of debug, info, warn, error.
RELAY_FRAME_MAX_BYTES1048576 (1 MiB)Reject frames larger than this.
RELAY_RATE_LIMIT_PER_IP60/minFrames per IP. Set to 0 to disable.
RELAY_PROMETHEUS_BUCKETS(defaults)Override histogram buckets.

Full env-var reference for the relay lives in services/relay/README.md in the OSS repo.

Web app (apps/web for self-hosters)

VariableDefaultWhat it does
VITE_API_URLhttps://api.getviewport.comWhere the web app calls the control plane.
VITE_APP_BUILD_ID(git sha)Build id surfaced in the footer for support.
VITE_WORKOS_CLIENT_ID(required)WorkOS SSO client id.
VITE_FEATURE_FLAGSnoneComma-separated feature flag toggles.
VITE_SUPPORT_EMAILhello@getviewport.comWhere the footer links go.

Control plane (apps/api, Laravel. Self-host)

VariablePurpose
APP_KEYLaravel encryption key. Required. php artisan key:generate.
DB_*Postgres connection (preferred) or MySQL.
WORKOS_API_KEY, WORKOS_CLIENT_IDSSO.
MAIL_MAILER, RESEND_KEYTransactional email.
RELAY_PUBLIC_URLWhere pairings should connect.
RELAY_INTERNAL_KEYMust match the relay's RELAY_INTERNAL_KEY.
VIEWPORT_AUDIT_RETENTION_DAYSDefault audit retention.

Where to go next

On this page