Data apps are an enterprise feature. You’ll need a valid
LIGHTDASH_LICENSE_KEY set on your instance before any of the configuration below takes effect.Prerequisites
- Enterprise license -
LIGHTDASH_LICENSE_KEYmust be set on your instance. - S3-compatible storage - a bucket Lightdash can write to for app source and built artifacts. If your instance isn’t already using S3, set that up first.
- A configured sandbox provider - see sandboxes.
- A coding-agent provider - Anthropic, OpenAI, or an AWS Bedrock account with access to the model used by your selected agent.
Configuration
Add the following environment variables to your Lightdash deployment:
Choose one of the coding-agent and provider combinations below.
Claude through Anthropic (default)
LeaveAPPS_CODING_AGENT unset or set it to claude, then provide an Anthropic API key.
Users can choose Sonnet, Opus, or Haiku for each generation. Sonnet is the default.
Codex through OpenAI
SetAPPS_CODING_AGENT=codex and provide an OpenAI API key. Codex uses OpenAI directly whenever AI_DEFAULT_PROVIDER is not bedrock. You do not need an Anthropic API key for Data app generation in this mode.
Users can choose GPT-5.6 Sol, Terra, or Luna for each generation. Terra is the default.
Claude or Codex through AWS Bedrock
SetAI_DEFAULT_PROVIDER=bedrock to route the selected coding agent through AWS Bedrock. Set APPS_CODING_AGENT to claude or codex, then use a region where the corresponding models are available to your AWS account.
For Claude, enable the Claude models you want to use in the selected region. For Codex, enable the corresponding OpenAI model IDs, such as
openai.gpt-5.6-terra, through the Amazon Bedrock Mantle path. See OpenAI’s Amazon Bedrock guide for supported models and authentication requirements.
The Bedrock credentials are the same ones used by AI Analyst - see AWS Bedrock configuration for the full reference. The sandbox firewall automatically allows only the provider endpoints required for the selected agent and region.
Restart the backend. The “Data apps” entry will appear in the New menu for users with the appropriate permission scope.
Optional configuration
Costs
Self-hosting data apps means you pay your sandbox provider and your selected model provider directly:- Your sandbox provider bills for sandbox runtime. A typical build runs for 1–15 minutes; sandboxes are paused between iterations and resumed on follow-up prompts.
- Anthropic, OpenAI, or AWS Bedrock bills per token. Each generation sends the project’s dbt catalog and the user’s prompt to the selected coding agent, plus any attached charts, dashboards, or images.
Permissions
Data apps follow the same space-based permission model as charts and dashboards. The relevant scopes (view:DataApp, create:DataApp, manage:DataApp) are bundled into the default system roles - but on enterprise instances using custom roles, you’ll need to grant them explicitly. See Custom roles for details.
Troubleshooting
The “Data apps” entry doesn’t appear in the New menu. Check thatAPPS_RUNTIME_ENABLED=true, LIGHTDASH_LICENSE_KEY is set, and the signed-in user has the create:DataApp scope.
Builds fail immediately with a sandbox creation error.
Check your sandbox provider’s credentials and template configuration — see sandboxes.
Builds fail mid-generation with an Anthropic error.
Check your Anthropic account usage limits and confirm ANTHROPIC_API_KEY is valid. Long-running generations can hit rate limits on lower-tier Anthropic plans.
Codex builds fail with an OpenAI authentication or model error.
Confirm APPS_CODING_AGENT=codex, OPENAI_API_KEY is valid, and your OpenAI project can use the selected GPT-5.6 model. If you set OPENAI_BASE_URL, the gateway must support the Responses API and the model IDs shown in the Data app model picker.
Builds fail mid-generation with a Bedrock error.
Confirm BEDROCK_REGION is set to a region where the selected agent’s model is available, and that either BEDROCK_API_KEY or the BEDROCK_ACCESS_KEY_ID / BEDROCK_SECRET_ACCESS_KEY pair is valid. If you use IAM credentials, the principal must have permission to invoke the selected model. Codex requires access to the Bedrock Mantle path and an exact OpenAI Bedrock model ID such as openai.gpt-5.6-terra.