Deployments / Environment Variables

Environment Variables

Store API keys and runtime configuration securely per project and environment.

Adding and updating variables

Open any project and go to Settings → Environment Variables to add or remove variables scoped to Production, Preview, and Development environments.

  • Variable values are encrypted at rest with AES-256-GCM bound to workspace and project context, and never returned in plaintext once saved.
  • Updating or deleting a variable takes effect on the next deployment — trigger a redeploy after changing values.
  • Deleting a variable immediately removes it from future builds and runtime bindings.
  • Shared Workspace Environment Groups: Store shared credentials (such as OPENAI_API_KEY or DATABASE_URL) once in Workspace → Env Groups and link them across multiple projects with per-project variable override precedence.
  • Container build vs. runtime injection: On Edge Containers, encrypted runtime secrets are injected exclusively at container boot so they never appear in OCI image layer metadata; public client variables (such as NEXT_PUBLIC_* or VITE_*) are also provided at build time.