Secrets (Environment Variables)

Adding Secrets through the CLI

Below is an example of how to use an environment variable file. You can pass the --envfile flag with the path to the env file. For example:

In this example the path to the file is .env.

If you prefer to pass the environment variables manually below is deployment command example:

They are passed after the --env flag as key value pairs.

To pass multiple environment variables, you can repeat the --env tag. i.e. reflex deploy --project f88b1574-f101-####-####-5f########## --env KEY1=VALUE1 --env KEY2=VALUE. The --envfile flag will override any envs set manually.

Adding Secrets through the Cloud UI

To find the secrets tab, click on the Settings tab in the Cloud UI on the app page.

Then click on the Secrets tab as shown below.

From here you can add or edit your environment variables. You will need to restart your app for these changes to take effect.

This functionality in the UI can be disabled by an admin of the project.