Go live: a production checklist
Work through the settings, protections and checks below before real users depend on your flags.
- Time
- About 8 min
- Who can do it
- Admin. Several steps change environments, keys or roles, which only Admins can do.
- Where
- Environments, Members, API Keys, Metrics, Errors and Alerts in the console, plus your server settings
- You finish with
- Production protected, access limited and alerts in place
Before you start#
- An Admin account. Editing environments needs
environments.update, creating keys needsapi_keys.createand changing roles needsmembers.update. Release managers can do the monitoring steps, since they holdalerts.manage. - Your flags and an SDK already working in Development or Staging. See Create your first flag and Choose and set up an SDK if not.
- If you run the server yourself, access to its environment variables. Self-hosting lists each one.
Walk through it#
Protect production
Open Environments, edit Production and check that Production environment is on (it is locked on for the default
productionenvironment). Developers and Product managers can then view flags there but not toggle them, change rollouts or targeting, or use the kill switch. Switch on Require approval if every production change should be reviewed, then choose Save Changes. See Put production behind review for how proposals work.Mark every real-user environment
The production switch is per environment. If you added an environment such as Canary that real users reach, mark it as a production environment too.Production after this step: the Production and Approval required badges are both shown. You should see. The Production row shows as a production environment, and a Developer account sees the toggles disabled.Give people the right roles
Review who has access in Members. Release managers run production changes: they toggle, roll out, approve releases and use the kill switch. Developers build and test everywhere but production. Keep the Admin role small, because only Admins delete things, manage members, roles and keys, and move flags between projects. Use a custom role when none of the built-in ones fit.
Use separate, limited keys
In API Keys, choose New API Key and create a key for production with Environment set to Production, so it fails against any other environment. Use Client keys in browsers and mobile apps, and Server keys in backends. Pick an Expires value and store keys in a secrets manager. Keep admin keys for CI jobs such as code scans and rollback.
Set safe defaults in code
Give every SDK a fallback for each flag so your app behaves sensibly before flags load or when the server cannot be reached. Check the offline behavior of your SDK on its reference page, and read Keep flags working offline.
Watch the right things
Open Metrics and Errors to see evaluations and failures, and set up Alerts for the problems you care about. If you use Prometheus, set
METRICS_TOKENand scrape every instance. Set up alerts walks through the rules.Practice the emergency stop
On a project's flag list, the Activate Kill Switch button opens a dialog with Disable & lock and Lift the lock, and a first step, Which environments?. Try it in Staging so you know what it does. While a lock is active the button reads Disable Kill Switch followed by a count. The kill switch and rollback are never held up by approval. Handle an incident covers using it under pressure.
The kill switch dialog in Disable & lock mode, scoped to Staging. Disabling asks you to type DISABLE. The reason holds up to 300 characters and is saved in each flag's history. Environments with nothing to change are greyed out and cannot be ticked. Lifting the lock needs no typed confirmation, and flags that were on before the lock turn back on by themselves.
Check the server
If you host FlagSwift yourself, follow the production checklist in Self-hosting: HTTPS, a strong
JWT_SECRET, health checks on/health/readyand/health/live,X-Forwarded-Forset by your proxy, and database backups. On MongoDB, runnpm run db:init-mongoso the indexes exist (see Switch from PostgreSQL to MongoDB). SetAPI_KEY_ENCRYPTION_KEYif you want Admins to be able to copy keys again later.
Not available yet
Do it with the API#
Activate or lift the kill switch
Needs the kill_switch.execute permission and your signed-in session cookie. mode is activate or restore. environments takes 1 to 50 keys. Add flagIds (up to 500) to limit the flags, or projectId to cover one project. reason is up to 300 characters. The response says Kill switch activated or Kill switch lifted.
curl -s -X POST "https://flags.example.com/api/flags/kill-switch" \
-b "auth_session=$SESSION" \
-H "Content-Type: application/json" \
-d '{
"mode": "activate",
"environments": ["staging"],
"projectId": "'"$PROJECT_ID"'",
"reason": "Rehearsal before launch"
}'What to check#
- A Developer account cannot toggle a flag in Production.
- The production key fails against Development, and the reverse. The error is
AUTH_ENVIRONMENT_MISMATCH. - Your app still starts, with fallback values, when the server is unreachable.
- Changes you make show up in the Audit Logs.
- An alert rule exists, and the Errors page is empty or explained.
Who can do what in production#
| Role | Description |
|---|---|
| System admin, Admin | Full access, including deleting. A system admin also holds the instance settings an Admin does not, and only another system admin can grant that role. |
| Release manager | Toggle, roll out, roll back, change targeting, approve releases and use the kill switch. |
| Product manager | Plans and proposes releases. Cannot switch anything on in production, and has no rollouts or rollbacks anywhere. |
| Developer | Read-only in production: no toggles, rollouts, rollbacks, targeting changes or kill switch. |
| Auditor, Viewer | Read-only everywhere. Auditors also read and export the audit log. |
Troubleshooting#
| Symptom | Description |
|---|---|
| A Developer can still change something in production | The environment is not marked as production. Edit it and switch on Production environment. |
| 403 with APPROVAL_REQUIRED | The environment requires approval, so direct changes are refused. Propose a release instead. Rollback and the kill switch are exempt. |
| The SDK gets 401 with AUTH_INVALID_API_KEY | The key is unknown, revoked or expired. Check its status on API Keys and rotate it if needed. |
| 429 Too many invalid API keys | A client is retrying a bad key. Fix the key and wait for the Retry-After period. |
| A flag looks off for everyone after launch | Check for an active kill switch on the flag's Overview tab: the switch is disabled while it is on. Lift the lock from the flag list. |
| Admin cannot copy a key later | Keys can only be copied again when API_KEY_ENCRYPTION_KEY was set before they were created. Rotate the key to get one that can be copied. |
Good habits#
- Rehearse the kill switch and a rollback once in Staging, so nobody meets them for the first time during an incident.
- Rotate production keys on a schedule and keep one named key per service.
- Review Members every quarter and remove people who moved on.
- Add the go-live checks to your release template so they run for every new product, not just the first.