Skip to main content

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 .env file

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 buildCommand execution. This is important for frameworks like Next.js where NEXT_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:

VariableDescription
PORTThe port your container should listen on
NODE_ENVSet 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.