Production checklist
Go through this list before a self-hosted AgentFox sees real traffic. Each row is one setting or one habit.
| Check | What to set |
|---|---|
| Production mode | AGENTFOX_ENVIRONMENT=production. The API then needs a token and refuses the development identity header. |
| Secrets | AGENTFOX_SERVICE_AUTH_SECRET (same value on gateway and dashboard) and AGENTFOX_AUDIT_SIGNING_KEY, both random. The gateway will not start on a published default. |
| Encryption key | AGENTFOX_TOKEN_ENCRYPTION_KEY, a Fernet key. Stored secrets (GitHub connections, platform connections) are encrypted with it; without it those features are off. |
| Database | AGENTFOX_DATABASE_URL pointing at Postgres. SQLite is refused for a server with more than one worker. |
| Judge outage | Decide whether a request is denied when an AI judge does not answer. Per workspace: Settings, Detection, AI judges & egress, Deny the request. For every workspace: AGENTFOX_JUDGMENT_FAIL_CLOSED=true. It is off by default. |
| Alerts | Settings, Alerts, Slack, or AGENTFOX_WEBHOOK_URL for new issues. Both need AGENTFOX_ALLOW_EGRESS=true. |
| Scheduled jobs | Run agentfox admin jobs run-due every 10 to 30 minutes from cron or a systemd timer. Monitors, drift and compliance checks only run when it does. |
| Backups | Back up Postgres with your provider or pg_dump, and always before an upgrade. Keep the signing and encryption keys somewhere else: a backup without the encryption key cannot decrypt its stored secrets. |
| Sign-in | Operators sign in with an API token or GitHub. There is no SSO, OIDC or SCIM yet, and one organisation per deployment. |
| Guardrails | New guardrails watch first. Switch them to Block once you have read what they would have stopped. |
Rotate a key
Put the new value in the variable and the old one in the same name with _PREVIOUS (for example AGENTFOX_TOKEN_ENCRYPTION_KEY_PREVIOUS), restart, then re-encrypt. Remove the _PREVIOUS variables once status says complete. The full steps are in the key rotation guide.
agentfox admin keys rotate
agentfox admin keys statusCheck it
Run these with the deployment's environment:
agentfox doctor
agentfox admin auth status
agentfox report verifydoctor should say API tokens are required. report verify checks the audit trail has not been changed.