Environment Variables
Quick-reference for all supported environment variables.
All Variables
| Variable | Default | Description | |
|---|---|---|---|
| FLASK_SECRET_KEY | optional | auto-generated | Session signing secret. Auto-generated and persisted on first boot. Only set manually for multi-instance deployments that need shared sessions. |
| HTTPS_ENABLED | required | false | Set true on BTP CF. Fixes OAuth redirect URIs behind TLS proxy. |
| LICENSE_KEY | optional | — | Your license key from LemonSqueezy. Omit to run in 14-day trial mode. |
| LICENSE_OFFLINE | optional | false | Skip license validation entirely. Grants Enterprise access. Dev / air-gapped only — do not use in production. |
| OPENAI_API_KEY | optional | — | OpenAI key for AI features (Pro/Enterprise). |
| OPENAI_MODEL | optional | gpt-4o | AI model name. |
| AI_MAX_TOKENS | optional | 2048 | Max tokens per AI response. |
| XSUAA_DEFAULT_ROLE | optional | viewer | Fallback role for BTP users with no matching Role Collection. |
| REQUEST_TIMEOUT | optional | 30 | CPI API timeout in seconds. |
| MAX_LOG_ROWS | optional | 200 | Max message log rows per page fetch. |
| DATA_DIR | optional | /app/data | Persistent data directory (tenant profiles, audit log). |
| TENANT_BOOTSTRAP | optional | — | JSON string of your encrypted tenants.json contents. On CF, set this after initial setup to survive restages — the app restores tenant settings automatically on boot if the file is missing. Generate the value from Settings → ☁️ Persist Settings on BTP. |
| SUPERUSER_USERNAME | optional | — | Username for the break-glass admin account. When set alongside SUPERUSER_PASSWORD, this account can log in with full admin rights even if SSO or local user management is misconfigured. See Break-Glass Admin. |
| SUPERUSER_PASSWORD | optional | — | Password for the break-glass admin. Hashed with bcrypt at startup — never stored or logged as plaintext. Only takes effect when SUPERUSER_USERNAME is also set. |
Setting Variables on CF
cf set-env cpi-developer-studio VARIABLE_NAME "value"
cf restage cpi-developer-studio Unsetting a Variable
cf unset-env cpi-developer-studio VARIABLE_NAME
cf restage cpi-developer-studio Viewing Current Variables
cf env cpi-developer-studio