Made with Hope

Environment Variables

Configure environment variables for your deployed applications. Variables are encrypted and securely stored per component.

Setting environment variables

1
Open deployment settingsNavigate to your organization's Deployments settings.
2
Add a variableProvide a name, value, and runtime (build-time or runtime).
3
Save and deploySave the changes. New variables take effect on the next deployment.

Stage vs production

Environment variables can be configured separately for staging and production environments:

StageApplied to lane and change request deployments. Use for development API keys and test configurations.
ProductionApplied to main branch deployments. Use for production API keys and live service URLs.

Provided automatically

Some variables are set for you, so your app doesn't have to hardcode them:

BIT_APP_URLYour app's own public URL — useful for absolute links, OAuth callback URLs, and links in emails. Resolves to your custom domain once one is active, otherwise to the URL Bit assigns the app. In a cloud workspace it points at the running app's preview URL, including its port.
The value is set when the app starts, so it refreshes on deploy. If you set a variable with the same name yourself, your value wins. Because it can be overridden, don't use it to validate the origin of incoming requests.

Managing variables

To update an existing variable, change its value in the deployment settings. To delete a variable, remove it from the settings. Changes take effect on the next deployment.

Variable values are encrypted at rest and masked in the UI after being saved.

Next steps