Skip to content

Get started with environment variables ​

Create environment variables ​

WARNING

Deploy the affected environments for new variables to take effect.

  1. Open the project and click on the "Variables" tab.

  2. In the "Environment variables" section, enter a key for the new environment variable.

  3. Choose how to set its value:

    • Same value for all deploy contexts: Enter one value.
    • Different value for each deploy context: Enter the values for:
      • Production: Only the production environment has that value.
      • Preview: Every preview environment gets the value.
      • Environment: Select specific environments that should get a value specific to them.
  4. Click on the "Create variable" button.

    The form to create a variable with different values for production and preview

    Learn more about different deployment contexts.

Modify and delete environment variables ​

WARNING

Re-deploy the affected environments to apply the changes.

  1. Open the project and click on the "Variables" tab.

  2. Below the form, click on the variable to expand it, then click on "Edit".

    The list of variables, with one variable expanded to show its values per deploy context and environment
  3. Update the values and click on "Update variable".

To delete a variable:

  1. Open the project and click on the "Variables" tab.
  2. Below the form, click on the variable to expand it.
  3. Click on the "Delete" button and confirm the deletion.

Deleting a variable cannot be undone.