Environment Variables
Environment variables let you pass configuration to your app without hardcoding secrets in your code.
Adding Variables
From the deployment detail page, go to the Environment tab. You can:
- Add one at a time — Enter a key and value
- Bulk import — Paste the contents of a
.envfile
You can also define variables in your quikdb.json file under environmentVariables.
Encryption
All environment variables are encrypted at rest using AES-256-GCM. Variables with keys containing SECRET, KEY, TOKEN, PASSWORD, or API_KEY are automatically marked as secrets and masked in the UI.
Build-Time vs Runtime
Environment variables are available at both build time and runtime:
- Build time — Available during
buildCommandexecution. This is important for frameworks like Next.js whereNEXT_PUBLIC_*variables must be present at build time. - Runtime — Injected into the container when your app starts.
Reserved Variables
QuikDB injects these automatically — do not override them:
| Variable | Description |
|---|---|
PORT | The port your container should listen on |
NODE_ENV | Set based on deployment context |
Use $PORT in your start command to reference the assigned port:
{
"startCommand": "uvicorn main:app --host 0.0.0.0 --port $PORT"
}
Updating Variables
Changing an environment variable does not automatically redeploy your app. After updating variables, click Redeploy to apply the changes.