This document lists all environment variables used in the Kilo Code cloud monorepo.
NODE_ENV- Node environment (development,production,test); used by virtually every package. [SERVER]CI- Set totruein CI environments; detected by Next.js, Playwright, Vitest, and various tooling to alter behavior (non-interactive, skip prompts, etc.). [SERVER]PORT- Port for local dev servers. Next.js defaults to 3000; used bypackages/web-shared/src/lib/constants.tsand various test servers. [SERVER]HOME- User home directory; used by child processes spawned by services (OpenClaw resolves~/.openclaw, Expo devcert for mkcert certs). [SYSTEM]PATH- System executable search path; modified by tooling (OpenClaw, tsx, etc.) to locate CLIs. [SYSTEM]TMUX- Set when running inside a tmux session; used bydev/local/tmux.tsto detect tmux environment. [SYSTEM]GITHUB_ACTIONS- Set totrueby GitHub Actions CI; detected by tooling (Rye log groups, Playwright, Vitest) to enable GitHub Actions-specific output/reporting. [SERVER]NEXT_RUNTIME- Set by Next.js to'node','edge', or'browser'; used inapps/web/src/instrumentation.tsto select appropriate Sentry instrumentation. [SERVER]DOTENV_CONFIG_QUIET- Set by dotenv to suppress load output; set to'true'indev/seed/lib/preflight.ts:9during seeding. [SERVER]
Manage shared web env var additions and rotations with pnpm web:env set <VARIABLE>. The helper coordinates tracked root and apps/web dotenv defaults, the kilocode-app and kilocode-global-app Vercel deployments, and 1Password storage for sensitive Production values. See DEVELOPMENT.md for the full workflow.
APP_URL_OVERRIDE- Optional base application URL override in any environment; used inpackages/web-shared/src/lib/constants.tsandnext.config.mjs. When unset, Vercel'sstagingtarget useshttps://staging-app.kilo.ai, production useshttps://app.kilo.ai, and local development usesPORT. [SERVER]KILOCLAW_INSTANCE_URL_TEMPLATE- URL template for KiloClaw instances; used inpackages/web-shared/src/lib/config.server.ts. [SERVER]NEXTAUTH_URL- Base URL for NextAuth.js; used across many auth-related files. [SERVER]NEXTAUTH_SECRET- Secret key for NextAuth.js session encryption and five-minute, audience-bound user assertions verified by internal Workers such as user data export.[SECRET]DEBUG_SHOW_DEV_UI- Enables dev-only UI elements (debug panels, admin buttons); checked inpackages/web-shared/src/lib/constants.tsandapps/web/src/app/(app)/profile/page.tsx. [SERVER]TRPC_TIMING_LOGGING- Enables tRPC timing logs in development; checked inpackages/web-shared/src/lib/trpc/init.ts. [SERVER]TRPC_TIMING_SAMPLE_RATE- Sample rate (0-1) for non-mobile request timing lines; mobile clients are always logged. Defaults to0.01when unset or malformed; read inpackages/web-shared/src/lib/observability/request-timing.ts. [SERVER]JEST_MAX_WORKERS- Limits max worker threads for Jest; read inapps/web/jest.config.ts. [SERVER]JEST_SILENT- Whenfalse, shows verbose Jest output; read inapps/web/jest.config.tsandapps/web/.env.test. [SERVER]JEST_WORKER_ID- Set by Jest to identify the current worker thread; used by db connection pooling and libraries to handle worker-specific state. [SERVER]IS_SCRIPT- Set to'true'byapps/web/src/scripts/index.tsto indicate a script-mode run (bypasses web server logic). Used by Drizzle inpackages/db/src/database-url.ts. [SERVER]SECURITY_AGENT_AUDIT_RELIABLE_COVERAGE_START- Earliest ISO timestamp from which Security Agent Audit Report event coverage is reliable. [SERVER]
NEXT_PUBLIC_POSTHOG_KEY- PostHog public API key for client-side analytics; used inapps/web/src/components/PostHogProvider.tsx. [PUBLIC]NEXT_PUBLIC_POSTHOG_DEBUG- Enables PostHog debug logging; checked inapps/web/src/components/PostHogProvider.tsxandapps/web/src/lib/stytch.ts. [PUBLIC]POSTHOG_PERSONAL_API_KEY- PostHog personal API key used by user-deletion PostHog cleanup.[SECRET]POSTHOG_ENVIRONMENT_ID- PostHog project/environment ID used by user-deletion PostHog cleanup. [SERVER]POSTHOG_HOST- Optional PostHog API host override for user-deletion cleanup; defaults tohttps://us.posthog.com. [SERVER]PYLON_API_KEY- Pylon REST API key used by user-deletion contact and reply cleanup.[SECRET]PYLON_HOST- Optional Pylon API host override for local user-deletion cleanup; defaults tohttps://api.usepylon.com. [SERVER]PYLON_FINAL_EMAIL_AUTHOR_USER_ID- Optional Pylon staff user id used to match an already-posted deletion reply. [SERVER]CUSTOMERIO_TRACK_BASE- Optional Customer.io Track API base override for local user-deletion cleanup; defaults tohttps://track.customer.io. [SERVER]SUBSTACK_PUBLICATION_URL- Substack publication origin used by user-deletion subscriber cleanup; defaults tohttps://blog.kilo.ai. Must beblog.kilo.aior a*.substack.comhost. The Substack admin search URL is hardcoded tohttps://kilocode.substack.com/publish/subscribers, not this publication. [SERVER]CSA_APP_BASE_URL- CSA origin used by the Cloud deletion worker to callPOST /api/internal/cloud/users/gdpr-scrub. Example: the production CSA app URL. [SERVER]CSA_VERCEL_PROTECTION_BYPASS- CSA Vercel Deployment Protection automation bypass. Cloud sends it as thex-vercel-protection-bypassheader on Cloud → CSAPOST /api/internal/cloud/users/gdpr-scrub, never as a query parameter. Required when CSA has Vercel Authentication enabled; without it Vercel returns 401 before the CSA route. Distinct fromSUPPORT_API_SECRET.[SECRET]SENTRY_ORG- Sentry organization slug for source map uploads; used inapps/web/next.config.mjs.[SECRET]SENTRY_PROJECT- Sentry project slug for source map uploads; used inapps/web/next.config.mjs.[SECRET]SENTRY_AUTH_TOKEN- Sentry auth token for source map uploads; used inapps/web/next.config.mjs.[SECRET]NEXT_PUBLIC_SENTRY_DSN- Sentry DSN for server and Edge runtime error reporting; used inapps/web/sentry.edge.config.tsandapps/web/sentry.server.config.ts.[PUBLIC]
NEXT_PUBLIC_GTM_ID- Google Tag Manager container ID; rendered inapps/web/src/app/layout.tsxand exposed viaapps/web/src/app/api/marketing-tags/gtm/route.ts. [PUBLIC]NEXT_PUBLIC_IMPACT_UTT_ID- Impact.com UTT (Universal Tracking Token) ID; rendered inapps/web/src/app/layout.tsxand exposed viaapps/web/src/app/api/marketing-tags/impact/route.ts. [PUBLIC]
VERCEL_ENV- Vercel environment (development,preview,production); used inapps/web/next.config.mjs,packages/web-shared/src/lib/constants.ts, andapps/web/.env.test. [SERVER]VERCEL_TARGET_ENV- Vercel system or custom deployment environment (development,preview,production,staging, etc.); used inapps/web/src/app/layout.tsxto identify staging UI. [SERVER]VERCEL_URL- Auto-injected by Vercel; current deployment URL. Used inapps/web/src/lib/buildInfo.ts. [SERVER]VERCEL_GIT_COMMIT_SHA- Auto-injected by Vercel; Git commit SHA of the current deployment. Used inapps/web/src/lib/buildInfo.ts. [SERVER]NEXT_PUBLIC_VERCEL_URL- Client-exposed Vercel deployment URL from build info. [PUBLIC]NEXT_PUBLIC_VERCEL_GIT_COMMIT_REF- Client-exposed Git branch/ref from build info. [PUBLIC]NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA- Client-exposed Git commit SHA from build info. [PUBLIC]NEXT_PUBLIC_VERCEL_GIT_REPO_OWNER- Client-exposed Git repo owner from build info. [PUBLIC]NEXT_PUBLIC_VERCEL_GIT_REPO_SLUG- Client-exposed Git repo slug from build info. [PUBLIC]GITHUB_SHA- GitHub Actions commit SHA; used inapps/web/src/lib/buildInfo.tsduring CI builds. [SERVER]
NEXT_PUBLIC_TURNSTILE_SITE_KEY- Cloudflare Turnstile public site key; used inapps/web/src/components/auth/sign-in/TurnstileView.tsx. [PUBLIC]TURNSTILE_SECRET_KEY- Cloudflare Turnstile secret key; used in test files.[SECRET]NEXT_PUBLIC_STYTCH_PROJECT_ENV- Stytch public project environment identifier; used inapps/web/src/components/auth/StytchClient.tsx. [PUBLIC]NEXT_PUBLIC_STYTCH_PUBLIC_TOKEN- Stytch public token for client SDKs; used inapps/web/src/components/auth/StytchClient.tsx. [PUBLIC]STYTCH_PROJECT_ID- Stytch project ID for secret-side SDK calls.[SECRET]STYTCH_PROJECT_SECRET- Stytch project secret.[SECRET]STYTCH_PUBLIC_TOKEN- Stytch legacy public token alias used in some test fixtures. [PUBLIC]INTERNAL_API_SECRET- Shared secret for internal API calls between services; used inapps/web/src/lib/kiloclaw/cli-runs.test.ts,kiloclaw-router.test.ts, dev seed scripts, and other service routers.[SECRET]SUPPORT_API_SECRET- Shared bearer token for Customer Support Automation (CSA) internal API calls. Cloud uses it to authorize CSA → Cloudapps/web/src/app/api/internal/support/and Cloud → CSAPOST /api/internal/cloud/users/gdpr-scrub. A CSA compromise can also call Cloud deletion and Cloud can scrub CSA-local PII. Leak can look up any email and enqueue deletion for non-admin, non-bot, non-live-subscription customers; access disable is deferred to worker preflight and pending requests can be cancelled. Keep production values off preview deployments; rotate Cloud and CSA together.[SECRET]BOUNDED_INTERNAL_SERVICE_TOKENS_ENABLED- Set to exacttrueto enable modern, purpose-labelled internal assertions at the Phase 5.1 bounded Git broker, export, deletion, and Session Ingest callsites. Unset or any other value retains their existing legacy token formats. Enable only after compatible readers, including the dedicated GitHub disconnect audience, are deployed; generic human/control/runtime signers are not affected. [SERVER]NATIVE_RESOURCE_TOKENS_ENABLED- Set to exacttrueto permit fresh native adoption of separate one-hour API/gateway access tokens only for clients explicitly requestingapi-gateway-v1, providedSHARED_RESOURCE_TOKENS_ENABLEDis also exacttrue. Default-off. Unsupported clients keep legacy responses. Turning this flag off affects subsequent native issuance/refreshes only; active modern device credentials can continue receiving bounded control tokens while their owned device session and current user pepper remain valid. [SERVER]SHARED_RESOURCE_TOKENS_ENABLED- Master default-off readiness gate. Fresh modern producer issuance requires both this flag and its family flag below to be exacttrue; unset or any other value disables adoption. Native adoption separately requiresNATIVE_RESOURCE_TOKENS_ENABLEDand this master, independent of producer families; old CLI negotiation is unchanged. These flags do not revoke existing credentials. Valid modern device access credentials retain bounded control issuance after rollback, with current owned-session, pepper, and requested organization membership validation and a one-hour/parent-expiry cap. Chat likewise retains bounded three-audience issuance for validated modern devices; modern credentials never fall back to broad legacy tokens. Persisted modern workload renewal does not use adoption gates. Separately deployed readers/producers must be verified before activation. [SERVER]CLOUD_AGENT_RESOURCE_TOKENS_ENABLED- Default-off family gate for Cloud Agent Next request control and workflow control tokens; requires the master and exacttrue. [SERVER]GASTOWN_RESOURCE_TOKENS_ENABLED- Default-off family gate for Gastown control tokens; requires the master and exacttrue. This is not a safe-activation declaration: known ingest-audience and live-token-transport blockers remain deferred. [SERVER]WASTELAND_RESOURCE_TOKENS_ENABLED- Default-off family gate for Wasteland control tokens; requires the master and exacttrue. [SERVER]CHAT_RESOURCE_TOKENS_ENABLED- Default-off family gate for fresh chat resource issuance; requires the master and exacttrue. Validated modern devices retain chat/event-service/notifications issuance after rollback, capped by one hour and parent expiry. [SERVER]DELEGATED_RESOURCE_TOKENS_ENABLED- Default-off family gate for explicit API, gateway, attribution, and HTML-deploy delegation, including the organization user-token resource route; requires the master and exacttrue. Disabled explicit delegation remains unavailable. [SERVER]WORKFLOW_GATEWAY_RESOURCE_TOKENS_ENABLED- Default-off family gate for server workflow gateway tokens; requires the master and exacttrue. [SERVER]BENCHMARK_RESOURCE_TOKENS_ENABLED- Default-off family gate for benchmark resource tokens; requires the master and exacttrue. [SERVER]RUNTIME_ISOLATION_ENABLED- Cloud Agent Worker rollout control for new modern control-plane sessions and worktree destinations. Production and dev Worker configs set this totrue; exacttruepermits adoption, while unset/other values reject it before durable work. Legacy attachments keep directory-shared Kilo runtimes. Persisted modern runtime authorization continues selecting per-session isolation after rollback, and the connected wrapper must advertise the isolation capability. Actual web issuance remains off behind its separate issuance gates. Outstanding smoke failures must be resolved before merge; enabling this Worker admission gate does not remove that merge prerequisite. Foreground expiry recovery retains the same session identity and requires acknowledged idle transport retirement; this flag does not establish complete real-provider smoke coverage. Seedocs/token-issuance-policy.md, Phase 5.2 merge, automatic deployment, and activation. [SERVER]CALLBACK_TOKEN_SECRET- Secret for signing callback tokens. Required for local development.[SECRET]INTERNAL_SECRET- Alias/fallback forINTERNAL_API_SECRET; used in KiloClaw E2E scripts (services/kiloclaw/e2e/).[SECRET]
ANACONDA_CLIENT_ID- Anaconda OAuth app client ID.[PUBLIC]ANACONDA_CLIENT_SECRET- Anaconda OAuth app client secret.[SECRET]OPENAI_CLIENT_ID- OpenAI (Sign in with ChatGPT) OAuth client ID. Read only from the environment; the literal must never appear in source.[SECRET]OPENAI_CLIENT_SECRET- OpenAI (Sign in with ChatGPT) OAuth client secret; server-side only, sent only in the token endpoint's HTTP Basic authorization header.[SECRET]OPENAI_DISCOVERY_URL- Optional override for the OpenAI OpenID Connect discovery document; defaults to the production issuer's document. [SERVER]OPENAI_TOKEN_ENDPOINT- Optional override for the OpenAI token endpoint; defaults to the production issuer's endpoint. [SERVER]OPENAI_CHATGPT_API_URL- Optional override for the base URL that token-sharing requests use with a "Sign in with ChatGPT" connection; defaults tohttps://api.openai.com/v1. Set it whereverOPENAI_DISCOVERY_URL/OPENAI_TOKEN_ENDPOINTare overridden, so delegated inference stays in the same environment as the token issuer. [SERVER]GITHUB_CLIENT_ID- GitHub OAuth app client ID.[PUBLIC]GITHUB_CLIENT_SECRET- GitHub OAuth app client secret.[SECRET]GITHUB_APP_ID- GitHub App ID; used in integration adapter and tests.[SECRET]GITHUB_APP_PRIVATE_KEY- GitHub App private key (PEM); used in integration adapter and tests.[SECRET]GITHUB_APP_CLIENT_ID- GitHub OAuth Client ID for the app install/login flow; used inapps/web/src/lib/integrations/platforms/github/app-selector.ts. [PUBLIC]GITHUB_LITE_APP_ID- Lighter/secondary GitHub App ID for select integrations.[SECRET]GITHUB_LITE_APP_PRIVATE_KEY- Private key for the lite GitHub App.[SECRET]GITHUB_LITE_APP_CLIENT_ID- OAuth Client ID for the lite GitHub App install/login flow. [PUBLIC]GITHUB_MULTIPLE_INSTALLATION_ORGANIZATION_IDS- Comma-separated Kilo organization UUIDs allowed to connect multiple GitHub App installations. Unset or empty disables multiple installations for all organizations. [SERVER]GITHUB_SHARED_INSTALLATION_ORGANIZATION_IDS- Comma-separated destination Kilo organization UUIDs allowed to create an association to a GitHub App installation already associated elsewhere. Unset or empty disables new shared associations without revoking existing ones. [SERVER]
Organizations already in GITHUB_SHARED_INSTALLATION_ORGANIZATION_IDS can create restricted secondary connections without another feature flag. The original connection retains workflow authority; secondaries support Slack and Cloud Agent only. Removing an organization from the allowlist prevents new admission without revoking active connections or promoting another owner. Do not roll Workers back to role-unaware authorization after admitting secondary connections.
Apply the role migrations and deploy the role-aware writers and consumers close together, including git-token-service before web/Cloud Agent consumers. The migration automatically classifies eligible existing associations. A rare in-flight legacy write after the backfill snapshot can remain unassigned and fail-closed; a later verified reconnect can recover an unambiguous legacy association without changing an existing role. This affects availability only and does not grant secondary access. No manual role repair is part of rollout. The broker authorization RPC must be available before consumers use pinned associations; a missing RPC intentionally fails closed, including for cached capabilities.
The connection-role migration preserves a sole eligible connection, prefers an unambiguous existing workflow binding, and otherwise uses the oldest eligible connection. Deduplication losers and unhealthy unbound legacy rows are excluded. Shared groups with conflicting workflow bindings, unbound eligible rows, or pending-request history without a unique workflow claimant remain unassigned and fail closed. Inspect them with the read-only pnpm --filter web script src/scripts/backfill-github-installations.ts --reportRoles=true --limit=100 report (paginate with --cursor=<last-integration-id>). Review unresolved historical rows separately; timestamps are not proof of historical ownership. Never recalculate roles during normal reconnect or disconnect.
GITHUB_CONNECTION_MANAGEMENT_ENABLED- Set to exacttrueto admit new existing-installation connection management and local disconnect. Unset or any other value keeps new management admission disabled without changing incumbent GitHub integration workflows. [SERVER]- Keep disabled for at least one OAuth state TTL (10 minutes) after deploying reservation-aware callbacks so purpose-less states issued by the previous version can complete.
- During the migration-to-app promotion window, old pending-install callbacks may fail against the replaced pending indexes. Keep the window brief, monitor deploy health, and retry the GitHub connection after promotion completes.
GITHUB_ADMIN_STATS_TOKEN- Token for admin GitHub API stats lookups; used inapps/web/src/scripts/backfill-pr-author-github-ids.ts.[SECRET]GITHUB_CLI_PAT- GitHub personal access token forghCLI operations inside contractors; used inservices/gastown/container/src/process-manager.ts.[SECRET]GITHUB_TOKEN- Generic GitHub token for API calls used as fallback whenGIT_TOKENorGITHUB_CLI_PATis absent; used inservices/gastown/container/src/process-manager.ts.[SECRET]GH_TOKEN- Short alias used by GitHub CLI processes.[SECRET]GIT_TOKEN- Dynamic git credential token (often a GitHub App installation token) scoped for git clone/push; propagated from Town DO to containers inservices/gastown/src/dos/town/container-dispatch.tsandservices/gastown/container/src/agent-runner.ts.[SECRET]GOOGLE_WORKSPACE_OAUTH_CLIENT_ID- Google Workspace OAuth client ID; used in tests and integration code. [PUBLIC]GOOGLE_WORKSPACE_OAUTH_CLIENT_SECRET- Google Workspace OAuth client secret.[SECRET]GOOGLE_WORKSPACE_OAUTH_REDIRECT_URI- Redirect URI for Google Workspace OAuth flow. [SERVER]GOOGLE_CLIENT_ID- Primary Google OAuth client ID.[PUBLIC]GOOGLE_CLIENT_SECRET- Primary Google OAuth client secret.[SECRET]GOOGLE_SERVICE_ACCOUNT_EMAIL- Google service account email.[SECRET]GOOGLE_WEB_RISK_API_KEY- API key for Google Web Risk API.[SECRET]GOOGLE_SHEETS_SPREADSHEET_ID- ID of the Google Sheet used for specific app integrations. [SERVER]GITLAB_CLIENT_ID- GitLab OAuth app client ID.[PUBLIC]GITLAB_CLIENT_SECRET- GitLab OAuth app client secret.[SECRET]BITBUCKET_OAUTH_CREDENTIAL_ACTIVE_KEY_ID- Active platform-credential envelope key ID. The legacy name is shared by Bitbucket and encrypted GitLab credentials. [SERVER]BITBUCKET_OAUTH_CREDENTIAL_ACTIVE_PUBLIC_KEY- Base64-encoded active platform-credential RSA public key; available to web andgit-token-service. The legacy name is shared by Bitbucket and GitLab.[SECRET]BITBUCKET_OAUTH_CREDENTIAL_ACTIVE_PRIVATE_KEY- Base64-encoded active platform-credential RSA private key; available only togit-token-service. The legacy name is shared by Bitbucket and GitLab.[SECRET]LINKEDIN_CLIENT_ID- LinkedIn OAuth app client ID.[PUBLIC]LINKEDIN_CLIENT_SECRET- LinkedIn OAuth app client secret.[SECRET]DISCORD_CLIENT_ID- Discord OAuth app client ID.[PUBLIC]DISCORD_CLIENT_SECRET- Discord OAuth app client secret.[SECRET]DISCORD_BOT_TOKEN- Discord bot token.[SECRET]DISCORD_PUBLIC_KEY- Discord app public key (for interactions). [PUBLIC]DISCORD_OAUTH_CLIENT_ID- Discord OAuth client ID for the bot/app. [PUBLIC]DISCORD_OAUTH_CLIENT_SECRET- Discord OAuth client secret for the bot/app.[SECRET]DISCORD_OAUTH_BOT_TOKEN- Discord bot OAuth token (separate from standard bot token).[SECRET]DISCORD_SERVER_ID- ID of the primary Discord guild/server. [SERVER]DOLTHUB_APP_CLIENT_ID- DoltHub OAuth app client ID.[PUBLIC]DOLTHUB_APP_CLIENT_SECRET- DoltHub OAuth app client secret.[SECRET]DOLTHUB_APP_DEV_CLIENT_ID- Dev-only DoltHub OAuth client ID; used inapps/web/.env.test.[PUBLIC]DOLTHUB_APP_DEV_CLIENT_SECRET- Dev-only DoltHub OAuth client secret; used inapps/web/.env.test.[SECRET]DOLTHUB_TOKEN- DoltHub personal access token; used by thewl-sdkpackage for Dolt operations.[SECRET]
STRIPE_SECRET_KEY- Stripe secret API key (sk_*).[SECRET]NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY- Stripe publishable key for client-side 3DS and payment Element initialization.[PUBLIC]STRIPE_TEAMS_SUBSCRIPTION_PRODUCT_ID- Stripe product ID for Teams subscription. [SERVER]STRIPE_ENTERPRISE_SUBSCRIPTION_PRODUCT_ID- Stripe product ID for Enterprise subscription. [SERVER]STRIPE_TEAMS_MONTHLY_PRICE_ID- Stripe price ID for Teams monthly plan (test). [SERVER]STRIPE_TEAMS_ANNUAL_PRICE_ID- Stripe price ID for Teams annual plan (test). [SERVER]STRIPE_ENTERPRISE_MONTHLY_PRICE_ID- Stripe price ID for Enterprise monthly plan (test). [SERVER]STRIPE_ENTERPRISE_ANNUAL_PRICE_ID- Stripe price ID for Enterprise annual plan (test). [SERVER]STRIPE_TOP_UP_PRICE_ID- Stripe price ID for credit top-up purchases. [SERVER]STRIPE_KILO_PASS_TIER_19_MONTHLY_PRICE_ID- Stripe price ID for Kilo Pass $19/mo tier. [SERVER]STRIPE_KILO_PASS_TIER_19_YEARLY_PRICE_ID- Stripe price ID for Kilo Pass $19/yr tier. [SERVER]STRIPE_KILO_PASS_TIER_49_MONTHLY_PRICE_ID- Stripe price ID for Kilo Pass $49/mo tier. [SERVER]STRIPE_KILO_PASS_TIER_49_YEARLY_PRICE_ID- Stripe price ID for Kilo Pass $49/yr tier. [SERVER]STRIPE_KILO_PASS_TIER_199_MONTHLY_PRICE_ID- Stripe price ID for Kilo Pass $199/mo tier. [SERVER]STRIPE_KILO_PASS_TIER_199_YEARLY_PRICE_ID- Stripe price ID for Kilo Pass $199/yr tier. [SERVER]STRIPE_KILOCLAW_2026_03_19_STANDARD_INTRO_PRICE_ID- Legacy KiloClaw Standard intro price ID (pre-rollout). [SERVER]STRIPE_KILOCLAW_2026_03_19_STANDARD_PRICE_ID- Legacy KiloClaw Standard recurring price ID (pre-rollout). [SERVER]STRIPE_KILOCLAW_2026_03_19_COMMIT_PRICE_ID- Legacy KiloClaw Commit price ID (pre-rollout). [SERVER]STRIPE_KILOCLAW_2026_05_10_STANDARD_PRICE_ID- Current KiloClaw Standard recurring price ID. [SERVER]STRIPE_KILOCLAW_2026_05_10_COMMIT_PRICE_ID- Current KiloClaw Commit price ID. [SERVER]STRIPE_KILOCLAW_EARLYBIRD_PRICE_ID- KiloClaw early-bird price ID (test-only). [SERVER]STRIPE_KILOCLAW_EARLYBIRD_COUPON_ID- Coupon ID for KiloClaw early-bird pricing. [SERVER]CHURNKEY_API_SECRET- Secret for Churnkey (cancellation flows).[SECRET]NEXT_PUBLIC_CHURNKEY_APP_ID- Public app ID for Churnkey widget. [PUBLIC]
APPLE_APP_APPLE_ID- Apple App ID for IAP verification.[SECRET]APPLE_IAP_ENVIRONMENT- Apple IAP environment (SandboxorProduction). [SERVER]APPLE_IAP_KEY_ID- Apple IAP key identifier.[SECRET]APPLE_IAP_ISSUER_ID- Apple IAP issuer (team) ID.[SECRET]APPLE_IAP_PRIVATE_KEY- Apple IAP private key (PEM/ES256) for receipt validation.[SECRET]APPLE_ROOT_CERTIFICATES_PEM- Apple root CA certs (PEM) for validating IAP receipts. [SERVER]GOOGLE_PLAY_PUBLISHER_SERVICE_ACCOUNT_JSON- Service account JSON for the Android Publisher API (subscriptions v2 get).[SECRET]GOOGLE_PLAY_RTDN_PUSH_AUDIENCE- Expected OIDC audience for Play Real-time Developer Notification Pub/Sub push (the HTTPS URL of POST /api/kilo-pass/play/notifications).[SERVER]GOOGLE_PLAY_RTDN_PUSH_SERVICE_ACCOUNT_EMAIL- Expected service-account email for the Play RTDN Pub/Sub push OIDC token; the tokenemailclaim must match it. [SERVER]APPLE_APP_BUNDLE_ID- iOS app bundle ID for Apple App Attest and Sign In verification. [SERVER]NATIVE_ADMISSION_MODE- Native admission enforcement mode:off(default),report, orenforce. [SERVER]NATIVE_ADMISSION_SIMULATOR_BYPASS- Whentruein non-production, bypasses Play Integrity API verification. [SERVER]GOOGLE_PLAY_INTEGRITY_PROJECT_NUMBER- Google Cloud project number for Play Integrity API. Also read by the mobile build, where it ships in the bundle; it is an identifier, not a secret. [SERVER]GOOGLE_PLAY_INTEGRITY_SERVICE_ACCOUNT_KEY- Service account JSON key for Play Integrity API.[SECRET]GOOGLE_PLAY_INTEGRITY_PACKAGE_NAME- Expected Android package name (e.g.,com.kilocode.app), verified against the Play Integrity verdict. [SERVER]GOOGLE_PLAY_INTEGRITY_CERT_DIGESTS- Comma-separated SHA-256 signing certificate digests (hex) accepted for the Android app. [SERVER]
GLOBAL_KILO_BACKEND- Override to select the global backend region/endpoint; used innext.config.mjs. [SERVER]ANALYZE- Next.js bundle analyzer switch; enables@next/bundle-analyzerinnext.config.mjs. [SERVER]
POSTGRES_URL- Primary Postgres connection string.[SECRET]POSTGRES_SCRIPT_URL- Alternate Postgres URL used by one-off scripts/backfills insrc/scripts/and tests.[SECRET]POSTGRES_URL_PRODUCTION- Production Postgres connection string override; used bypackages/db/src/database-url.ts.[SECRET]POSTGRES_CONNECT_TIMEOUT- Postgres connect timeout in ms (default/typical: 10000). [SERVER]POSTGRES_MAX_QUERY_TIME- Max allowed query time in ms. [SERVER]USE_PRODUCTION_DB- Forces use of the production DB URL in non-production contexts; used bypackages/db/src/database-url.ts. [SERVER]DATABASE_CA- CA certificate content (PEM) for TLS connections to Postgres; used bypackages/db/src/database-url.tsin tests and scripts. [SERVER]DATABASE_URL- Generic/alternate Postgres URL used by E2E tests and some services (cloud-agent-next,kiloclaw).[SECRET]DATA_EXPORT_POSTGRES_URL- Connection string for the separate, read-only data export database, loaded out of band and read byapps/web/src/lib/data-export/db.ts. Optional: when unset, data export reads are disabled and the application still starts.[SECRET]DATA_EXPORT_DATABASE_CA- Optional CA certificate content (PEM) for the data export database, for when it does not share the primary's CA. Falls back toDATABASE_CA; remote connections require TLS either way. [SERVER]
REDIS_URL- Redis connection URL; used bypackages/web-shared/src/lib/redis.tsand bot state.[SECRET]
BYOK_ENCRYPTION_KEY- Base64 encryption key for Bring-Your-Own-Key encryption of sensitive app data.[SECRET]USER_DELETION_AUDIT_HMAC_KEY- Base64 32-byte HMAC key for user-deletion email hashes and audit subjects.[SECRET]USER_DELETION_ENCRYPTION_KEY- Base64 32-byte AES key for user-deletion effect checkpoints and provider credentials.[SECRET]BYTEPLUS_CODING_PLAN_ACCESS_KEY_ID- Server-only BytePlus access key ID for Coding Plan seat resolution and quota usage APIs. Optional at startup; install withpnpm web:env set BYTEPLUS_CODING_PLAN_ACCESS_KEY_ID.[SECRET]BYTEPLUS_CODING_PLAN_SECRET_ACCESS_KEY- Server-only BytePlus secret access key for Coding Plan seat resolution and quota usage APIs. Optional at startup; install withpnpm web:env set BYTEPLUS_CODING_PLAN_SECRET_ACCESS_KEY.[SECRET]CREDIT_CATEGORIES_ENCRYPTION_KEY- Legacy encryption key for credit category labels/values, retained during key rotation for deployments running older source.[SECRET]CREDIT_CATEGORIES_ENCRYPTION_KEY_V2- Active encryption key for credit category labels/values. Falls back toCREDIT_CATEGORIES_ENCRYPTION_KEYwhen unset.[SECRET]AGENT_ENV_VARS_PUBLIC_KEY- RSA public key (base64) used to encrypt agent environment variables. [SERVER]AGENT_ENV_VARS_PRIVATE_KEY- Legacy alias for the above — the actual private key used to decrypt agent env vars (kept server-side).[SECRET]
WEBHOOK_AGENT_URL- URL for the webhook agent worker. [SERVER]MODEL_EVAL_INGEST_URL- URL for model evaluation ingest worker. [SERVER]SESSION_INGEST_WORKER_URL- URL for the session ingest worker. [SERVER]NOTIFICATIONS_WORKER_URL- URL for the push-notifications worker internal dispatch endpoint. [SERVER]USER_DATA_EXPORT_WORKER_URL- Internal user data export Worker URL. Production:https://user-data-export.kilosessions.ai; local development is generated bydev:env. [SERVER]NEXT_PUBLIC_SESSION_INGEST_WS_URL- WebSocket URL for session ingest from the browser. [PUBLIC]CODE_REVIEW_WORKER_URL- URL for the code review worker. [SERVER]CODE_REVIEW_WORKER_AUTH_TOKEN- Auth token for the code review worker.[SECRET]AUTO_TRIAGE_URL- URL for the auto-triage worker. [SERVER]AUTO_TRIAGE_AUTH_TOKEN- Auth token for the auto-triage worker.[SECRET]AUTO_FIX_URL- URL for the auto-fix worker. [SERVER]AUTO_FIX_AUTH_TOKEN- Auth token for the auto-fix worker.[SECRET]APP_BUILDER_URL- URL for the App Builder worker. [SERVER]APP_BUILDER_AUTH_TOKEN- Auth token for the App Builder worker.[SECRET]KILOCLAW_API_URL- Base URL for KiloClaw API; used heavily byapps/web/src/routers/kiloclaw-router.tsand tests. [SERVER]USER_DEPLOYMENTS_API_BASE_URL- Base URL for the user deployments builder. [SERVER]USER_DEPLOYMENTS_API_AUTH_KEY- Auth key for the user deployments builder.[SECRET]USER_DEPLOYMENTS_DISPATCHER_URL- URL for the deployments dispatcher (local dev). [SERVER]USER_DEPLOYMENTS_DISPATCHER_AUTH_KEY- Auth key for the deployments dispatcher.[SECRET]USER_DEPLOYMENTS_ENV_VARS_PUBLIC_KEY- Public key for encrypting user deployment env vars. [SERVER]USER_DEPLOYMENTS_ENV_VARS_PRIVATE_KEY- Private key counterpart for decrypting user deployment env vars.[SECRET]CLOUD_AGENT_NEXT_API_URL- URL for the Cloud Agent Next API; used by App Builder chat and other clients. [SERVER]NEXT_PUBLIC_CLOUD_AGENT_NEXT_WS_URL- WebSocket URL for Cloud Agent Next from the browser. [PUBLIC]CLOUD_AGENT_R2_ATTACHMENTS_BUCKET_NAME- R2 bucket for cloud agent file attachments. [SERVER]GASTOWN_SERVICE_URL- URL for the Gastown service. [SERVER]GASTOWN_BILLING_ENABLED- Enables Gastown container usage billing enforcement: admission checks and low-balance stops. Does not control metering — usage is always reported to the meter whenever theCONTAINER_USAGEbinding is present. Enabled in the Gastown Wrangler development environment and defaults tofalsein production. [SERVER]GASTOWN_BILLING_ANNOUNCEMENT_ENABLED- Set to exactlytrueto show the upcoming usage-based container billing announcement on Gastown town overview pages. Always enabled when Next.js runs in development and defaults to off otherwise. [SERVER]NEXT_PUBLIC_GASTOWN_URL- Client-side base URL for Gastown. [PUBLIC]O11Y_SERVICE_URL- URL for the observability (O11Y) service. [SERVER]O11Y_KILO_GATEWAY_CLIENT_SECRET- Client secret for the O11Y Kilo Gateway.[SECRET]BOUNCER_URL- Bouncer Worker URL. Defaults tohttps://bouncer.kiloapps.ioin production. Inference reports remain report-only and never gate the provider request. [SERVER]- Usage and decide requests have 30-second transport budgets. Every inference endpoint reports its API kind.
- Anonymous usage uses the client IP, without a payer. Signed-in usage excludes shared infrastructure addresses for server-side Kilo features.
- Usage, decide, and request-initiated
charge.attemptedevents carry the Vercelx-vercel-ja4-digestclient fingerprint when the request has a valid one, lowercased and bounded to^[a-z0-9_]{1,128}$; a missing or invalid header is omitted whole, never truncated. It describes the client TLS/HTTP characteristics of the peer that reached Kilo's edge (often shared proxy infrastructure), not a person or device, and is correlation evidence only — see https://vercel.com/docs/vercel-firewall/firewall-concepts. - Financial events enter the durable
bouncer_credit_event_outboxbefore acknowledgment. The dispatcher sends/api/v2/credit-eventwith a 5-second transport budget. - Delivery retries use the same event ID and type. Eight failed attempts produce a visible terminal failure; terminal rows remain for 30 days.
- Apple
originalTransactionIdidentifies a subscription chain, not an Apple ID. Refund requests and declined requests use distinct event types. - Deploy Bouncer v2 before this cloud change. Bouncer retains v1 for the current cloud deployment; the new outbox sends only v2.
CRON_SECRET- Shared secret for authenticated cron endpoints; used indev/discord-gateway-cron.tsand.env.test.[SECRET]dispatch-invite-email-outbox- Vercel cron path (/api/cron/dispatch-invite-email-outbox) that drains the organization invite-email outbox; reusesCRON_SECRETfor auth. [SERVER]dispatch-bouncer-credit-event-outbox- Vercel cron path (/api/cron/dispatch-bouncer-credit-event-outbox) that drains the Bouncer credit-event outbox every minute; reusesCRON_SECRETfor auth. [SERVER]WORKOS_API_KEY- WorkOS API key for enterprise SSO.[SECRET]WORKOS_CLIENT_ID- WorkOS client ID for enterprise SSO. [PUBLIC]
OPENROUTER_API_KEY- Primary OpenRouter API key for model inference through the AI gateway; provider definition inpackages/web-shared/src/lib/ai-gateway/providers/definitions/openrouter.tspointing tohttps://openrouter.ai/api/v1.[SECRET]OPENAI_API_KEY- OpenAI API key supplied as a managed BYOK credential when managed inference requests route through the Vercel AI Gateway and permit the OpenAI provider.[SECRET]OPENAI_CHATGPT_API_KEY- Partner project key for the delegated "Sign in with ChatGPT" route (packages/web-shared/src/lib/ai-gateway/openai-chatgpt/routing.ts); sent asAuthorization: Beareralongside the user'sOpenAI-On-Behalf-Of-Token. OpenAI requires this key to come from the project that owns the OAuth client (oaiapp_Abz1xcqSQAvvIwtxyemZbXBJ); a key from another project makes every delegated call fail with an opaque400 Bad Request.[SECRET]MISTRAL_API_KEY- Mistral API key; used inapps/web/src/lib/ai-gateway/embeddings/embedding-providers.tsforcodestral-embed-2505andmistral-embedembeddings, in the FIM completions proxy atpackages/web-shared/src/lib/ai-gateway/handlers/fim-completions.ts(routes Mistral Codestral vs. La Plateforme keys), and as a provider config inpackages/web-shared/src/lib/config.server.ts.[SECRET]INCEPTION_API_KEY- Inception Labs API key; used inpackages/web-shared/src/lib/ai-gateway/handlers/fim-completions.tsandpackages/web-shared/src/lib/ai-gateway/handlers/edit-completions.tsas a fill-in-the-middle (FIM) provider, with endpointhttps://api.inceptionlabs.ai/v1/fim/completions. Defined inpackages/web-shared/src/lib/config.server.ts.[SECRET]AI_ATTRIBUTION_ADMIN_SECRET- Admin secret for the AI Attribution service (apps/web/src/lib/ai-attribution-service.ts); sent asX-Admin-Secretheader.[SECRET]ARTIFICIAL_ANALYSIS_API_KEY- API key for Artificial Analysis (apps/web/src/lib/model-stats/sync-artificial-analysis.ts); sent asx-api-keyheader for model benchmarking data sync.[SECRET]ENKRYPT_API_KEY- API key for the Enkrypt scores endpoint; sent only in the server-sideapikeyheader. Required when Enkrypt ingestion is enabled, but optional at application startup. See Enkrypt operations for release gates, monitoring, and independent shutdown controls.[SECRET]FAKE_LLM_URL- Local-only URL for the fake-llm service. Next.js uses it in development to list and routefake-deterministicthrough the real gateway (apps/web/.env.development.local.example,packages/web-shared/src/lib/ai-gateway/local-fake-llm.ts). The cloud-agent-next E2E driver uses the same var for/test/*side channels (test/e2e/client.ts,test/e2e/fake-llm-server.ts,test/e2e/README.md). Defaults tohttp://localhost:8811. Ignored on Vercel. [SERVER]
QDRANT_HOST- Qdrant vector DB host. [SERVER]QDRANT_API_KEY- Qdrant API key.[SECRET]MILVUS_ADDRESS- Milvus vector DB address. [SERVER]MILVUS_TOKEN- Milvus auth token.[SECRET]
MAILGUN_API_KEY- Mailgun API key for transactional email. Used only whenVERCEL_TARGET_ENVisproductionorstaging.[SECRET]MAILGUN_DOMAIN- Mailgun sending domain. Used only whenVERCEL_TARGET_ENVisproductionorstaging. [SERVER]NEVERBOUNCE_API_KEY- NeverBounce API key for email verification. In staging, only the effective internal sink is verified.[SECRET]STAGING_EMAIL_REDIRECT_TO- Required whenVERCEL_TARGET_ENV=staging. Must contain exactly one valid address in thekilocode.aidomain; every staging message is redirected there with a staging subject prefix and safe Reply-To. [SERVER]LOCAL_EMAIL_OPEN_BROWSER- Set tofalseto stop locally captured emails from opening in a browser tab. Defaults to opening each capture. Local development only. [SERVER]
When VERCEL_TARGET_ENV is absent in local development or a script process, transactional messages are captured as owner-only clickable HTML under dev/logs/emails/ instead of being sent. Automated tests (including IS_IN_AUTOMATED_TEST) and non-production Vercel targets suppress provider delivery and report successful no-op delivery. A production-mode process without VERCEL_TARGET_ENV fails delivery as a configuration error so retryable email markers are not consumed as successful sends.
SLACK_CLIENT_ID- Slack OAuth app client ID. [PUBLIC]SLACK_CLIENT_SECRET- Slack OAuth app client secret.[SECRET]SLACK_SIGNING_SECRET- Slack request signing secret for webhooks.[SECRET]SLACK_ENCRYPTION_KEY- Encrypts the Slack bot token at rest (AES-256-GCM) in the Chat SDK state store. Generate withopenssl rand -base64 32; must decode to exactly 32 bytes orapps/webfails at startup.[SECRET]SLACK_CREDENTIAL_KEYSET_JSON- RSA keyset for encrypting Slack bot credentials at rest, as JSON or base64-encoded JSON:{"active":{"keyId":"...","publicKeyPem":"..."},"decrypt":[{"keyId":"...","privateKeyPem":"..."}]}. Web holds the private half because the Slack webhook decrypts in-process; the active key ID must also appear indecryptwith a private key.[SECRET]SLACK_ADMIN_NOTIFICATIONS_WEBHOOK_URL- Slack incoming webhook used by server-side Admin UI code to send events, summaries, reminders, and actions.[SECRET]SLACK_USER_FEEDBACK_WEBHOOK_URL- Slack incoming webhook for user feedback. [SERVER]SLACK_DEPLOY_THREAT_WEBHOOK_URL- Slack incoming webhook for deploy threat alerts. [SERVER]
ENKRYPT_SYNC_ENABLED- Enables daily Enkrypt ingestion and mapped-model catalog enrollment only when exactlytrue; defaults to disabled. Does not enable publication. Configure the API key and an external monitor for the read-only health endpoint before enabling. [SERVER]ENKRYPT_PUBLICATION_ENABLED- Exposes stored Enkrypt scores through public model catalogs and model-statistics endpoints only when exactlytrue; defaults to disabled. Does not enable ingestion. Keep disabled until redistribution approval and the release gates in Enkrypt operations are satisfied. Disabling suppresses existing and cached scores after the updated deployment is serving traffic; previously delivered client responses cannot be recalled. [SERVER]KILOCLAW_BILLING_ENFORCEMENT- Feature flag controlling KiloClaw billing enforcement. [SERVER]BRIEFING_DEBUG- Enables verbose debug logging for the KiloClaw morning briefing plugin; checked inservices/kiloclaw/plugins/kiloclaw-morning-briefing/src/index.ts. [SERVER]KILOCLAW_DISABLE_AI_COAUTHOR- Disables AI co-author features in Gastown; checked inservices/gastown/container/src/control-server.ts. [SERVER]KILOCLAW_GOOGLE_LEGACY_MIGRATION_FAILED- Set when the legacy Google migration flow fails in the KiloClaw controller. [SERVER]KILOCLAW_GOOGLE_LEGACY_MIGRATION_REASON- Human-readable reason for legacy Google migration failure in the KiloClaw controller. [SERVER]IMPACT_ADVOCATE_DEBUG_LOGGING- Enables verbose Impact Advocate debug logs. [SERVER]IMPACT_REFERRAL_DEBUG- Enables verbose Impact referral debug logs. [SERVER]
IMPACT_ACCOUNT_SID- Impact.com account SID for API auth.[SECRET]IMPACT_AUTH_TOKEN- Impact.com API auth token for affiliate/click events.[SECRET]IMPACT_ADVOCATE_ACCOUNT_SID- Impact.com account SID for Advocate (referral) API.[SECRET]IMPACT_ADVOCATE_AUTH_TOKEN- Impact.com Advocate API auth token.[SECRET]IMPACT_ADVOCATE_KILO_PASS_PROGRAM_ID- Impact.com Advocate program ID for the Kilo Pass referral program. [SERVER]IMPACT_ADVOCATE_KILO_PASS_WIDGET_ID- Impact.com Advocate widget ID for the Kilo Pass referral program. [SERVER]IMPACT_ADVOCATE_TENANT_ALIAS- Impact.com Advocate tenant alias. [SERVER]IMPACT_ADVOCATE_API_BASE_URL- Impact.com Advocate API base URL. Defaults tohttps://app.referralsaasquatch.com. [SERVER]IMPACT_CAMPAIGN_ID- Impact.com campaign ID for event tracking. [SERVER]
CLOUDFLARE_ACCOUNT_ID- Cloudflare account ID used as the GraphQLaccountTagfor Containers Analytics queries and admin dashboard deep links; used inpackages/web-shared/src/lib/config.server.tsandapps/web/src/lib/cloudflare/container-usage-analytics.ts. [SERVER]CLOUDFLARE_ANALYTICS_API_TOKEN- Cloudflare API token with Account Analytics: Read only, used by the web app to querycontainersUsageAdaptiveGroupsfor on-demand admin reconciliation; used inpackages/web-shared/src/lib/config.server.tsandapps/web/src/lib/cloudflare/container-usage-analytics.ts. Optional at process start — missing values surface as actionable errors at point of use.[SECRET]
R2_ACCOUNT_ID- Cloudflare R2 account ID for CLI session storage. [SERVER]R2_ACCESS_KEY_ID- R2 access key ID for CLI session storage.[SECRET]R2_SECRET_ACCESS_KEY- R2 secret access key for CLI session storage.[SECRET]R2_CLI_SESSIONS_BUCKET_NAME- R2 bucket name for CLI session blobs. [SERVER]R2_API_REQUEST_LOG_BUCKET_NAME- R2 bucket forapi_request_logrequest and response bodies. [SERVER]R2_API_REQUEST_LOG_ACCESS_KEY_ID- R2 access key ID used only for theapi_request_logbucket; uses theR2_ACCOUNT_IDaccount.[SECRET]R2_API_REQUEST_LOG_SECRET_ACCESS_KEY- R2 secret access key paired withR2_API_REQUEST_LOG_ACCESS_KEY_ID.[SECRET]
APNS_TEAM_ID- Apple Developer team ID for the token-based APNs key used to send Live Activity pushes. Set inservices/notifications/wrangler.jsoncundervars. [SERVER]APNS_KEY_ID- APNs key identifier (kid) for the Live Activity push key. Set besideAPNS_TEAM_ID. [SERVER]APNS_PRIVATE_KEY- PKCS#8 ES256.p8private key contents for APNs provider-token signing. Stored as one line: the PEM decoder strips every whitespace character, so the newlines are not needed. Store the key in the Secrets Store first, then add itssecrets_store_secretsbinding; a binding for a missing secret fails the deploy.[SECRET]APNS_TOPIC- iOS app bundle id (com.kilocode.kiloapp); Live Activity pushes use<topic>.push-type.liveactivity. Already set invars. [SERVER]KILO_WEB_API_BASE_URL- Base origin of the web app, used to reach the internalglanceable-agents-snapshotroute;https://app.kilo.aiin production. [SERVER]
Until all four values reach the worker it logs APNs Live Activity credentials missing and skips Live Activity pushes. Every other glanceable delivery, including the Expo aggregate push, keeps working.
The key is team-scoped for all topics and valid in both the sandbox and production APNs environments. A backup of the .p8 lives in the 1Password "Eng / Product" vault as "Apple AuthKey KRYMZL626P (.p8)"; Apple never serves it a second time.
KILOCODE_API_KEY- API key used by the KiloClaw controller for internal gateway identity.[SECRET]FLY_MACHINE_ID- Fly.io machine ID; auto-injected by the Fly runtime, used inservices/kiloclaw/controller/src/checkin.tsfor machine identity. [SERVER]KILOCLAW_MACHINE_CPU_KIND- CPU architecture label used in KiloClaw gateway health checks/tests. [SERVER]KILOCLAW_RUNTIME_PROVIDER- Runtime provider identifier used in KiloClaw gateway tests (e.g.fly). [SERVER]OPENCLAW_OAUTH_DIR- Directory path for OpenClaw OAuth credentials; managed by OpenClaw runtime. [SERVER]OPENCLAW_STATE_DIR- Directory path for OpenClaw persistent state; managed by OpenClaw runtime. [SERVER]GOG_KEYRING_PASSWORD- Password for the legacy Google keyring migration in KiloClaw controller.[SECRET]KILOCLAW_PROVISION_LOCK_POOL_MAX- Max concurrency for KiloClaw provision locks; used inapps/web/src/lib/kiloclaw/provision-lock.ts. [SERVER]OPENCLAW_GATEWAY_TOKEN- Token for authenticating with the OpenClaw gateway. Used bykiloclawplugins (kilo-chat, morning-briefing) and OpenClaw internals.[SECRET]KILOCLAW_KILO_CLI- Set by the KiloClaw controller route when the Kilo CLI is invoking a run; gates CLI-specific code paths inservices/kiloclaw/controller/src/routes/kilo-cli-run.ts. [SERVER]KILO_API_KEY- API key for the Kilo API; used by CLI run route and customizer plugin tests.[SECRET]
KILOCLAW_CONTROLLER_URL- Base URL for the KiloClaw controller service; used across plugins (kilo-chat, morning-briefing) and tests. [SERVER]KILOCLAW_SANDBOX_ID- Sandbox identifier for isolated KiloClaw execution environments; used by morning-briefing plugin. [SERVER]KILOCLAW_USER_LOCATION- User location string used by the morning briefing plugin for timezone-aware scheduling. [SERVER]KILOCLAW_USER_TIMEZONE- User timezone string used by the morning briefing plugin. [SERVER]LINEAR_API_KEY- Linear API key for issue integration in the morning briefing plugin.[SECRET]KILOCHAT_BASE_URL- Base URL for the KiloChat service. [SERVER]KILO_API_URL- Kilo API base URL used by the customizer Exa web search plugin. [SERVER]KILOCODE_API_BASE_URL- KiloCode API base URL for the customizer plugin. [SERVER]KILOCODE_ORGANIZATION_ID- Organization ID for KiloCode API calls. [SERVER]OPENCODE_CONFIG_CONTENT- JSON/Toml/YAML string containing OpenCode configuration injected into agent environments at runtime (used as an alternative toKILO_CONFIG_CONTENT). [SERVER]KILO_CONFIG_CONTENT- JSON/Toml/YAML string containing Kilo configuration injected into agent environments at runtime (session config, skills, etc.); read by@kilocode/sdkand Gastown process manager. [SERVER]
CREDENTIAL_CONTAINMENT_ENABLED- Controls GitHub, GitLab, Bitbucket, and Kilo credential containment together for new non-devcontainer Cloud Agent sessions. Enabled unless set tofalse; local dev defaults tofalse. Existing sessions retain their persisted containment flags. [SERVER]KILOCODE_TOKEN- Auth token for KiloCode/Session service identity; used by the Cloud Agent Next wrapper and Gastown containers.[SECRET]KILOCODE_TOKEN_FILE- Path to a file containing the KiloCode token (alternative to the env var). [SERVER]KILO_SESSION_INGEST_URL- URL used by the Cloud Agent Next wrapper to ingest session data. [SERVER]KILO_PLATFORM- Target platform identifier used by the Cloud Agent Next wrapper (darwin,linux, etc.). [SERVER]WRAPPER_LOG_PATH- File path for the Cloud Agent Next wrapper's log output. [SERVER]KILO_BIN_PATH- Path or name of thekiloCLI binary; used byservices/cloud-agent-next/scripts/update-default-slash-commands.mjs. [SERVER]WORKSPACE_PATH- Filesystem path of the agent workspace. [SERVER]SESSION_ID- Reserved session identifier for thecloud-agent-nextruntime; reserved inRESERVED_ENV_VARS. [SERVER]CONTROL_PLANE_IDS- Comma-separated user or org IDs admitted to the call-home control plane at interactive web (cloud-agent-web) session creation. Empty admits nobody.*includes personal accounts. Omitted from productionwrangler.jsoncso the Cloudflare dashboard value survives deploy; unset admits nobody. Wranglerdevand.dev.vars.exampledefault to*. Non-interactive origins (Slack, scheduled, code review, and similar) keep legacyagent_sessions even when enrolled. Does not enable new worktree creation by itself; that also requiresWORKTREE_CREATION_ENABLED_IDSenrollment. [SERVER]WORKTREE_CREATION_ENABLED_IDS- Comma-separated user or org IDs allowed to create new worktrees, or*for all, including personal accounts. Omitted from productionwrangler.jsoncso the Cloudflare dashboard value survives deploy; unset is off. Wranglerdevand.dev.vars.exampledefault to*. Also requires enrollment inCONTROL_PLANE_IDS. Disabling it does not block existing worktrees or sibling chats in them. [SERVER]SANDBOX_SELECTION_IDS- Comma-separated user or org IDs allowed to pick a Cloud Agent sandbox destination on the new-session page. Empty admits nobody.*includes personal accounts. Omitted from productionwrangler.jsoncso the Cloudflare dashboard value survives deploy; unset admits nobody. Wranglerdevand.dev.vars.exampledefault to*. [SERVER]VERCEL_SANDBOX_ORG_IDS- Comma-separated org IDs routed to Vercel sandboxes. Empty is off.*includes personal accounts. [SERVER]HOME- Reserved inRESERVED_ENV_VARSfor cloud-agent-next session home management. [SYSTEM]
GASTOWN_TOWN_ID- Unique identifier for a Gastown town (isolated environment/agent pool). [SERVER]GASTOWN_RIG_ID- Rig (hardware profile) identifier for Gastown scheduling. [SERVER]GASTOWN_AGENT_ID- Unique identifier for an individual Gastown agent instance. [SERVER]GASTOWN_AGENT_ROLE- Role assigned to a Gastown agent (e.g.coder,reviewer). [SERVER]GASTOWN_API_URL- Base URL for the Gastown control API. [SERVER]GASTOWN_CONTAINER_TOKEN- Auth token for Gastown container authentication; refreshed viatoken-refresh.ts.[SECRET]GASTOWN_SESSION_TOKEN- Per-session auth token for Gastown.[SECRET]GASTOWN_ORGANIZATION_ID- Organization ID associated with the Gastown town. [SERVER]GASTOWN_GIT_AUTHOR_NAME- Git author name used by agents in Gastown for commits. [SERVER]GASTOWN_GIT_AUTHOR_EMAIL- Git author email used by agents in Gastown for commits. [SERVER]AGENT_IDLE_TIMEOUT_MS- Timeout in ms before an idle Gastown agent is terminated; used inservices/gastown/container/src/process-manager.ts. [SERVER]REFINERY_IDLE_TIMEOUT_MS- Timeout in ms before an idle Refinery sub-process is killed; used inservices/gastown/container/src/process-manager.ts. [SERVER]
LOCAL_AUTH_TOKEN- Auth token for the local deployment dispatcher env.[SECRET]STAGING_AUTH_TOKEN- Auth token for the staging deployment dispatcher env.[SECRET]PROD_AUTH_TOKEN- Auth token for the production deployment dispatcher env.[SECRET]
DOCKER_SOCKET- Path or URL for the Docker daemon socket; used byservices/cloud-agent-next/scripts/docker-privileged-proxy.mjs. [SERVER]DOCKER_PROXY_SOCKET- Path to the Docker privileged proxy socket. [SERVER]SECRET- Generic secret env var used inservices/kiloclaw/src/auth/sandbox-id-adversarial.test.tsfor sandbox auth tests.[SECRET]
VITE_POSTHOG_API_KEY- PostHog public project API key baked into extension builds; read inapps/extension/src/shared/analytics.ts; absent → analytics disabled. [PUBLIC]VITE_KILO_API_BASE_URL- Selects the Kilo API base URL at build time; read inapps/extension/src/shared/auth.ts. [PUBLIC]VITE_CLOUD_AGENT_WS_URL- WebSocket URL for Cloud Agent Next streaming from the extension; read inapps/extension/src/shared/cloud-agent-config.ts. Falls back to localhost duringwxt serveand the production Cloud Agent endpoint otherwise. [PUBLIC]VITE_SESSION_INGEST_WS_URL- WebSocket URL for session ingest from the extension; read inapps/extension/src/shared/cloud-agent-config.ts. Falls back to localhost duringwxt serveand the production session ingest endpoint otherwise. [PUBLIC]
API_BASE_URL- Base HTTPS URL for the mobile app's API (e.g.https://api.kilo.ai). Bundled into the binary. [PUBLIC]WEB_BASE_URL- Base HTTPS URL for the mobile in-app web views (e.g.https://app.kilo.ai). Bundled into the binary. [PUBLIC]CLOUD_AGENT_WS_URL- WebSocket URL for Cloud Agent Next streaming in the mobile app. Bundled into the binary. [PUBLIC]SESSION_INGEST_WS_URL- WebSocket URL for session ingest from the mobile app. Bundled into the binary. [PUBLIC]APPSFLYER_DEV_KEY- AppsFlyer development key for mobile attribution. Bundled into the binary (not secret — it's a device-level SDK key). [PUBLIC]APPSFLYER_APP_ID- AppsFlyer app ID for mobile attribution tracking. [PUBLIC]KILO_CHAT_URL- Base URL for Kilo Chat in the mobile app. Bundled into the binary. [PUBLIC]EVENT_SERVICE_URL- WebSocket URL for the event service from mobile. Bundled into the binary. [PUBLIC]NOTIFICATIONS_URL- HTTP URL for the push-notifications backend from mobile. [PUBLIC]MOBILE_DEV_HOST- LAN host override for mobile dev (replaceslocalhoston physical devices); read indev/local/mobile-env.ts. [SERVER]
IS_IN_AUTOMATED_TEST- Set to1to put the app in automated-test mode (e.g. skip Turnstile challenges). [SERVER]AUTH_TOKEN- Generic auth token used inservices/app-builder/src/_integration_tests/git-test-helpers.tsto authenticate integration tests against local services.[SECRET]CANDIDATE_TAG- Tag string used byscripts/test-rollout-bucket.mjsto test rollout bucket assignment. [SERVER]PERCENT- Percentage value (0-100) used byscripts/test-rollout-bucket.mjswhen testing rollout bucket logic. [SERVER]SNOWFLAKE_MAX_POLL_ATTEMPTS- Max poll attempts for Snowflake job completion inservices/kiloclaw-billing/src/snowflake.ts. [SERVER]CF_AE_TOKEN- Cloudflare Account/Enterprise API token for the local dev CLI (dev/local/cli.ts).[SECRET]KILO_PORT_OFFSET- Port offset for the local dev tmux dashboard; applied bydev/local/cli.tsanddev/local/services.tsto prevent port conflicts. [SERVER]COMPOSE_PROJECT_NAME- Docker Compose project for the local infrastructure; written todev/.envbydev/local/infra-env.tsso a worktree with a port offset owns its own containers and volumes. [SERVER]KILO_POSTGRES_PORT,KILO_REDIS_PORT,KILO_REDIS_HTTP_PORT,KILO_GRAFANA_PORT- Host ports for the local infrastructure containers; written todev/.envbydev/local/infra-env.ts, read bydev/docker-compose.yml. Default to 5432, 6379, 8079, and 4000. [SERVER]CLOUDFLARE_HYPERDRIVE_LOCAL_CONNECTION_STRING_HYPERDRIVE- Overrides thelocalConnectionStringeachwrangler.jsonccommits, so a worktree's workers reach that worktree's database; set on every worker command bydev/local/services.ts. [SERVER]
DATABASE_URL- Postgres URL for E2E test runs acrosscloud-agent-nextandkiloclawE2E suites.[SECRET]WORKER_URL- Base URL of the worker under test (Kiloclaw E2E). [SERVER]E2E_GIT_URL- Git server URL for E2E tests (clones repos during runs). [SERVER]E2E_MODEL- Model identifier string for E2E inference tests (e.g. a fake/small model name). [SERVER]KILOCLAW_USER_LOCATION- User location parameter for lifecycle tests of the morning briefing plugin. [SERVER]KILOCLAW_USER_TIMEZONE- User timezone parameter for lifecycle tests of the morning briefing plugin. [SERVER]