The Problem with .env
Many teams use environment variables like:
ENABLE_NEW_CHECKOUT=trueThis looks like a feature flag — but it's not. It's a configuration value, and the difference matters more than it seems.
Config vs. Feature Flags
Configuration
Feature Flags
Why .env Breaks Down
Using .env for feature control means:
Real Scenario
A new feature introduces a bug in production.
With .env
With feature flags
When to Use Config vs. Flags
Use config for
Infrastructure settings — database URLs, timeouts, log levels, rate limits. Values that are the same for every user and only change during a deploy.
Use feature flags for
User-facing behavior, experiments, rollout control — anything that must change instantly or target specific users without a deploy.
FAQ
Can .env be used as feature flags?
Only in very small systems — not at scale. You lose runtime control, targeting, and safe rollback.
Why are feature flags better than env variables?
Because they allow instant changes, per-user targeting, and controlled rollouts without touching your pipeline.
Do feature flags replace configuration?
No — configuration and feature flags solve different problems. Use both.
Better Alternative
Use a feature flag system designed for runtime control. Release Anchor gives you instant flag evaluation, per-user targeting, and gradual rollouts — without changing your deploy pipeline.
Related topics
