> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lumenwipe.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment variables

> Every variable the API, the web app and the playground read from their .env files: which app reads it, whether it is required, whether it is a secret, and its default.

Each app reads its own `.env.local`, copied from the `.env.example` next to it: `apps/api`, `apps/web` and `apps/playground`. The table below is generated from those three files by `bun scripts/supported-matrix.ts --write`, and a test fails when an example lists a variable this page lacks, or the page lists one the examples dropped.

**Required** is `Yes` when the app refuses to start or cannot serve its purpose without the variable, `Production` when only a production deployment needs it, and `Tests only` when only the funded integration tests read it. A **Secret** value never goes in source control or a `NEXT_PUBLIC_` variable, which the web build inlines into the browser bundle. The defaults are the values the code falls back to when the variable is unset.

The API still reads the `NEXT_PUBLIC_`-prefixed names of its endpoint and mediator variables (for example `NEXT_PUBLIC_STELLAR_RPC_TESTNET`) as a fallback, with a startup warning. Use the names below.

For local development, the API needs only `API_KEYS` to start, and the web needs `LUMENWIPE_API_KEY` set to one of those keys: see the [contributor setup](https://github.com/LumenWipe/lumenwipe/blob/main/CONTRIBUTING.md#3-development-setup). Account reads also need `PATH_ROUTING_API_TESTNET`, a Horizon-compatible endpoint such as `https://horizon-testnet.stellar.org`.

| Variable | App | Required | Secret or public | Default | Purpose |
| - | - | - | - | - | - |
| `API_KEYS` | api | Yes | Secret | None | Accepted API keys as comma-separated `label=key` pairs; the API refuses to boot without it |
| `LOG_HASH_KEY` | api | No | Secret | A random key per process | Key for the short hash that matches log lines about one address |
| `THROTTLE_LIMIT` | api | No | Public | `120` | Requests per window, per API key |
| `THROTTLE_TTL` | api | No | Public | `60000` | Rate limit window in milliseconds |
| `ADMIN_API_TOKEN` | api | No | Secret | None | Operator token for `/admin/api-keys/*`; needs `FIRESTORE_PROJECT_ID` |
| `FIRESTORE_PROJECT_ID` | api | No | Public | An in-memory store | GCP project holding the self-serve key store |
| `FIRESTORE_DATABASE_ID` | api | No | Public | `(default)` | Firestore database the stores use |
| `INTEGRATOR_AUTH_SECRET` | api | No | Secret | None | Signs the wallet sign-in challenge and session tokens, at least 32 characters |
| `INTEGRATOR_WEB_AUTH_SIGNING_SEED` | api | No | Secret | None | Secret seed (S...) of the server account that signs contract-account sign-in challenges; the account must exist on each network. Without it, contract-account sign-in answers 503 |
| `INTEGRATOR_WEB_AUTH_CONTRACT_TESTNET` | api | No | Public | Contract-account sign-in is off on testnet | Testnet instance (C...) of the SEP-45 web authentication contract, running the attested build; mainnet uses SDF's deployment. The repository variable of the same name holds the same value, and the nightly `web-auth-ttl` job extends that contract's TTL |
| `PORT` | api | No | Public | `3001` | Port the API listens on |
| `STELLAR_RPC_TESTNET` | api | No | Secret | `https://soroban-testnet.stellar.org` | Testnet Stellar RPC, one URL or a comma-separated failover list; secret because a provider URL can carry its key |
| `STELLAR_RPC_MAINNET` | api | Production | Secret | `https://mainnet.sorobanrpc.com` | Mainnet Stellar RPC, one URL or a list; the default is for development, a production boot refuses to start without it. Secret: a URL can carry its key |
| `STELLAR_RPC_HEADER_NAME_TESTNET` | api | No | Public | None | Name of the auth header sent to the first testnet Stellar RPC |
| `STELLAR_RPC_HEADER_VALUE_TESTNET` | api | No | Secret | None | Value of the auth header sent to the first testnet Stellar RPC |
| `STELLAR_RPC_HEADER_NAME_MAINNET` | api | No | Public | None | Name of the auth header sent to the first mainnet Stellar RPC |
| `STELLAR_RPC_HEADER_VALUE_MAINNET` | api | No | Secret | None | Value of the auth header sent to the first mainnet Stellar RPC |
| `STELLAR_RPC_HEADER_NAME_MAINNET_2` | api | No | Public | None | Name of the auth header sent to the second mainnet Stellar RPC |
| `STELLAR_RPC_HEADER_VALUE_MAINNET_2` | api | No | Secret | None | Value of the auth header sent to the second mainnet Stellar RPC |
| `STELLAR_RPC_HEADER_NAME_MAINNET_3` | api | No | Public | None | Name of the auth header sent to the third mainnet Stellar RPC |
| `STELLAR_RPC_HEADER_VALUE_MAINNET_3` | api | No | Secret | None | Value of the auth header sent to the third mainnet Stellar RPC |
| `PATH_ROUTING_API_TESTNET` | api | No | Secret | None | Testnet Horizon-compatible endpoint for account state and conversion paths; account reads fail without it. Secret because a provider URL can carry its key |
| `PATH_ROUTING_API_MAINNET` | api | Production | Secret | None | Mainnet Horizon-compatible endpoint for account state and conversion paths; a production boot refuses to start without it. Secret: a URL can carry its key |
| `PATH_ROUTING_API_HEADER_NAME_MAINNET` | api | No | Public | None | Name of the auth header sent to the first mainnet Horizon-compatible endpoint |
| `PATH_ROUTING_API_HEADER_VALUE_MAINNET` | api | No | Secret | None | Value of the auth header sent to the first mainnet Horizon-compatible endpoint |
| `PATH_ROUTING_API_HEADER_NAME_MAINNET_2` | api | No | Public | None | Name of the auth header sent to the second mainnet Horizon-compatible endpoint |
| `PATH_ROUTING_API_HEADER_VALUE_MAINNET_2` | api | No | Secret | None | Value of the auth header sent to the second mainnet Horizon-compatible endpoint |
| `OCTOPOS_API_URL_MAINNET` | api | No | Public | None | OctoPos DeFi position detection; unset means a classic-only close |
| `OCTOPOS_API_KEY` | api | No | Secret | None | Raises OctoPos to its authenticated rate tier |
| `STELLARINDEX_API_KEY` | api | No | Secret | None | StellarIndex mainnet key; turns its account data on for token and allowance discovery |
| `STELLARINDEX_API_URL_MAINNET` | api | No | Public | `https://api.stellarindex.io/v1` | StellarIndex API on mainnet |
| `STELLARINDEX_API_URL_TESTNET` | api | No | Public | `https://api.testnet.stellarindex.io/v1` | StellarIndex API on testnet |
| `MEDIATOR_PUBLIC_TESTNET` | api | No | Public | None | Public key of the testnet mediator; checked against its secret |
| `MEDIATOR_PUBLIC_MAINNET` | api | No | Public | None | Public key of the mainnet mediator; checked against its secret |
| `MEDIATOR_SECRET_TESTNET` | api | No | Secret | None | Testnet mediator signing key; without it testnet exchange closes are unavailable |
| `MEDIATOR_SECRET_MAINNET` | api | No | Secret | None | Mainnet mediator signing key; without it mainnet exchange closes are unavailable |
| `FEE_ACCOUNT_SECRET_TESTNET` | api | No | Secret | None | Testnet fee-bump sponsor key; without it testnet sponsored closes are unavailable |
| `FEE_ACCOUNT_SECRET_MAINNET` | api | No | Secret | None | Mainnet fee-bump sponsor key; without it mainnet sponsored closes are unavailable |
| `SOROSWAP_API_URL` | api | No | Public | The Soroswap SDK's default | Soroswap API base URL |
| `SOROSWAP_API_KEY` | api | No | Secret | None | Soroswap API key (`sk_...`); without it Soroban tokens are never swapped |
| `SOROBAN_CONVERSION_ENABLED` | api | No | Public | `false` | `true` enables Soroban token conversion to XLM |
| `XBULL_SWAP_API_URL` | api | No | Public | `https://swap-api.xbull.io` | xBull swap API base URL |
| `XBULL_CONVERSION_ENABLED` | api | No | Public | `false` | `true` adds xBull's router as a mainnet quote source |
| `FEE_SPONSORSHIP_ENABLED` | api | No | Public | `true` | Kill switch for sponsored-fee closes; any value other than `true` or `false` refuses the boot |
| `MEDIATOR_FORWARD_ENABLED` | api | No | Public | `true` | Kill switch for the mediator forward of exchange closes; any value other than `true` or `false` refuses the boot |
| `AQUARIUS_EXIT_ENABLED` | api | No | Public | `true` | Kill switch for Aquarius exits; any value other than `true` or `false` refuses the boot |
| `BLEND_EXIT_ENABLED` | api | No | Public | `true` | Kill switch for Blend exits; any value other than `true` or `false` refuses the boot |
| `FXDAO_EXIT_ENABLED` | api | No | Public | `true` | Kill switch for FxDAO exits; any value other than `true` or `false` refuses the boot |
| `PHOENIX_EXIT_ENABLED` | api | No | Public | `true` | Kill switch for Phoenix exits; any value other than `true` or `false` refuses the boot |
| `SOROSWAP_EXIT_ENABLED` | api | No | Public | `true` | Kill switch for Soroswap exits; any value other than `true` or `false` refuses the boot |
| `PHOENIX_TESTNET_TOKEN_ADMIN_SECRET` | api | Tests only | Secret | None | Admin of the project's testnet Phoenix test token and pool, for the funded integration tests and the pool's deployment script |
| `FXDAO_TESTNET_ORACLE_ADMIN_SECRET` | api | Tests only | Secret | None | Admin of the project's testnet FxDAO oracle, for the funded integration tests |
| `LUMENWIPE_API_URL` | web | Yes | Public | None | Base URL of the API the `/api/**` proxy forwards to |
| `LUMENWIPE_API_KEY` | web | Yes | Secret | None | One of the API's `API_KEYS`, injected server-side by the proxy |
| `UPSTASH_REDIS_REST_URL` | web | Production | Public | None | Upstash Redis for the proxy rate limit; unset disables it |
| `UPSTASH_REDIS_REST_TOKEN` | web | Production | Secret | None | Token for that Upstash Redis |
| `KV_REST_API_URL` | web | No | Public | None | Name the Vercel Upstash integration injects; read when `UPSTASH_REDIS_REST_URL` is unset |
| `KV_REST_API_TOKEN` | web | No | Secret | None | Name the Vercel Upstash integration injects; read when `UPSTASH_REDIS_REST_TOKEN` is unset |
| `RATE_LIMIT_HASH_KEY` | web | Production | Secret | None | Key for the hash of the client IP in the proxy rate-limit counters, at least 32 characters; unset on a deployment makes the limiter unavailable |
| `STATUS_SOURCE_URL` | web | No | Public | None | https URL of the status page JSON, or of a summary in the route's own shape, that the site banner reads through `/api/status`; unset, no page shows the banner. Prerendered pages read it at build time |
| `NEXT_PUBLIC_APP_URL` | web | Production | Public | None | Public site origin; a production build fails without it |
| `NEXT_PUBLIC_POLLAR_PUBLISHABLE_KEY` | web | No | Public | None | Pollar publishable key for the `/api-keys` Google, GitHub and email sign-in |
| `NEXT_PUBLIC_STELLAR_WALLET_CONNECT_PROJECT_ID` | web | Production | Public | None | WalletConnect project ID; without it the WalletConnect option is unavailable |
| `NEXT_PUBLIC_UMAMI_WEBSITE_ID` | web | No | Public | None | Umami Cloud website ID; analytics on the marketing pages only, off when unset |
| `PLAYGROUND_ENCRYPTION_KEY` | playground | Yes | Secret | None | 64 hex characters that encrypt session records at rest |
| `PLAYGROUND_ISSUER_SECRET_TESTNET` | playground | Yes | Secret | None | Testnet issuer of the demo asset |
| `PLAYGROUND_MM_SECRET_TESTNET` | playground | Yes | Secret | None | Testnet market maker that funds each demo |
| `PLAYGROUND_TOKEN_ADMIN_SECRET_TESTNET` | playground | No | Secret | None | Testnet admin of the playground token: mints it and signs `bun run token:deploy`; without it the Soroban token scenario is unavailable |
| `PLAYGROUND_DISABLED_SCENARIOS` | playground | No | Public | None | Comma-separated scenario ids to switch off |
| `CRON_SECRET` | playground | Yes | Secret | None | Bearer secret of the daily reaper; without it no session is created |
| `UPSTASH_REDIS_REST_URL` | playground | Production | Public | None | The playground's Upstash Redis REST URL |
| `UPSTASH_REDIS_REST_TOKEN` | playground | Production | Secret | None | Token for that Upstash Redis |
| `RATE_LIMIT_HASH_KEY` | playground | Production | Secret | None | Key for the hash of the client IP in the rate-limit counters, at least 32 characters, never the web's; unset on a deployment leaves the routes unlimited |
| `PLAYGROUND_DEV_FILE_STORE` | playground | No | Public | None | `1` keeps sessions in a private local file; ignored by production builds and on Vercel |
| `LUMENWIPE_API_URL` | playground | Yes | Public | None | Base URL of the API for the close step |
| `LUMENWIPE_API_KEY` | playground | Yes | Secret | None | The API key under the API's `playground` label |
| `PLAYGROUND_EXPECTED_FEE_ACCOUNT_TESTNET` | playground | No | Public | None | Public key of the API's testnet fee sponsor; without it the sponsored-fee scenario is unavailable |
| `PLAYGROUND_EXPECTED_MEDIATOR_TESTNET` | playground | No | Public | None | Public key of the API's testnet mediator; without it the exchange-close scenario is unavailable |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.