API keys, database URLs, feature flags, NODE_ENV. Deplo stores them encrypted and injects them
at build time and at run time.
The four layers
When a name is set in more than one layer, the highest one wins:
- A shared variable added automatically: one shared with two or more teams, or an instance-wide one. It shows on the app, read-only.
- The app's own variables.
- A shared variable the app has linked.
- A preview override, on previews only.
Plain and secret
| Plain | Secret | |
|---|---|---|
| Shown again | Yes | Never, in the panel or the API |
| Edit or rename | Yes | No: delete it and add it again |
| Change the type | To secret: Edit, or Make Secret on selected rows | Never back to plain |
A plain name that looks like a credential gets a warning icon: DB_PASSWORD, API_TOKEN,
S3_ACCESS_KEY_ID. A name holding PUBLIC, FILE or VERSION is not flagged.
Set variables on one app
Name it and set the type
A name and a value per row. Turn on Secret for a credential.

- Paste a whole
.envinto the Key field to add every line at once, as plain. - Names use letters, digits and underscores, and do not start with a digit.
- The other tabs: Shared links a shared variable, Database a managed database's connection string.
Variables apply on the next deploy: use Redeploy on the Changes not deployed yet notice.
Build time
A Railpack build gets every variable, so NEXT_PUBLIC_* and VITE_* work as they are. Two limits:
- A Dockerfile build sees only the names it declares, like
ARG NEXT_PUBLIC_API_URL. Docker keeps build arguments in the image history, readable with Docker access to the build server. - Names that configure the build host never reach it:
PATH,HOME, andDOCKER_*,BUILDKIT_*,BUILDX_*,COMPOSE_*,LD_*,XDG_*, among others.
See everything at once
Variables in the sidebar has two tabs:
- All: every app's variables, grouped by project and app, with search and filters.
- Shared: the team's shared variables, plus the ones other teams share with it.
Preview overrides
With pull request previews on, the app's Environment page gets a collapsed Preview overrides section: values used by previews only, above every other layer. Typical use: point previews at a test database.
A preview built from a fork inherits nothing
For security reasons it gets only the plain preview overrides. If your app needs DATABASE_URL to
start, set it there as plain.
Good to know
- No secret variable can be revealed, not even with
reveal_secrets. That capability covers database connection strings, backup recovery keys and app backup downloads. - Deplo does not know which names your app reads. A typo is a missing variable at run time.
- Compose apps get the variables in every service. A key the compose file sets itself keeps the compose value.
Troubleshooting
| Symptom | What to check |
|---|---|
| The app cannot see a variable | It was added after the last deploy. Redeploy. |
| The value is right in Deplo and wrong in the app | A higher layer sets the same name: a linked shared variable, a preview override, or the compose file. |
| A build-time variable is empty in the browser bundle | The framework only inlines prefixed names (NEXT_PUBLIC_, VITE_). With a Dockerfile, declare it with ARG. |
More in Deploys and builds.
Next steps
Did this page help you?
