Environments
Manage separate flag configurations for development, staging, and production
Environments let you maintain independent flag configurations for each stage of your development workflow. A flag can be enabled in Development but disabled in Production, or rolled out to 50% in Staging while still at 0% in Production.
Default environments
Every new Flagpool project comes with two environments:
| Environment | Purpose |
|---|---|
| Development | Local development and testing |
| Production | Live, customer-facing traffic |
You can create additional environments (e.g., Staging, QA, Preview) on paid plans.
Environment limits by plan
| Plan | Environments |
|---|---|
| Hobby | 1 |
| Starter | 2 |
| Pro | Unlimited |
| Enterprise | Unlimited |
How environments work
Each environment is an independent copy of your flag configuration:
Development Staging Production
───────────── ───────────── ─────────────
new-checkout: ON new-checkout: ON new-checkout: OFF
rollout: 100% rollout: 100% rollout: 0%
Changes in one environment never affect another. This lets you test safely before going live.
Environment-specific credentials
Every environment has its own set of credentials:
- API Key — identifies the environment when the SDK fetches flags (e.g.,
env_abc123...) - Decryption Key — used to compute the CDN URL hash and decrypt target lists (e.g.,
tlk_xyz...)
Use the Development credentials for local testing and the Production credentials in your deployed application.
Typical workflow
Development → Staging → Production
↓ ↓ ↓
Test Validate Release
locally with QA to users
- Development — enable the flag, iterate on the feature, run unit and integration tests.
- Staging — enable the flag with production-like data. Validate with QA or stakeholders.
- Production — enable the flag for a small percentage, monitor metrics, then increase to 100%.
Managing environments
Creating an environment
- Go to Settings → Environments in your project
- Click New Environment
- Enter a name and choose a color
- Copy the generated API Key and Decryption Key
Rotating API keys
If a key is compromised, you can regenerate it:
- Navigate to Settings → Environments
- Click the Regenerate button next to the API key
- Update the key in your application and redeploy
After regeneration, the old key stops working immediately. Make sure your application is updated before or immediately after regeneration.
Per-environment flag configuration
Each flag can be configured independently per environment:
- Enabled / Disabled — toggle the flag on or off
- Targeting rules — different rules per environment
- Rollout percentage — different rollout percentages
- Variations — the same variations are shared, but the default can differ
This means you can have aggressive targeting in Development for testing while keeping Production conservative.
Next steps
- Targeting — define who sees a feature
- Rollouts — gradually release features
- Quick Start — set up your first flag