Last updated

Environment variables

Environment variables are used during build time for the developer portal. They may also be used in the client-side code (when explicitly allowed).

They may be set using special .env.environment_name files, or configured one by one in the Workflows settings.

Restricted environment variables

When defining custom names, avoid commonly reserved environment variables, such as HOME and PATH, and those related to the Node environment such as NODE_ENV.

Be aware of the built-in environment variables and know that changing the values may result in a behavior change during the build.

The REDOCLY_ prefix is reserved for future use by Redocly.

Add an environment variable

  1. Navigate to Portals, and select a portal.
  2. Select Settings > Environment variables.
  3. Select "Add Variable".
  4. Fill the form with the Environment variable name and value.
  5. If the variable is a secret, select the secret checkbox so to store it in an encrypted format and not display it in the logs.

Change an environment variable

  1. Navigate to Portals, and select a portal.
  2. Select Settings > Environment variables.
  3. Select the Edit icon next to the variable you want to change.
  4. In the Edit environment variable dialog that opens, make changes to your variable name and/or value.
  5. To confirm changes and exit the dialog, select Save.

Remove an environment variable

  1. Navigate to Portals, and select a portal.
  2. Select Settings > Environment variables.
  3. Select the Delete icon next to the variable you want to remove. The variable is removed from the list immediately.