Environment reference
Values tolerate Vercel-style quoting ("…") and a literal trailing \n. Empty values count as unset.
Everything per project (retention, consent mode, relevance rules, quotas) lives in the database, not
in the environment.
API – core
| Variable | Default | Description |
|---|---|---|
X3_ENV | development | development, test, staging or production. Production enables live conversion uploads. Staging and production both refuse to start with incomplete settings (see Staging). |
X3_REPORTING_AUTO_SETUP | 1 | 0 turns off the automatic reporting setup: when an ad account of Google Ads, LinkedIn or Meta with the right to manage conversions is connected to a project whose reporting was never on, X3 creates the „X3 · …“ conversion targets, maps every moment (lead definitions for every new lead) and switches the destination live through the connection. |
X3_AD_SIGNALS_AUTO | 1 | 0 keeps signals to ad platforms off after the automatic reporting setup; otherwise a project without signal settings gets the defaults live (Signals to ad platforms). |
PORT | 4310 | Port of the standalone server. |
X3_PUBLIC_API_URL | http://localhost:4310 | Public origin of the API (snippets, OAuth metadata, links). https in production. |
X3_DASHBOARD_URL | http://localhost:4311 | Public origin of the dashboard (CORS, e-mail links, Composio callbacks). |
X3_ACCOUNTS_URL | X3_DASHBOARD_URL | Public origin of X3 Konto's web (https://app.x3growth.io), the product-neutral account. Links of Growth Intelligence that belong to the account (profile, organisations, team, keys, billing) open there; the mails of the account itself (confirmation, sign-in links, invitations) are sent by X3 Konto. https only when deployed. |
X3_SECRET | – (required in production) | ≥ 32 characters. HMAC secret for CSRF tokens, OAuth state, idempotency and keyed hashes. |
X3_ENCRYPTION_KEY | – (required in production) | 32 bytes, base64. AES-256-GCM key for destination secrets. To rotate it, move the old value to X3_ENCRYPTION_KEYS_PREVIOUS and set the new one: stored secrets stay readable. |
X3_ENCRYPTION_KEYS_PREVIOUS | – | Comma-separated base64 keys of before a rotation of X3_ENCRYPTION_KEY: still accepted for decryption (sealed secrets name their key by id, older envelopes are tried key by key). |
X3_SEALED_SECRETS | – | 1 after npm run secrets:seal -w @3x/api -- --apply --yes: the per-project deploy-hook and journey-key secrets are kept sealed only (no plaintext column). Unset, a new secret is written sealed and in plaintext, so a rollback to a build before migration 5101 stays possible. |
CRON_SECRET | – (required in production) | ≥ 16 characters. Bearer token for /v1/cron/* (Vercel Cron sends it automatically). |
X3_DASHBOARD_KEY | – (required in production) | ≥ 32 characters, same value in the dashboard. Requests carrying it may pass the end user's IP and user agent (login throttles, audit). |
X3_SMTP_URL | – | smtp(s)://user:pass@host:port for magic links, invitations, digests and the weekly report. Without it links and mails are only written to the log in development; in production weekly-report mails are skipped (mail_not_configured). |
X3_SLACK_BASE_URL | – | Development and tests only: origin of a local mock for Slack incoming webhooks (the stored hooks.slack.com path is posted there). Ignored in production. |
X3_MAIL_FROM | – | Sender, e.g. 3x <no-reply@example.com>. |
API – central identity (X3 Konto)
Growth Intelligence signs people in through X3 Konto, the central account of all X3 products. People, organizations, memberships, keys and plans are X3 Konto's; Growth Intelligence reads them and reacts to its identity events.
| Variable | Default | Description |
|---|---|---|
X3_IDENTITY_MODE | attached | attached: the identity tables of this database are X3 Konto's live tables and credentials are checked directly. mirror: access tokens (x3oat_), sessions (x3s_) and secret keys (sk_3x_) are checked at X3 Konto (cached for 60 seconds, ended sessions and revoked keys are refused at once through the identity events) and the identity tables are a copy that only the identity feed writes. |
X3_IDENTITY_API_URL | X3_OAUTH_ISSUER | Service host of X3 Konto (identity API, token endpoint, signing keys), e.g. https://identity.x3growth.io. |
X3_IDENTITY_CLIENT_ID | x3-intelligence-service | Service client of Growth Intelligence at X3 Konto. |
X3_IDENTITY_CLIENT_SECRET | – | Secret of that service client (sensitive). Without it the identity feed, the mirror mode and every change Growth Intelligence asks X3 Konto for (phone of the setup, preferences, new organizations from the setup, product access) are off. |
X3_IDENTITY_WEBHOOK_SECRET | – | Signing secret of X3 Konto's notifications to /v1/webhooks/identity (Standard Webhooks, sensitive). Without it the API reads the identity feed every 5 minutes only. |
API – Sales Engine link and legacy routing
The Sales Engine (x3-crm) is a product of its own. Growth Intelligence talks to it only through versioned contracts:
its service API and event feed, and Growth Intelligence's own service API (/v1/service/*) and event feed.
| Variable | Default | Description |
|---|---|---|
X3_CRM_API_URL | – | The Sales Engine's API, e.g. https://api.crm.x3growth.io. Growth Intelligence asks it for the Sales Engine card of a project, a lead's contact and „Jetzt übernehmen“, hands over the contact data of leads of projects without plain text (retried for at most 24 hours, encrypted with X3_ENCRYPTION_KEY), writes the shared lead reasons through it and reads its event feed every 5 minutes, all with the service token of X3_IDENTITY_CLIENT_ID. Unset = no Sales Engine on this deployment (no card, the reasons are kept here). |
X3_CRM_WEBHOOK_SECRET | – | Signing secret of the Sales Engine's notifications to /v1/webhooks/crm (Standard Webhooks, whsec_…, sensitive). Without it the feed is read every 5 minutes only. |
X3_GI_SUBSCRIBERS | – | Subscribers of Growth Intelligence's event feed (lead.stored, lead.pipeline_changed, project.created, project.updated, project.deleted; never personal data), JSON [{"name":"sales","url":"https://api.crm.x3growth.io/v1/webhooks/gi","secretEnv":"X3_GI_POKE_SECRET_SALES"}]. Each entry names the environment variable that holds its Standard Webhooks secret (set that variable as sensitive, never the secret in this JSON). Subscribers read the feed at GET /v1/service/events; a notification that fails is retried with backoff. |
X3_MCP_CRM_FORWARD_UNTIL | – | ISO date until which /mcp forwards calls of the Sales Engine's old tool names to the Sales Engine's MCP server (an OAuth connection's token is exchanged at X3 Konto; every answer carries the hint to add the connector „X3 Sales Engine“). Unset or past: the names answer with that hint only. |
X3_MCP_GATEWAY_URL | https://mcp.x3growth.io/mcp on https://api.x3growth.io, else none | X3 Konto's MCP gateway (connector „X3“). /mcp hands every signed-in request to it, so older connectors to this URL get the same tools; the gateway's own calls (x-x3-mcp-gateway: 1) and any failure of it are answered locally. off disables the hand-over. |
X3_COMPOSIO_LEGACY_FORWARD_UNTIL | – | ISO date until which status events of Composio accounts that are not Growth Intelligence's (the Sales Engine's mailboxes and calendars connected before the split) are forwarded to <X3_CRM_API_URL>/v1/webhooks/composio. Unset or past: nothing is forwarded. |
X3_COMPOSIO_LEGACY_FORWARD_SECRET | – | Signing secret of that forward (sensitive, the same value as the Sales Engine's COMPOSIO_LEGACY_FORWARD_SECRET). Without it nothing is forwarded. |
X3_EDGE_PROXY | off | Fallback of the path routing of api.x3growth.io when the host's rewrites are not used: a1 forwards the paths of X3 Konto (apps/api/routing/api-x3growth-io.json) to https://identity.x3growth.io, c1 also the Sales Engine's to https://api.crm.x3growth.io, with method, query, body and cookies. Growth Intelligence's own paths are never forwarded. |
X3_EDGE_PROXY_SECRET | – | ≥ 32 characters, sensitive, the same value at the destinations: the forwarded client IP goes in x-x3-client-ip with the HMAC signature x-x3-edge-signature (t=<unix>,v1=<hex>). Required with X3_EDGE_PROXY; without it nothing is forwarded and deployed environments refuse to start. |
API – database
| Variable | Default | Description |
|---|---|---|
X3_DATABASE_URL | – | Pooled connection used for requests (Neon: the -pooler host). |
X3_DATABASE_URL_UNPOOLED | X3_DATABASE_URL | Direct connection for migrations and long jobs. |
DATABASE_URL, POSTGRES_URL | – | Fallbacks set by Vercel/Neon integrations (production only). |
X3_ALLOW_REMOTE_DB | off | Outside production only localhost databases are used unless this is 1 – protects production data from local runs. |
X3_AUTO_MIGRATE | off | 1 applies pending migrations on the first request. |
X3_DB_POOL_MAX | 5 | Connections per instance (1–50). |
X3_MIGRATIONS_DIR | bundled | Directory of the SQL migrations (only for unusual layouts). |
X3_MIGRATE_ON_BUILD | off | Vercel build: 1 runs npm run migrate during the build (see apps/api/vercel.json) – only on a production build (VERCEL_ENV=production) or an explicit staging build (X3_BUILD_TARGET); a preview build of a branch never migrates, seeds or bootstraps (apps/api/scripts/build-writes.sh). |
X3_BUILD_TARGET | – | staging together with X3_ENV=staging: a non-production Vercel build that may migrate and seed its own (staging) database. |
API – network and privacy
| Variable | Default | Description |
|---|---|---|
X3_TRUSTED_IP_HEADERS | Vercel: x-real-ip,x-forwarded-for; elsewhere empty (socket address) | Client IP header chain, first match wins. Cloudflare: cf-connecting-ip; nginx/Caddy: the header the proxy sets (x-real-ip); plain Node: unset. Never x-forwarded-for unless your proxy overwrites it. |
X3_COUNTRY_HEADERS | x-vercel-ip-country,cf-ipcountry | Headers carrying the visitor's country code. |
X3_MCP_ALLOWED_ORIGINS | empty | Browser origins allowed to call /mcp (MCP inspectors). claude.ai and Claude Code send no Origin. |
X3_OAUTH_ISSUER | X3_PUBLIC_API_URL | OAuth issuer override (https or loopback). |
X3_SALES_APP_URL | http://localhost:4320 | Public URL of the Sales Engine's web app (a product of its own, e.g. https://crm.x3growth.io): the product switcher and the links of the upsell follow-up (Admin › Nutzung) open it. The localhost default applies in development only. |
X3_AUTOMATION_APP_URL | http://localhost:4330 (production: https://automation.x3growth.io) | Public URL of X3 Automation's web app (a product of its own): the product switcher opens it. |
X3_SHARED_COOKIE_DOMAIN | parent of X3_DASHBOARD_URL on x3growth.io, else none | Domain of the appearance cookie x3_appearance that every X3 product shares (Dunkel, Hell, Auto); unset on other hosts keeps it on the dashboard's host. |
X3_LIST_REQUESTS_PER_MINUTE | 120 | List and CSV-export requests (endpoints with sort/f.*/fields) per API key, OAuth grant or dashboard session and minute, per instance (10–100000). Above it the API answers 429 with Retry-After. Count probes (limit=1, the badges of tabs and playlists) have their own bucket of five times this value. |
X3_ADMIN_REQUESTS_PER_MINUTE | 120 | Requests to the platform admin routes (/v1/admin/*) per credential and minute, per instance (5–10000); above it 429 with Retry-After. |
X3_CSV_EXPORTS_PER_HOUR | 20 | Streaming CSV exports (the „CSV“ of every table) per API key, OAuth grant or dashboard session and hour, counted across all instances; at most 2 run at the same time. Above it the API answers 429 with Retry-After. |
X3_TRUSTED_IP_HEADERS
The visitor IP feeds bot budgets, per-IP rate limits and the daily session hash (it is never stored). A wrong setting either lets clients spoof their IP or makes every visitor share the proxy's address (one giant "session", budgets exhausted at once).
| Platform | Value |
|---|---|
| Vercel | unset – 3x uses x-real-ip,x-forwarded-for, which Vercel overwrites |
| Cloudflare (proxied) in front of any host | cf-connecting-ip |
| nginx / Caddy / Traefik | the header your proxy sets from the socket address, usually x-real-ip |
| Node directly on the internet | unset (socket address) |
| Netlify | x-nf-client-connection-ip |
| Fly.io | fly-client-ip |
Sites that use a first-party proxy forward the visitor IP in x-3x-client-ip together with a proxy
key; that header is trusted only with a valid key, independent of this setting.
API – background jobs
| Variable | Default | Description |
|---|---|---|
X3_SCHEDULER | off | 1 runs the in-process scheduler (standalone Node; ticks every minute). |
X3_CRON_BUDGET_MS | 40000 | Time budget of one tick: no job chunk starts after it, the chunk that runs finishes. Leave room for the longest chunk (ad and Search Console syncs take up to about 3 minutes): Vercel Hobby 60 s → 40000, Pro/fluid with maxDuration 800 s → 200000. |
X3_TICK_MAX_HOPS | 12 | A tick that leaves due work re-invokes /v1/cron/tick up to this many times (0 = off). |
X3_CRON_MINUTES | 5 | Minutes between two cron ticks (5 or 15, match the cron schedule in apps/api/vercel.json). The daily and weekly push summaries are offered and sent in these steps. |
API – push notifications (X3 App)
| Variable | Default | Description |
|---|---|---|
X3_PUSH_TRANSPORT | expo deployed, log elsewhere | How pushes leave the API: expo (Expo Push Service), log (only logged, nothing is sent) or off. |
EXPO_ACCESS_TOKEN | – | Access token of the Expo project with enhanced push security (switch it on in the Expo project). Required on staging and production with X3_PUSH_TRANSPORT=expo: the boot check reports it as missing and a deployed API sends no pushes without it; also used by npm run push-smoke (without it the smoke test is a dry run). Never logged. |
X3_PUSH_ACTION_SECRET | derived from X3_SECRET | HMAC secret (≥ 32 characters) of the „1 Tag stumm“ token each lead or anomaly push carries. Rotating it invalidates the tokens of pushes already sent (they are valid 48 hours). |
API – media storage (ad creatives)
Thumbnails and videos of ads are mirrored at sync time, because the platforms' own URLs expire. Keys are
always prefixed with the project (ad/<project id>/…); the dashboard reads them through
GET /v1/projects/{project}/ads/media (scope ads:read), which answers with a link valid for 60 seconds.
Without a store the dashboard shows the platform URL while it is valid and a placeholder afterwards.
| Variable | Default | Description |
|---|---|---|
X3_BLOB_DRIVER | fs outside production, unset in production | fs (local folder, links signed with X3_SECRET and served by /v1/blobs/*), s3 or r2 (any S3-compatible storage, presigned SigV4 links) or vercel-blob (a Vercel Blob store connected to the API project; links signed with X3_SECRET, the API streams the object through /v1/blobs/*). Unset in production = no mirroring; GET /v1/health then reports storage: "not_configured". |
BLOB_READ_WRITE_TOKEN | – | vercel-blob: read-write token of the store. Vercel sets it when you connect the store to the API project. Never logged. |
X3_BLOB_ACCESS | private | vercel-blob: access level the store was created with – private (recommended) or public (keys stay unguessable and links still go through the API). |
X3_BEHAVIOR_BLOB_TOKEN | – | vercel-blob: read-write token of a second, private store for visitor data (recordings, clips, replay assets, page snapshots). Only needed when the main store is public: recordings are never written to a public store – without this token the recordings layer reports „no storage“ and refuses recording packets. Never logged. |
X3_BLOB_DIR | .data/x3-blobs | Folder of the fs driver, relative to the working directory. Not for serverless hosts (ephemeral disk). |
X3_BLOB_BUCKET | – | Bucket (s3/r2). |
X3_BLOB_ENDPOINT | – | S3 endpoint, e.g. https://<account>.eu.r2.cloudflarestorage.com. |
X3_BLOB_REGION | auto for r2, us-east-1 for s3 | Signing region. |
X3_BLOB_ACCESS_KEY_ID | – | Access key with read/write on the bucket. Never logged. |
X3_BLOB_SECRET_ACCESS_KEY | – | Secret of that key. Never logged. |
X3_BLOB_MAX_BYTES | 26214400 (25 MB) | Largest object the API stores; bigger media are not mirrored (a previous copy stays). |
API – recordings, heatmaps and live
Heatmaps, mass replay and the live board work without extra settings. Session recordings additionally need an
object store (X3_BLOB_DRIVER, see above; Vercel Blob in production) and a separate stage origin on its own
registrable domain, from which recorded pages are rebuilt in a sandbox. Locations come from the hosting edge's
headers; no IP address is ever stored.
| Variable | Default | Description |
|---|---|---|
X3_STAGE_ORIGIN | http://127.0.0.1:<API port> outside production; none in production | Origin of the stage (e.g. https://replay.x3growth.io, a domain of the API project). The API serves only /stage/* and /v1/a there, with a strict CSP, without cookies and without CORS; /stage/* answers 404 on every other host. Recorded pages are rebuilt in an inner iframe without allow-scripts, so nothing recorded executes. In production it must be https and must not be the API or dashboard host; a subdomain of the same domain is fine because every X3 cookie is host-only. Without a (safe) stage origin recordings are still stored, but playback answers 503 stage_unavailable, snapshot thumbnails are left out and Einstellungen › Aufnahmen & Heatmaps shows „Wiedergabe-Domain nicht eingerichtet“. |
X3_STAGE_DIR | next to the API bundle | Folder with the stage runtime stage.js (npm run build -w @3x/stage); only needed when the runtime is not copied by the API build. |
X3_REPLAY_KEKS | – | Key-encryption keys of the health preset's envelope encryption: kid:base64(32 bytes), comma-separated, the first one is active. Rotating = putting a new key first; the daily job re-wraps the project keys. Never logged. |
X3_LIVE_DRIVER | pg | Live board fan-out: pg (presence table polled by an in-process hub per instance) or memory (single instance, tests). |
X3_CRAWLER_MODE | local outside production; in production remote when X3_CRAWLER_URL is set, else off | Page snapshots: local runs the crawler in-process with the machine's Chrome, remote (alias vercel) posts a signed request to X3_CRAWLER_URL, off disables snapshots (heatmaps then show without a page image). |
X3_CRAWLER_URL | – | Endpoint of the remote crawler (apps/crawler startCrawlerServer). |
X3_CRAWLER_SECRET | – | HMAC secret shared with the remote crawler; requests are signed over the raw body and expire after 120 s. |
X3_CRAWLER_EXECUTABLE | – | Chrome/Chromium binary for local (e.g. /Applications/Google Chrome.app/Contents/MacOS/Google Chrome). |
X3_CHROMIUM_PACK_URL | – | Pinned Chromium pack the crawler function downloads on a cold start (vercel mode). |
X3_HEAT_FACT_LIMIT | 250000 | Rows per heatmap layer before a view switches to an even session sample (the view then shows the sampled share). Only lowered in tests. |
X3_GEO_HEADERS | unset (edge headers are read) | Location from the hosting edge: Vercel's x-vercel-ip-country, -country-region, -city, -latitude, -longitude, else Cloudflare's cf-ipcountry, cf-region-code, cf-ipcity, cf-iplatitude, cf-iplongitude; behind a verified first-party proxy its x-3x-client-geo. off stores no location. Precision per project (city, region or country). |
X3_ANTHROPIC_BASE_URL | – | Outside production only: base URL of a mock Anthropic API for the optional AI summaries (tests, local development). Production always calls Anthropic with the organisation's own key. |
X3_ANTHROPIC_TIMEOUT_MS | 30000 | Outside production only: timeout of one summary call (at least 100). |
API – deployment storage guard (off by default)
Meant for small single-tenant deployments on capped database plans; it acts on the whole database. Per-project quotas live in the project settings instead.
| Variable | Default | Description |
|---|---|---|
X3_STORAGE_LIMIT_BYTES | unset (guard off) | Database size limit, e.g. 1000000000. |
X3_STORAGE_CLEANUP_ABOVE_BYTES | 75 % of the limit | Above it, the cleanup job prunes the oldest raw data early. |
X3_STORAGE_PAUSE_ABOVE_BYTES | 90 % of the limit | Above it, ingest stores nothing for any project (browsers still get a success answer) until space is free. |
API – conversions
| Variable | Default | Description |
|---|---|---|
X3_CONVERSIONS_MODE | live in production, else dry_run | Deployment ceiling: live, test, dry_run (Test modes). |
X3_CONVERSIONS_DISABLED | off | 1 = kill switch, everything dry_run. |
X3_META_BASE_URL | Graph API | Mock base URL, ignored in live (also for Instant Forms outside production). |
X3_META_APP_SECRET | unset | App secret of the Meta app whose webhook (object page, field leadgen) points at /v1/webhooks/meta; checks X-Hub-Signature-256. Without it Instant Form leads arrive by polling only (Instant Forms). |
X3_META_WEBHOOK_VERIFY_TOKEN | unset | Verify token entered in the Meta app's webhook settings (≥ 16 characters). |
X3_META_APP_ID | unset | App id of the same Meta app (App settings › Basic). Together with X3_META_LOGIN_CONFIG_ID and X3_META_APP_SECRET it switches on „Mit Facebook verbinden“; without them the dashboard says „noch nicht eingerichtet“. Digits only. |
X3_META_LOGIN_CONFIG_ID | unset | Configuration id of Facebook Login for Business (Facebook Login for Business › Configurations, token type „User access token“, the Instant Forms permissions). The app's Valid OAuth Redirect URI is <X3_PUBLIC_API_URL>/v1/meta-leads/oauth/callback. Digits only. |
X3_META_APP_LIVE | unset | 1 once the Meta app is Live with Advanced Access for the Instant Forms permissions (App Review passed). Unset: the dashboard tells customers that only test accounts of the app can connect. |
X3_LINKEDIN_BASE_URL | https://api.linkedin.com | Mock base URL, ignored in live. |
X3_GOOGLE_ADS_BASE_URL | Google Ads API | Mock base URL, ignored in live. |
X3_TIKTOK_BASE_URL | https://business-api.tiktok.com | Mock base URL, ignored in live. |
X3_GOOGLE_ADS_API_VERSION | v23 | Google Ads REST version for direct uploads and the Composio proxy. |
API – Composio (ad costs)
| Variable | Default | Description |
|---|---|---|
COMPOSIO_API_KEY | – | Project key ak_… (production) or user key uak_… (needs COMPOSIO_PROJECT_ID). Never logged. |
COMPOSIO_PROJECT_ID | – | Required with a uak_ key. |
COMPOSIO_ORG_ID | – | Composio organization ok_…. Required next to COMPOSIO_PROJECT_ID with a uak_ key (header x-org-id; without it Composio answers 401), e.g. for local smoke tests. |
COMPOSIO_BASE_URL | https://backend.composio.dev/api/v3.1 | API base (mocks in tests). |
COMPOSIO_AUTH_CONFIG_GOOGLEADS | – | Auth config ac_… for Google Ads. |
COMPOSIO_AUTH_CONFIG_METAADS | – | Auth config for Meta Ads. |
COMPOSIO_AUTH_CONFIG_LINKEDIN_ADS | – | Auth config for LinkedIn Ads. |
COMPOSIO_AUTH_CONFIG_TIKTOK_ADS | – | Auth config for TikTok Ads. |
COMPOSIO_AUTH_CONFIG_HUBSPOT | – | Auth config of the HubSpot toolkit (CRM, OAuth). Missing = HubSpot shows „Bald verfügbar“. |
COMPOSIO_AUTH_CONFIG_PIPEDRIVE | – | Auth config of the Pipedrive toolkit (CRM, API key or own OAuth app). |
COMPOSIO_AUTH_CONFIG_SALESFORCE | – | Auth config of the Salesforce toolkit (CRM, OAuth). |
COMPOSIO_AUTH_CONFIG_ZOHO | – | Auth config of the Zoho CRM toolkit (OAuth; the region is asked when connecting). |
COMPOSIO_AUTH_CONFIG_ATTIO | – | Auth config of the Attio toolkit (CRM, OAuth). |
COMPOSIO_AUTH_CONFIG_CLOSE | – | Auth config of the Close toolkit (CRM, API key). |
COMPOSIO_AUTH_CONFIG_GOOGLE_SEARCH_CONSOLE | – | Auth config for Google Search Console (toolkit google_search_console, read-only). Without it the Search Console card explains that the connection is not available on this deployment. |
COMPOSIO_WEBHOOK_SECRET | – | Standard Webhooks signing secret (whsec_…). |
COMPOSIO_TOOLKIT_VERSIONS | built-in pins | JSON map of pinned toolkit versions. |
API – plans and billing
Self-hosted deployments keep X3_BILLING_MODE=off: every organization is unlimited and no billing UI
appears. See Plans and limits.
| Variable | Default | Description |
|---|---|---|
X3_BILLING_MODE | off | off (no plans, no limits), free_only (self-serve sign-up, Free, prices and metering live; paid plans show „starten in Kürze“ with a booking link – no provider, no checkout), mock (development, tests, E2E – a simulated checkout, no money; refused with X3_ENV=production), stripe_test or stripe_live (paid plans bookable). Checkout, payment and invoices are X3 Konto's: Growth Intelligence mirrors each organization's plan from X3 Konto's subscription events and reports the pageview overage there. |
X3_BILLING_ENFORCE | observe | observe / 0: usage is measured and notices appear, nothing is locked. enforce / 1: locks and limits act. Complimentary organizations are never limited. |
X3_FREE_VIEW_LOCK | on | Free view lock (plans and limits): with billing on, the days from the day a Free organization passes 1,000 pageviews in a calendar month to the end of that month are not shown (data keeps being stored; an upgrade unlocks everything). Applies independent of X3_BILLING_ENFORCE, never to complimentary organizations. off / 0: emergency switch, nothing is hidden. |
X3_BILLING_ALERT_EMAIL | – | Operator mailbox for disputes and billing errors. |
X3_TERMS_URL | https://x3growth.io/terms | Terms linked in the sign-up and the checkout. |
X3_PRIVACY_URL | https://x3growth.io/privacy | Privacy policy linked in the sign-up. |
X3_OPERATOR_EMAILS | – | Comma-separated e-mail addresses of the operator's platform admins. Second factor of the platform admin (admin dashboard, user overview, support views, internal billing admin): an account is admin only with the flag users.platform_admin (set in X3 Konto's X3-Admin), a confirmed address and its address in this list. Also the inbox for "Kostenlose Einrichtungshilfe" requests of the onboarding (together with X3_BILLING_ALERT_EMAIL; addresses on x3growth.io are skipped, the domain has no MX). |
X3_INTERNAL_CRM_API_KEY | – | Upsell follow-up of the platform admin (Admin › Nutzung): secret key (sk_3x_…) of the operator's own CRM organization in the X3 Sales Engine, scopes contacts:read, contacts:write, activities:write. X3 calls the public API with it like any integration. A key an admin stores in Admin › Nutzung (encrypted with X3_ENCRYPTION_KEY) takes precedence. Unset and no stored key = no tasks, the check reports „CRM nicht verbunden“. |
X3_INTERNAL_CRM_ORG | – | Slug or id of that CRM organization (an admin can override it in Admin › Nutzung). |
X3_INTERNAL_CRM_API_URL | X3_CRM_API_URL, else X3_PUBLIC_API_URL | API base the upsell follow-up calls (the Sales Engine's public API). |
X3_SIGNUP_PHONE | required | Phone at self-serve registration: required or optional. Invitations never require it. Stored as E.164, shown only to the person themselves. |
X3_SELF_PROJECT_ID | – | Id of the operator's own X3 project (the marketing site). Every self-serve sign-up (never an invitation) becomes one lead there: form x3_signup, e-mail, name, company, phone (only with the project's plaintext opt-in), website, chosen plan, later the industry and size from the onboarding, linked to the marketing-site visit when the signup link carried x3_sid. These leads never carry contact hashes or the company into ad-platform uploads (click ids only), and are never pushed to a CRM. The job admin.signup_leads (every 15 minutes) adds a missing one for self-serve accounts of the last 14 days; without x3_sid it links the single session that clicked signup_click in the 30 minutes before the registration. The job admin.signup_checkouts (every 15 minutes) records checkout_completed (plan and interval only) on the sign-up lead's visit for a paid checkout that completed while the browser was gone – the dashboard reports it itself otherwise (X3_SELF_PUBLISHABLE_KEY). Funnel conversions of this project: a checkout opened by billing reports every enabled definition triggered by event checkout_started on the sign-up lead's visit (confirming a held browser row), the organization's first paid invoice with a net amount becomes purchases.create on the lead (orderId = invoice id, net value, invoice currency; only with an enabled purchase definition), a Stripe credit note refunds it; the same job catches up purchases of the last 7 days. The sign-up link's x3_mc=1 records consent_marketing and x3_meid the pixel's meta_event_id on the lead. Unset = no sign-up leads. |
X3_ASSISTANT_LLM | gateway in production, else mock | Model of the in-app assistant: gateway (the Vercel AI Gateway, OpenAI-compatible chat completions with streaming and tools) or mock (a scripted model for tests and local stacks, never the network). |
X3_ASSISTANT_MODEL | anthropic/claude-sonnet-5 | Model id of the assistant at the gateway (with the provider prefix). |
X3_ASSISTANT_API_BASE | https://ai-gateway.vercel.sh/v1 | Base URL of the OpenAI-compatible endpoint of the assistant (tests point it at a local fake). |
AI_GATEWAY_API_KEY | – | Key of the AI Gateway for the assistant outside Vercel. On Vercel the deployment's OIDC token is used and no key is needed. |
X3_ASSISTANT_PRICE_INPUT_EUR | 3 | Price per million input tokens in EUR, used when the model endpoint reports no cost (cached input counts 10 %). |
X3_ASSISTANT_PRICE_OUTPUT_EUR | 15 | Price per million output tokens in EUR, used when the model endpoint reports no cost. |
X3_ASSISTANT_TOOL_GROUPS | on | 0 gives the assistant's model every tool in every round instead of the tool groups a question needs (plus the meta tool tools_load). Only for cost measurements. |
X3_ASSISTANT_TRIM_TOOLS | on | 0 sends the long tool definitions (full descriptions, validation keywords) to the assistant's model. Only for cost measurements. |
X3_ASSISTANT_PROMPT_CACHE | on | 0 sends no prompt-cache breakpoints (system prompt and newest message) to the model endpoint. Only for cost measurements. |
X3_SITE_KEY_SECRET | – | One-off import (apps/api/scripts/site-key.ts, in the x3-api build only with X3_SITE_KEY_BOOTSTRAP=1): the marketing site's lead key (sk_3x_…); only its hash is stored, as a key of X3_SELF_PROJECT_ID with the single scope leads:write. Remove it after the import. |
X3_SELF_PROXY_KEY_SECRET | – | One-off import (apps/api/scripts/site-key.ts --kind proxy, in the x3-api build only with X3_PROXY_KEY_BOOTSTRAP=1): the dashboard's X3_SELF_PROXY_KEY (sk_3x_…, generated outside); only its hash is stored, as a key of X3_SELF_PROJECT_ID with the single scope ingest:proxy (the same key a proxy key from the dashboard is). Remove it after the import. |
X3_META_PIXEL_ID | – | One-off import of the operator project's Meta destination (apps/api/scripts/meta-destination.ts, in the x3-api build only with X3_META_DEST_BOOTSTRAP=1): the pixel / data set id. |
X3_META_CAPI_TOKEN_SECRET | – | Same import: the Conversions API access token (sensitive build env), stored only AES-encrypted in the destination. Remove it after the import. |
X3_META_DEST_MODE | live | Same import: mode of the imported destination (live, test, dry_run). |
X3_META_FUNNEL_MODE | – | One-off setup of the operator project's funnel conversions (apps/api/scripts/meta-funnel.ts, in the x3-api build only with X3_META_FUNNEL_BOOTSTRAP=1): definitions CompleteRegistration (sign-up lead), Lead (website form), InitiateCheckout (billing checkout) and Purchase (first paid invoice), Meta matching: click_id_only + requireMarketingConsent; this variable sets the Meta mode too (dry_run, test, live; unset keeps it). Idempotent. |
API – development and diagnostics
| Variable | Default | Description |
|---|---|---|
X3_DEBUG | off | 1 enables debug logs. |
X3_VALIDATE_RESPONSES | off | 1 validates every response against its contract (tests; also in the dashboard client). |
X3_SDK_DIR | bundled | Directory with the SDK script builds served at /v1/s/*. |
X3_SEED_PASSWORD | demo-password-123 | Password of the demo user created by npm run db:seed and of the demo agency login of npm run seed:demo. With X3_ENV=staging there is no default: without it the demo agency has no password. |
X3_COMPOSIO_MOCK_PORT | 4317 | Port of the local Composio mock server (apps/api/src/modules/ads/composio/mock.ts, replays the recorded samples); point COMPOSIO_BASE_URL at it. |
X3_CRM_MOCK_PORT | 4551 | Port of the local Composio + CRM mock (apps/api/src/modules/crm/mock.ts: in-memory HubSpot and Pipedrive behind the Composio proxy) for local development and E2E; point COMPOSIO_BASE_URL at http://127.0.0.1:<port>/api/v3.1. Never a real CRM. |
X3_LOAD_DATABASE_URL | local x3_load on port 54331 | Database of the load-test seed script (apps/api/scripts/seed-load.ts); never a production database. |
X3_PERF_DATABASE_URL | local x3_perf on port 54331 | Database of the insights performance check (npm run perf:insights -w @3x/api: demo clinic + ≥ 50 portfolio projects, 90 days, p95 against the budgets); never a production database. |
X3_DEMO_LOGIN | off | 1 enables POST /v1/auth/demo: a read-only two-hour session as the demo user (10 per hour and IP). Every write answers demo_read_only. |
X3_DEMO_USER_EMAIL | demo-viewer@x3growth.io | E-mail of the user the demo login signs in as (a viewer of the demo organization, created by the seed). |
X3_NOW | unset | Fixed clock for the insights (ISO time, e.g. 2026-10-15T21:40:00+02:00) – screenshots and acceptance tests against seeded data. Ignored in production. |
X3_E2E_LOGIN | off | Staging only: 1 enables the e2e test login of the mobile app (grant urn:x3:e2e, users of the seeded e2e organization only). The API refuses to start with it under X3_ENV=production. |
X3_E2E_SECRET | – | Shared secret of the e2e test login, ≥ 32 characters; required with X3_E2E_LOGIN. Kept in the staging env and the Maestro runner only. |
Staging
A staging deployment runs with X3_ENV=staging against its own database (never production data). It
shares the deployment checks of production (secrets, https URLs) and additionally needs a real object
store (X3_BLOB_DRIVER other than fs) and X3_ALLOW_REMOTE_DB=1 for its hosted database. It never
uploads conversions (dry run; X3_CONVERSIONS_MODE=live is refused). The mobile app's preview and development builds talk to it.
| Variable | Default | Description |
|---|---|---|
X3_SEED_ON_BUILD | off | Build env of the API project: 1 runs the demo seed (portfolio, 56 days) and the mobile seed (npm run seed:mobile -w @3x/api) after the migrations of a staging build (needs X3_MIGRATE_ON_BUILD=1 and the database and object store variables in the build environment). The build fails unless X3_ENV=staging. |
The mobile seed (apps/api/src/modules/demo/seed-mobile.ts) is idempotent and refuses
X3_ENV=production. It creates the e2e organization x3-e2e (owner e2e@x3growth.io, member
e2e-team@x3growth.io, a website with lead qualification and a shop, no ad accounts and no
destinations) and extends the demo clinic with a running and a decided experiment, a page state,
tasks of every category and live visits sent through the public ingest (recordings incl. a running
one, heatmap data on two page versions, page images, a quiz lead). npm run lead-generator -w @3x/api posts a fictional lead through the public ingest of
a project (staging and App Review), npm run push-smoke -w @3x/api -- --to <token> sends a test push to one device, and
-- --user e2e@x3growth.io --expect-open sends it through the real outbox to that person's registered devices and waits for the tap
(notifications.open); without EXPO_ACCESS_TOKEN both are dry runs.
Dashboard
| Variable | Default | Description |
|---|---|---|
X3_API_URL | http://localhost:4310 | API origin the server components call (can be an internal URL). |
X3_PUBLIC_API_URL | X3_API_URL | Public API origin shown in snippets and docs links. |
X3_DASHBOARD_KEY | – | Same value as on the API; without it the API sees the dashboard's IP for every login. |
X3_TRUSTED_IP_HEADERS | Vercel: x-real-ip,x-forwarded-for | Header chain of the dashboard's own edge, used to forward the visitor IP. |
X3_VALIDATE_RESPONSES | off | Validate API responses (development). |
X3_ACCOUNTS_URL | https://app.x3growth.io | Origin of X3 Konto's web. Sign-in, sign-up, e-mail confirmation, sign-in links, invitations, password reset, the account area, organisations, team, keys, the core of X3-Admin and the plan chooser live there: their old paths on the dashboard answer 308 to the same path there, so links in mails already sent keep working. A request to the old account host (accounts.x3growth.io) goes there as well. |
X3_DASHBOARD_URL | http://localhost:4311 | Growth Intelligence's own public origin: the redirect URI of its sign-in is <X3_DASHBOARD_URL>/auth/callback. |
X3_OAUTH_ISSUER | X3_PUBLIC_API_URL | The issuer of X3 Konto the browser signs in at (OAuth client x3-intelligence, consent auto: a person signed in there with a Growth Intelligence role comes back without a click). |
X3_IDENTITY_API_URL | X3_OAUTH_ISSUER | Where the dashboard's server reaches X3 Konto's token endpoint (code exchange, refresh, the one-time upgrade of an old x3s_ session, sign-out). |
X3_INTELLIGENCE_OAUTH_SECRET | – (required in production) | ≥ 32 characters. Client secret of x3-intelligence (sensitive). Unset in development = public client with PKCE only. |
X3_INTELLIGENCE_COOKIE_KEY | – (required in production) | 32 bytes, base64. Key of the sealed session cookie that holds the access and refresh token (sensitive). Rotating it signs everybody out of Growth Intelligence (not out of X3 Konto: the next page signs in again without a click). |
X3_IOS_APP_IDS | – | X3 App on iOS: comma-separated app ids <TEAMID>.<bundle id> for /.well-known/apple-app-site-association (universal links for the analysis pages and the OAuth callback, shared web credentials). Production <TEAMID>.io.x3growth.app, the staging dashboard lists the .preview and .dev ids. Unset = the file answers 404. |
X3_ANDROID_APP_LINKS | – | X3 App on Android: <package>=<SHA-256 fingerprint>[,<fingerprint>…], several packages separated by ;, for /.well-known/assetlinks.json (verified App Links incl. the OAuth callback). Use the Play app signing key (plus the upload key for internal builds). Unset = 404. |
X3_SELF_PUBLISHABLE_KEY | – | Publishable key (pk_3x_…) of the operator's own X3 project (the one of the marketing site, see X3_SELF_PROJECT_ID). When set, the dashboard measures its own sign-up and setup with the X3 SDK (through its first-party proxy /n3 with X3_SELF_PROXY_KEY, else straight to X3_PUBLIC_API_URL): sign-up, sign-in when coming from the marketing site, the e-mail confirmation and the setup of an organization's first project until its done screen – never product pages, settings, admin, shares or support views, never platform admins or operators. Pageviews under /platform/… without tenant names, an allowlist of events without personal data, recordings and heatmaps under the project's masking (inputs never; keys, prompts, invitations blocked; link targets never). Unset = no measurement. |
X3_SELF_PROXY_KEY | – | Secret key with scope ingest:proxy of that project (server only). Only with it the dashboard's /n3 proxy is active (it forwards the visitor IP); without it /n3 answers 404 and the browser talks to the API directly – a proxy without the key would show the API one address for every visitor. The operator's key can be imported without a sign-in with X3_SELF_PROXY_KEY_SECRET (API). |
X3_SITE_LANDING | off | 1 serves the X3 website's landing on the dashboard's host: logged out /, /land, /sitemap.xml and /_x3site/* are rewritten to X3_SITE_ORIGIN (never with a session cookie, never authorization or the session cookies, each answer with its own CSP); robots.txt then allows / and /_x3site/. |
X3_SITE_ORIGIN | – | Origin of the X3 website (the production alias of the Vercel project x3-site, not x3growth.io). |
X3_SITE_LANDING_HOSTS | – | Comma-separated hosts that get the landing (intelligence.x3growth.io, never accounts.x3growth.io); an entry with a leading dot matches a suffix. |
X3 App builds (EAS)
Build-time variables of the X3 App (apps/mobile). eas.json sets the public ones per build profile
(development, preview against staging, production); secrets live in the EAS environment variables
of the Expo project, never in the repository. The runbook is docs/internal/MOBILE-RELEASE.md.
| Variable | Default | Description |
|---|---|---|
EXPO_PUBLIC_APP_VARIANT | development | development, preview or production: bundle id (io.x3growth.app, .preview, .dev), app name, custom scheme (dev and preview only) and whether the e2e login is compiled in (never in production). |
EXPO_PUBLIC_X3_API_URL | staging, production: https://api.x3growth.io | API origin the app calls. |
EXPO_PUBLIC_X3_ISSUER | EXPO_PUBLIC_X3_API_URL | OAuth issuer the app checks on the sign-in callback (iss). |
EXPO_PUBLIC_X3_APP_HOST | staging: staging-app.x3growth.io, production: intelligence.x3growth.io | Dashboard host: associated domains and App Links, the https OAuth callback, „Im Web öffnen“. Must match X3_IOS_APP_IDS / X3_ANDROID_APP_LINKS of that dashboard and X3_MOBILE_REDIRECTS of its API. |
EAS_PROJECT_ID / EXPO_PUBLIC_EAS_PROJECT_ID | – | Expo project id (set by eas init). Without it the app gets no Expo push token and EAS Update stays off. |
GOOGLE_SERVICES_JSON | – | EAS file variable with the Firebase google-services.json of the three Android packages (FCM). Without it Android builds have no push token. |
Example app and your own site
| Variable | Description |
|---|---|
NEXT_PUBLIC_X3_KEY | Publishable key pk_3x_… of the project (safe in the browser). |
X3_API_ORIGIN | API origin the first-party proxy forwards to. |
X3_PROXY_KEY | Proxy key (sk_3x_…, scope ingest:proxy) – server only, lets the proxy forward the visitor IP. |
X3_API_URL, X3_SECRET_KEY, X3_PROJECT_ID | Server helper (@x3growth/sdk/server): API origin, secret key with the needed scopes, optional project id. |
X3_EXAMPLE_TRANSPORT | Example app only: proxy (default, SDK through /n3) or direct (SDK talks to X3_API_ORIGIN). |