Set configuration and secrets per app and per environment.
Environment variables
Set configuration values and secrets for an application, and override them per environment.
Per app and per environment
Define variables on the application, and override or add to them on a specific environment. Production and each preview can hold different values.
From a .env file
When you deploy from the VS Code extension or the MCP server, variables in your .env file are read and set on the app for you. See Deploy with AI.
Database credentials
When you provision a database, its connection details are provided to your app as environment variables.