gray-engine-68894
10/07/2024, 9:19 AMbrief-egg-61061
10/07/2024, 9:19 AMbrief-egg-61061
10/07/2024, 9:20 AMSELFSERVICE_FLOWS_SETTINGS_UI_URL
environment variable to your settings UI URL. For example: export SELFSERVICE_FLOWS_SETTINGS_UI_URL=<http://my-app.com/settings>
[Source](https://www.ory.sh/docs/kratos/fallback/settings) 2. Registration UI: Set the SELFSERVICE_FLOWS_REGISTRATION_UI_URL
environment variable to your registration UI URL. For example: export SELFSERVICE_FLOWS_REGISTRATION_UI_URL=<http://my-app.com/registration>
[Source](https://www.ory.sh/docs/kratos/fallback/registration) 3. Recovery UI: Set the SELFSERVICE_FLOWS_RECOVERY_UI_URL
environment variable to your recovery UI URL. For example: export SELFSERVICE_FLOWS_RECOVERY_UI_URL=<http://my-app.com/recovery>
[Source](https://www.ory.sh/docs/kratos/fallback/recovery) 4. Login UI: Set the SELFSERVICE_FLOWS_LOGIN_UI_URL
environment variable to your login UI URL. For example: export SELFSERVICE_FLOWS_LOGIN_UI_URL=<http://my-app.com/login>
[Source](https://www.ory.sh/docs/kratos/fallback/login) 5. Default Return URL: Set the SELFSERVICE_DEFAULT_BROWSER_RETURN_URL
environment variable to your default return URL. For example: export SELFSERVICE_DEFAULT_BROWSER_RETURN_URL=<http://my-app.com/dashboard>
[Source](https://www.ory.sh/docs/kratos/fallback/default_return_to) 6. MFA UI: Set the SELFSERVICE_FLOWS_MFA_UI_URL
environment variable to your MFA UI URL. For example: export SELFSERVICE_FLOWS_MFA_UI_URL=<http://my-app.com/mfa>
[Source](https://www.ory.sh/docs/kratos/fallback/mfa) 7. Verification UI: Set the SELFSERVICE_FLOWS_VERIFICATION_UI_URL
environment variable to your verification UI URL. For example: export SELFSERVICE_FLOWS_VERIFICATION_UI_URL=<http://my-app.com/verify>
[Source](https://www.ory.sh/docs/kratos/fallback/verification) 8. Error UI: Set the SELFSERVICE_FLOWS_ERROR_UI_URL
environment variable to your error UI URL. For example: export SELFSERVICE_FLOWS_ERROR_UI_URL=<http://my-app.com/error>
[Source](https://www.ory.sh/docs/kratos/fallback/error) Remember, environment variables take precedence over config file values. Nested paths get mapped to config values by putting an underscore _
between every level. For example, selfservice.flows.settings.ui_url
becomes SELFSERVICE_FLOWS_SETTINGS_UI_URL=<value>
. [Source](https://www.ory.sh/docs/kratos/configuring) For configuring OIDC providers, it's recommended to set the full JSON array as an environment variable. However, it's not recommended to use environment variables for this purpose as the data object is complex and getting the syntax right is difficult. [Source](https://www.ory.sh/docs/self-hosted/kratos/configuration/oidc#environment-variables)gray-engine-68894
10/07/2024, 9:21 AMbrief-egg-61061
10/07/2024, 9:21 AMbrief-egg-61061
10/07/2024, 9:21 AM.
) with underscores (_
), and convert it to uppercase. For example, the configuration key selfservice.flows.settings.ui_url
becomes the environment variable SELFSERVICE_FLOWS_SETTINGS_UI_URL
. Here's an example of how you can set it: bash export SELFSERVICE_FLOWS_SETTINGS_UI_URL=<http://my-app.com/settings>
After setting the environment variable, Ory Kratos will use this value for the settings UI URL instead of the value defined in the configuration file. However, please note that for complex objects like OIDC providers, it's not recommended to use environment variables due to the complexity of the data object. In such cases, it's recommended to set the full JSON array as an environment variable. For more information on how to load configuration from environment variables, you can refer to the [Ory documentation](https://www.ory.sh/docs/ecosystem/configuring#loading-configuration-from-environment-variables).