Backstage app configuration
Manage Backstage configuration as a layered, schema-validated contract rather than a collection of untracked environment values.
When to invoke
- "Configure app-config.production.yaml."
- "Why is this Backstage config key not loading?"
- "Add an integration without committing its secret."
- "Validate Backstage config before deployment."
Configuration model
app-config.yamlholds shared defaults.- Additional
app-config.<environment>.yamlfiles or explicit config arguments provide overrides. BACKSTAGE_ENVselects the conventional environment-specific config layer when supported by the target repository.- Environment variables and approved secret providers supply sensitive values.
- Frontend-visible configuration is bundled into the browser and must never contain secrets.
Procedure
Detect repository mode, Backstage version, launch command, and actual config load order.
Inventory config files, environment selection, schemas, and
${ENV_VAR}references.Classify each requested value as shared default, environment override, secret, or frontend-visible configuration.
Update the smallest config layer and matching schema or documentation.
Preserve integration boundaries and avoid duplicating the same key in unrelated layers.
Run the repository's current equivalent of:
yarn backstage-cli config:checkIf startup still fails, inspect the effective config and error without printing secret values.
Report the resolved layer, schema result, required environment names, and deployment handoff.
Gotchas
- Later config layers override earlier values; they do not merge every nested shape identically.
- A valid YAML document can still fail Backstage schema validation.
- Config available to the frontend is public to browser users.
- Sign-in credentials and GitHub integration credentials have different purposes.
Output template
## Backstage configuration result
**Environment:** <name>
**Load order:** <files and selectors>
| Key family | Source | Visibility | Validation |
| --- | --- | --- | --- |
### Required external values
- `<ENV_NAME>`: <purpose, not value>
Quality gate
- Config load order and target environment are evidenced.
- Secrets remain external and are not printed.
- Frontend-visible values contain no credentials.
- Changed keys are covered by current schemas.
-
config:checkor the repository equivalent passes. - Deployment-specific overrides are documented.