Environment Variables
Securely store and manage environment variables, API keys, and secrets. All values are encrypted at rest with AES-256-GCM before being written to the database.
Navigate to Project → Settings → Environment Variables. Click Add Variable, enter the key and value, select the target environments, and save. Variables take effect on the next deployment.
Each variable can be scoped to one or more deployment environments. This lets you use different database URLs, API keys, or feature flags per environment.
Applied to deployments from your production branch (default: main).
Applied to pull request deployments. Useful for connecting to staging databases.
Pulled locally via the Deploxa CLI (deploxa env pull). Not used during CI builds.
Server-side variables are never exposed to the browser. To make a variable available in client-side JavaScript, prefix it with NEXT_PUBLIC_ (Next.js), VITE_ (Vite), or REACT_APP_ (CRA).
Never put secrets in browser-exposed variables. They will appear in your compiled JavaScript bundle and be visible to anyone who downloads your page source.
You can paste the contents of a .env file directly into the bulk import textarea. Deploxa parses each line and creates the variables automatically. Quoted values, comments, and blank lines are all handled correctly.
AES-256-GCM at rest
Every variable value is encrypted before being written to the database. Keys are never stored in plaintext.
Per-org KMS keys (Team)
Team plan organizations can bring their own AWS KMS keys for envelope encryption, giving you full key custody.
Audit log
Every create, update, and delete of an environment variable is recorded in the organization audit log.
Variables are injected into the build environment and the runtime process. Access them the same way you would locally:
Node.js
Python
Deploxa automatically injects these variables into every build and runtime environment:
| Variable | Value |
|---|---|
| DEPLOXA_URL | The public URL of this deployment |
| DEPLOXA_ENV | production | preview | development |
| DEPLOXA_DEPLOYMENT_ID | Unique ID of this deployment |
| DEPLOXA_GIT_COMMIT_SHA | Git commit SHA being deployed |
| DEPLOXA_GIT_BRANCH | Branch name being deployed |
| PORT | Port your server should listen on (container deploys) |