Operations
This is the operational knowledge base behind Fjord. Running managed Forgejo well is our business, so the problems we solve become content here: runbooks, how-tos, and deep dives. Each page is seeded from something we hit and fixed in production, written so you can apply the same pattern even if you run your own forge.
These pages describe how Fjord operates the platform and the patterns we recommend. Where a value is specific to your deployment (budgets, retention, lock keys), treat what you read here as a starting point rather than a setting to copy verbatim.
Runbooks
| Runbook | What it covers |
|---|---|
| Runner autoscaling | How CI compute scales to demand, the cost controls that bound it, and why the autoscaler never holds a forge admin credential. |
| Leader-only background workers | Electing a single active worker with a Postgres advisory lease, and the transaction-pooler trap that silently gives you two leaders. |
| Supply-chain CI gate | Blocking on advisories, licenses, and sources with cargo-audit and cargo-deny, plus safe artifact and cache handling (tar traversal, digest verification). |
| Backups and restore drills | What a trustworthy nightly Forgejo backup checks before it ships, retention that really prunes, and three levels of restore proof with safe, honestly measured drills. |
| Forgejo patch upgrades you can prove | Rolling a patch release across forges, why a merged version bump upgrades nothing, and confirming from the running box that the change happened. |
| Sign-out that really ends the session | What a sign-out has to tear down (cookie, provider session, access token, refresh chain), the lifetimes that must not drift, and the cross-origin and secret-rotation traps. |
| Cold restore and disaster recovery | Rebuilding a forge when its machine is gone: the decision points first, the database-load traps, restoring files and secrets, and what to verify before you hand it back. |
| Cold restore: retries, fences and cutover | Making a cold restore safe to retry: the state a retry reads from, fencing inbound and outbound effects before the first start, and the boundary after which a reload is unsafe. |
| A shared runner pool for many forges | Running one pool of one-job machines for many tenants: sensing, reserve-before-spend, job targeting, the safety envelope, the signals that mean money is leaking, and how to tell it is really healthy. |
| Authentication that fails safely | Short-lived tokens with instant revocation, rate limits that survive several instances, security keys, and running single sign-on with PKCE and exact redirects. |
| Migrating repositories into a managed forge | Planning a team or bulk cutover, mirror-then-switch, and verifying the move before you point tooling at the new home. |
How we capture a new runbook
The point of this section is not the pages above; it is the habit. Every operational problem we solve is a candidate doc. The process is deliberately small so it actually happens:
- Trigger on the fix. When an incident, a support thread, or a piece of build-out resolves an operational question, that is the trigger to write.
- Capture while it is fresh. Draft within a few days, before the context evaporates and the “obvious” details stop being obvious.
- Use the same shape. State the problem, explain how the thing works, name the failure mode plainly, give the controls or the fix, then say how to verify. The failure mode is the most valuable part; do not skip it.
- Cross-link. Wire the new page into this index and into the related runbooks so a reader lands in the right neighbourhood.
- Strip secrets. These docs are public. Teach the pattern, not the credentials, hostnames, or exact budget numbers.
A good test for a runbook: would it have saved you the hour you just spent? If yes, it is worth the twenty minutes to write down.
- Stephen Way