Skip to main content

Environment Variables

Environment variables are key-value pairs that are available to your application at runtime. They are commonly used to store configuration secrets, API keys, and other settings that vary between environments (e.g., development vs. production), following the 12-factor app methodology.

Adding Environment Variables

  1. Navigate to the App:
    • Open your project dashboard and select the application you want to configure.
  2. Go to Environment Tab:
    • Click on the Environment tab in the navigation menu.
  3. Edit Variables:
    • You will see a text area where you can enter your variables.
    • Enter each variable on a new line in the format KEY=VALUE.
    • Example:
      DATABASE_URL=postgres://user:pass@host:5432/db
      API_KEY=secret-api-key-123
      DEBUG=true
  4. Save:
    • Click the Save button to store your changes.
Redeployment Required

Changing environment variables does not update the running application immediately. You must Deploy the application again for the new variables to take effect.

Database Apps

For database applications deployed via templates, it is generally recommended not to modify environment variables manually, as this might break the pre-configured setup.