What environments are
Each environment in your Nango account is fully isolated. It has its own:- Integration configurations and OAuth app credentials
- Connections (your customers’ credentials and tokens)
- Functions (syncs, actions, webhooks)
- Secret key and public key
- Environment settings (webhook URL, OTel endpoint, etc.)
Every Nango account includes dev and prod environments by default. Additional environments (e.g., staging, demo) are available on higher plans — see the pricing page for details.
Switching environments
Use the environment switcher in the top-left corner of the dashboard to switch between environments. Everything you see — connections, logs, settings — reflects only the currently selected environment.API keys
Each environment has two keys:| Key | Where to use it |
|---|---|
| Secret key | Your backend server — never expose this in client-side code |
| Public key | Your frontend — safe to use in browser and mobile apps |
Rotating keys
If a key is compromised, rotate it immediately from Environment Settings. After rotation, the old key stops working instantly — update your application environment variables before rotating to avoid downtime.Using keys in your application
Set your secret key as an environment variable in your backend and pass it to the Nango SDK:Frontend
Best practices
Mirror your application environments Create a Nango environment for each deployment stage you have. A typical setup:| Your stage | Nango environment |
|---|---|
| Local development | dev |
| Staging | staging (if on a plan that supports it) |
| Production | prod |
.env files locally, and your hosting provider’s secrets manager in production).
.env (local development)
.env.production