Environment Variables

Environment variables let you configure your app without changing code. Use them for API keys, database URLs, feature flags, and other configuration.

Setting environment variables

  1. Go to your app's Settings page
  2. Under Environment Variables, click Add Variable
  3. Enter a key and value
  4. Click Save

Changes take effect on the next deployment.

Secrets

All environment variables are encrypted at rest. Values are only decrypted at build time and runtime inside your app's isolated environment.

Environment variable values are masked in the dashboard and build logs by default.

Best practices

  • Never commit secrets to your repository — use environment variables instead
  • Use descriptive names — e.g. DATABASE_URL instead of DB
  • Document required variables in your project's README so teammates know what to set