Phemeral
Guides

Manage Environment Variables

Add, import, edit, and remove environment variables for your deployment environments.

Use environment variables to pass configuration and secrets to your application without hardcoding them in your source code. Each environment has its own independent set of variables.

Before You Begin

  • Environment variable values must be non-empty.
  • Each environment can have up to 200 environment variables.
  • Changes apply to new deployments. Existing deployments keep the values they were built with.

Add Variables During Project Creation

  1. From the dashboard, click New Project.
  2. Complete the project details until you reach Environment Variables.
  3. Use the environment selector to choose the variable group you want to edit. Production is selected by default.
  4. Click Add variable, then enter a key and value.
  5. Switch between Production, Staging, and Development to add variables to the other environment groups.
  6. Click Create Project, or continue to the advanced settings before creating the project.

Add Variables While Creating an Environment

  1. Open the project's Environments page.
  2. Click New Environment.
  3. Enter the environment name.
  4. Under Environment variables (optional), click Add variable and enter a key and value.
  5. Click Create environment.

Manage an Existing Environment

  1. Open the environment in the dashboard.
  2. In Environment Variables, click Manage Env Vars.
  3. In the side panel, edit existing keys or values, click Add variable to add a row, or use the remove button beside a row to delete it.
  4. Review the complete variable set.
  5. Click Save changes.

The side panel loads the environment's complete variable set.

Closing the side panel or clicking Cancel discards unsaved changes.

Import a .env File or Snippet

You can import variables during project creation, while creating an environment, or from an existing environment's management panel.

  1. Select the environment or environment group you want to populate.

  2. Click Import from .env.

  3. Click Choose file to select a local .env file, or paste .env content into the text area.

  4. Leave Override value of existing env vars with imported env vars unchecked, or select it to replace existing values:

    SettingMatching existing keysNew keys
    Override unchecked (default)Keep the existing valueAdd the imported variable
    Override checkedReplace the existing value with the imported valueAdd the imported variable
  5. Click Import env vars.

  6. Review the populated form, then save or submit the parent form.

Importing only changes the current form draft; no variables are saved until you submit the parent form.

Imported files and pasted content must be no larger than 1 MB, and an import cannot bring the selected environment above its 200-variable limit.

Key Format Requirements

Environment variable keys must:

  • Start with a letter (a-z, A-Z) or underscore (_).
  • Contain only letters, digits (0-9), and underscores.
  • Be unique within the environment.

Valid examples include DATABASE_URL, SECRET_KEY, _INTERNAL_FLAG, and API_KEY_V2.

Every variable with a key must have a non-empty value.

View a Variable's Value

Values in the environment summary are hidden by default:

  1. Open the environment in the dashboard.
  2. In Environment Variables, click the reveal control beside the variable you want to inspect.

Opening Manage Env Vars retrieves the current values and displays them in editable fields.

Redeploy After Changes

After you add, change, or remove a variable, create a new deployment for the change to take effect:

  • With GitHub CD: Push a commit to the mapped branch.
  • Without GitHub CD: Create a new deployment from the dashboard.