Environment Variables
Configure your app with environment variables to manage secrets and settings.
Access Variables
Section titled “Access Variables”- Go to FastAPI Cloud Dashboard.
- Go to Apps in the left sidebar.
- Select your app to view its details.
- Click on the Configuration tab to see environment variables.
Add Variables
Section titled “Add Variables”You can add environment variables in two ways, through the CLI or the dashboard.
When you first deploy your app, you can set environment variables using the FastAPI Cloud CLI. This is useful for setting up your app’s configuration before deployment. But you can also update them later.
Dashboard
Section titled “Dashboard”You can also add environment variables directly in the dashboard.
- Click Add Variable and enter the name and value.
- Click Save Only to apply changes without redeploying, or Save and Redeploy to apply changes and redeploy your app.
Best Practices
Section titled “Best Practices”- UPPERCASE_NAMES - Conventionally, environment variable names are in uppercase.
- Never commit secrets - Use env vars instead.