Viewport daemon, relay, and hosted runtime are available in alpha. Surfaces may change.
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.comServer API base URL.
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,codexWhich built-in agents the hook installer detects.
VIEWPORT_CUSTOM_AGENT_COMMANDnoneCommand path for a PTY-backed custom workflow agent.
VIEWPORT_CUSTOM_AGENT_IDcustom-commandAgent id reported by the custom command adapter. Use it when a policy targets that custom agent.
VIEWPORT_CUSTOM_AGENT_NAMECustom command agentDisplay name for the custom command agent.
VIEWPORT_CUSTOM_AGENT_ARGS_JSON[]JSON array of default command arguments for the custom command agent. Preferred over whitespace splitting.
VIEWPORT_CUSTOM_AGENT_ARGSemptyWhitespace-split fallback arguments for the custom command agent.
VIEWPORT_CUSTOM_AGENT_PROMPT_MODEstdinHow the initial prompt is delivered for custom command agents: stdin, positional, or a flag name.
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 (web/ for self-hosters)

VariableDefaultWhat it does
VITE_VIEWPORT_SERVER_URLhttps://getviewport.comBase hosted URL used when an explicit API URL is not set.
VITE_VIEWPORT_API_URLhttps://api.getviewport.com/apiWhere the web app calls the server API.
VITE_VIEWPORT_RELAY_WS_BASE_URLwss://relay.getviewport.com/wsRelay WebSocket base URL.
VITE_POSTHOG_KEYemptyOptional product analytics key. Analytics stay off until the user allows them.
VITE_POSTHOG_HOSThttps://us.i.posthog.comOptional PostHog host override.

Server API

VariablePurpose
APP_KEYServer-side app secret. Required for self-hosted deployments.
DB_CONNECTION / database-specific varsServer database connection.
WORKOS_CLIENT_ID, WORKOS_API_KEY, WORKOS_REDIRECT_URLLogin provider credentials.
MAIL_MAILER, RESEND_API_KEY, MAIL_FROM_ADDRESSTransactional email.
VIEWPORT_RELAY_HTTP_URLRelay HTTP base URL for internal calls.
VIEWPORT_RELAY_INTERNAL_KEYMust match the relay's internal key.
VIEWPORT_ALERT_WEBHOOK_URLOptional endpoint for structured API exception alerts.
VIEWPORT_ALERT_WEBHOOK_SECRETOptional HMAC signing secret for alert webhooks.
VIEWPORT_ALERT_WEBHOOK_TIMEOUTAlert webhook timeout in seconds. Defaults to 2.
VIEWPORT_CLIENT_EVENT_INGEST_ENABLEDEnables authenticated client diagnostics ingest. Defaults to true.
VIEWPORT_CLIENT_EVENT_MAX_CONTEXT_BYTESMax diagnostic context stored per event. Defaults to 4096.
VIEWPORT_ACTION_BROKER_WEBHOOK_ALLOWED_HOSTSComma-separated HTTPS host allowlist for sandbox webhook action-provider proposals. Defaults to localhost,127.0.0.1,actions.example.test.

Where to go next

On this page