Production Checklist
This checklist is ordered the way you should do it: make traffic arrive safely, make data recoverable, then wire up observability and operations. Every item maps to a real file in the repository.
At a glance
Section titled “At a glance”| # | Item | Done when |
|---|---|---|
| 1 | TLS | HTTPS everywhere, HTTP 301s to it |
| 2 | Secrets | ADMIN_PASSWORD and POSTGRES_PASSWORD set and strong |
| 3 | Cookies | MASTER_COOKIE_SECURE=true, only over HTTPS |
| 4 | Isolation | Postgres and NATS are not reachable from the internet |
| 5 | Backups | Nightly database dump plus uploads sync, and one restore drill |
| 6 | Observability | Prometheus scrapes 9091, logs shipped, alerts wired |
| 7 | Site URL | site_url set; sitemap, canonical, and OG use it |
| 8 | Accounts | Admin password changed, MFA enabled, test accounts removed |
| 9 | Moderation | moderation_mode, register_mode, and gate rules match policy |
| 10 | Upgrades | You know how to back up, roll back, and recompute XP |
TLS and reverse proxy
Section titled “TLS and reverse proxy”The backend and frontend listen only on internal ports; nginx is the only entry point. The
bundled deploy/nginx/nginx.conf already handles the easy-to-miss cases. When writing your own,
match these:
| Path | Must go to | Why |
|---|---|---|
/api/v1/ | Backend 8080 | Application API |
~ ^/api/v1/(notifications|realtime)/stream$ | Backend, proxy_buffering off, proxy_read_timeout 3600s | SSE; the default 60s read timeout kills idle streams |
/swagger/ | Backend | Runtime API docs |
= /mcp | Backend, proxy_read_timeout 120s | JSON-RPC endpoint, not under /api/v1 |
= /sitemap.xml (six paths) | Backend | Crawler files are generated by the backend only |
/ | Frontend 3000 | SSR pages and assets |
/health | nginx itself | Load balancer probe, no upstream |
Two more things to set explicitly:
# Uploads: the bundled config does not set this; nginx defaults to 1 MiB and# would reject requests before the backend sees them.client_max_body_size 10m; # >= upload_max_size (default 10485760)
# Propagate the correlation id so nginx access logs match backend traces.proxy_set_header X-Request-ID $request_id;Secrets and accounts
Section titled “Secrets and accounts”| Item | Action |
|---|---|
ADMIN_PASSWORD | Set before the first boot; a random value is printed once and easy to lose |
POSTGRES_PASSWORD / POSTGRES_USER | Do not keep the defaults |
MASTER_COOKIE_SECURE | Keep true; only plain-HTTP debugging sets false |
| MFA | Enable mfa_totp_enabled under /admin/settings?tab=user and enrol TOTP |
| Sessions | Password, role, and ban changes revoke sessions; use /admin/sessions when debugging |
| API keys | Off by default (api_key_enabled=false); grant the narrowest scope |
| Test accounts | Seed users are created in dev only |
Data and backups
Section titled “Data and backups”| Data | Where | Backup |
|---|---|---|
| Business data | Postgres (volume feedchamber_pg) | Nightly pg_dump, kept 7–30 days |
| Uploads | Local volume or S3 | Volume snapshots or object versioning |
| NATS JetStream | Volume feedchamber_nats | Rebuildable; losing it drops caches and unconsumed events |
docker compose -f deploy/docker-compose.yml exec -T postgres \ pg_dump -U "$POSTGRES_USER" "$POSTGRES_DB" | gzip > "/backup/fc-$(date +%F).sql.gz"The admin panel can also create backups (/admin/backups); retention follows
backup_retention_days (default 30). A backup is only real after a restore: import it into a
scratch database quarterly and confirm the site boots, sign-in works, and posts are there.
Observability
Section titled “Observability”| Item | Setting |
|---|---|
| Metrics | METRICS_ENABLED=true, METRICS_PORT=9091; never publish it |
| Prometheus | deploy/prometheus.yml works as-is; rules in deploy/prometheus/rules/ |
| Logs | LOG_FORMAT=json, LOG_OUTPUT=stderr, shipped by the container runtime |
| Correlation | trace_id, span_id, route, latency_ms; inbound traceparent is reused |
| Health | /api/v1/health (non-2xx when dependencies fail), nginx /health |
| Suggested alerts | 5xx rate, p95 latency, feedchamber_db_pool_wait_count_total, feedchamber_ratelimit_rejections_total, feedchamber_nats_connected |
The full metric catalogue is in Observability.
Site URL and SEO
Section titled “Site URL and SEO”- Set
https://your-domainin the admin site settings (orSITE_URLas a fallback) - Confirm
/sitemap.xmlemits absolute URLs, notlocalhost:8080 - Submit the sitemap to Google Search Console and Baidu, filling in the verification codes
- Keep
user_profile_indexable=falseunless profiles should be indexed - Set
og_image; otherwise the logo is used
Without site_url, the site works but the sitemap advertises unreachable URLs — traffic looks
fine and nothing gets indexed.
Moderation and registration
Section titled “Moderation and registration”| Setting | Recommendation |
|---|---|
register_mode | all or email for public sites; invite for closed groups; approve when every account needs review |
moderation_mode | async by default; manual for high risk; external when an external service is wired |
| Gate rules | /admin/gates: build rules for new-user links, TL0 posting, etc.; simulate before enabling |
| Rate limiting | rate_limit_enabled is off by default; enable the global per-IP ceiling for public sites |
| MCP | mcp_enabled is off by default; enable it only for trusted clients and turn on write tools individually |
Scaling and rollback
Section titled “Scaling and rollback”- The backend is stateless (sessions live in the database plus NATS KV): add replicas without sticky sessions
- Uploads must be on shared storage or S3, otherwise replicas serve different images
- Upgrade: backup, pull,
up -d --build;AutoMigrateonly adds, so rolling back the image is safe - Destructive changes and manual migrations: Upgrades and migrations
Ten-minute acceptance
Section titled “Ten-minute acceptance”curl -sI https://your-domain/ | head -1 # 200curl -s https://your-domain/api/v1/health # code: 0curl -s https://your-domain/sitemap.xml | head -c 200 # absolute URLscurl -sI https://your-domain/api/v1/notifications/stream # 200, stays openThen walk through: register → sign in → post → comment → notification arrives → approve in the admin panel → sign out. All six, and you are live.