Set environment variables
Set secrets and config for production, preview, and development builds.
Environment variables let you inject configuration into builds and runtime without committing secrets to Git. You manage them in the dashboard under Project settings → Environment Variables.
Changes apply to new deployments only. Redeploy (or push a new commit) after you add or update a variable.
Environment targets
Each variable can target one or more environments:
| Target | When it applies |
|---|---|
| Production | Deployments from your production branch |
| Preview | Deployments from any other branch |
| Development | Local development workflows that pull project env |
Selecting all three is labeled All Environments in the UI. The default when you create a variable is production only.
Easel encrypts sensitive values at rest and treats them as write-only in the UI after save. Sensitive variables cannot target Development.
Preview branch overrides
For preview builds, you can set an optional Preview branch override (for example feature/billing). That value applies only to preview deployments on that branch. Other preview branches keep the default preview variables.
Shared variables
You can define variables at the organization level and link them into a project as Shared variables. Shared defaults combine with project-level values when a deployment builds.
For a given deploy, Easel resolves values in this order:
- Shared defaults for the target
- Project defaults for the target
- For preview only: shared and project branch overrides for that branch
Later entries override earlier ones for the same key.
Practical guidance
- Scope API keys and third-party secrets to the narrowest target you need.
- Use preview-scoped variables for staging integrations that must not touch production data.
- After changing variables, trigger a new deployment so the build picks them up.
Related guides
- Environments: preview vs production
- Getting started: first deploy workflow
- API reference: programmatic env management is not public yet