Environment variables
Most apps need a few settings to run — things like a database address, an API key for a payment service, or a secret password. These are called environment variables: named settings your app reads when it starts. This step is where you provide them, and an AI helper makes sure each one ends up in the right place.
What environment variables are
Think of them as labelled sticky notes your app looks for at startup, written as NAME=value. Some are harmless (a feature toggle); others are secrets (a database password, an API key) that must be kept private. During Analysis, the app already read your code and listed the variable names it expects — so you usually just fill in the values.
Adding your variables
- On the Environment tab, you'll see a box for the service you chose to deploy. Any names detected from your code are shown as hints.
- Paste your settings as
KEY=valuelines — one per line — into the box for that service. For example:DATABASE_URL=postgresql://…STRIPE_SECRET_KEY=sk_live_…
- Repeat for each service that needs settings. A small badge shows configured or skipped so you can see your progress at a glance.
- Click Save draft at any time to keep what you've typed without moving on, or Continue — review my code when you're done.
The Deployer writes these values into the correct place, in the correct folder, before your app is built — so your app finds them exactly where it expects.
You can skip for now
Providing values is optional. Click Skip for now (or Skip this service) and you can add them later — including from Chat or the Dashboard once your app is live. Some common values are also wired up automatically: if your app needs a database or cache, its connection settings (like DATABASE_URL and REDIS_URL) are filled in for you when those are provisioned.
The Env Doctor: help placing your settings
Getting a setting into the right service and file matters — a backend key placed on the frontend simply won't work. An AI helper called the Env Doctor takes the guesswork out of this. It reads your project and suggests exactly which service and file each variable belongs in.
Crucially, it protects your secrets: the Env Doctor only ever sees the variable names (the keys), never the secret values. The values aren't sent to the Env Doctor — they're stored encrypted and placed into your app's configuration when it's deployed.
Applying changes to a live app
Once your app is already running, you can revisit its environment settings from the Dashboard. There, changing a value and clicking Apply triggers a targeted redeploy — The Deployer updates just what's needed and restarts your app with the new settings, without disturbing the rest. For apps running on your own servers the redeploy is a health-gated rolling update, so the old version keeps serving until the new one passes its health check; managed hosting uses the provider's own rollout (more on that in launching & reading the logs).
A note on safety
- Never share your secret values with anyone who doesn't need them. The Deployer stores them encrypted and only writes them into your own app, in your own cloud.
- You can leave any value blank for now and fill it in later — your app just won't use that setting until you do.
When your variables look right, continue to Code Readiness checks.