Environment Variables
Set per-app secrets and config that get injected into deployments, dev sandboxes, and code generation. Owner-only, masked by default, and validated against reserved names.
When to Use Env Vars
Environment variables are the right place for anything you do not want hardcoded into your app: API keys for third-party services, webhook secrets, feature flags, environment-specific URLs, anything that should be different between staging and production.
sk_live_... or a webhook signing secret into a generated file, stop and move it to an env var instead.Setting Variables
Open the Environment Variables panel
Add or edit a variable
STRIPE_SECRET_KEY) and a value. Save.Reveal a value when you need it
Reference it from your app
process.env.STRIPE_SECRET_KEY (TypeScript) or os.environ["STRIPE_SECRET_KEY"] (Python).Where Values Are Used
One value, three injection points. You do not have to set the same secret in multiple places.
Deployed app
Available to backend handlers at runtime via the standard env var APIs.
Dev sandbox / preview
When you test your app in the editor preview, the same values are injected so behavior matches what you will see after deploy.
Code generation context
The AI knows which env vars are configured, so when it generates new code it references them by name rather than asking you to fill in placeholders.
Naming Rules
Valid names match ^[A-Za-z_][A-Za-z0-9_]*$: start with a letter or underscore, then letters / digits / underscores. Convention is SCREAMING_SNAKE_CASE.
Reserved prefixes
To prevent collisions with platform internals, these prefixes are blocked:GOOGLE_, GCLOUD_, GCS_, FIREBASE_, AWS_, AZURE_, K_, CLOUD_RUN_, LD_, PYTHONPATH, NODE_PATH, INTERNAL_. Standard process names like PORT, HOME, PATH, USER, SHELL are also reserved.Rename to a non-reserved prefix (e.g. MY_AWS_REGION instead of AWS_REGION) and the value will be accepted.
Security
- Only the app owner can read or set env vars. Collaborators inherit through the standard app-owner check.
- Values are masked by default in the list view. The full value is only returned when you explicitly request Reveal.
- Values are not embedded into client-side JavaScript bundles. Backend-only by default.
- The audit log records who set or deleted each variable for traceability.
Limits
| Max variables per app | 20 |
| Max name length | 64 characters |
| Max value length | 4,096 characters (4 KB) |
| Name pattern | Starts with letter or underscore; letters / digits / underscores only |
| Plan requirement | All plans, including Free |
FAQs
Where are environment variables used?▾
How do I keep an env var secret?▾
Why was my variable name rejected?▾
Can I use env vars in my generated frontend code?▾
What plans support env vars?▾
Ready to build?
Create your first app for free, no credit card required.