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 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, tick the secret checkbox so that we'll store it in an encrypted format and not display it in the logs.

Remove an environment variable

  1. Navigate to Portals, and select a portal.
  2. Select Settings > Environment variables.
  3. Select "Remove" next to the variable you want to remove.