Environment Variables
Securely store API keys, secrets, and configuration values that your build and runtime need.
Never commit secrets to your Git repository. Use environment variables instead.
Adding variables
Go to your application, then Deploy → Environment Variables. Click Add Variable, enter a name and value, and save.
Variable types
- Plain text — visible in the dashboard and build logs
- Secret — encrypted at rest, never shown after saving
Accessing variables in your app
next.config.js
// Server-only variable (never exposed to the browser)const apiKey = process.env.API_SECRET_KEY// Public variable — prefix with NEXT_PUBLIC_ to expose to the clientconst publicUrl = process.env.NEXT_PUBLIC_APP_URL
Limits by plan
| Plan | Variables |
|---|---|
| Starter | 5 variables |
| Standard | Unlimited |