Forgejo CI runners
Forgejo does not run your CI jobs itself. A separate program, the runner, does. That split is why CI is often the part of a forge that costs the most to operate and the part with the sharpest security edge. This guide covers how a job reaches a runner, how to think about sizing, what Forgejo’s documentation says about running them safely, how to keep a fleet healthy, and what Fjord provides.
Fjord sells managed Forgejo hosting, so we have a stake in how this reads. Claims about Forgejo cite Forgejo’s documentation, opened on 2026-11-01. Claims about Fjord cite Fjord’s own pages. Where a page does not say something, this guide says so instead of filling the gap.
How a job reaches a runner
From Forgejo’s documentation:
- Workflows are
.yamlfiles stored in the.forgejo/workflowsdirectory of a repository, and a job is one unit of work that is handed out to a runner. (Basic concepts) - The
runs-onkey names the label of the runner a job runs on, so a job with thedockerlabel only runs on runners with that label. - Forgejo “does not run the jobs”, it “relies on the Forgejo Runner to do so”, which the administrator guide describes as a program that fetches workflows to run from a Forgejo instance and executes them. Choosing labels is the minimum configuration a runner needs.
- One runner can connect to several instances, users, organizations or repositories, and several runner installations can connect to one instance to distribute jobs.
What those pages do not say: whether a runner polls or is pushed work, how many jobs one runner runs at once, and how a job’s container is chosen. Check the version you run, and the runner’s own configuration page, before you size anything.
Workflows written for GitHub Actions need porting, not just copying: see Migrating to Forgejo.
Sizing
Forgejo’s pages give no sizing figures, so size from your own jobs. These questions are ours, not Forgejo’s:
- Peak concurrency. How many jobs run at once when the team is busy, not on average. Queueing at peak is what developers notice.
- Job duration and weight. Test suites and image builds differ. Building container images in workflows needs additional configuration, per the administrator guide.
- Isolation per job. Whether each job gets a clean environment or a runner that is reused, which sets how much a bad job can affect the next one. See below.
- Cost model. Self-run runners are machines you pay for whether or not they are busy. See Forgejo hosting costs.
Running them safely
This is the part to read twice. Forgejo’s administrator guide says “Forgejo Runner performs remote code execution” and that this “poses significant security threats for the host and network that it operates upon.” Forgejo’s
Actions security page and its deployment security page add:- Host runners are not isolation. “Never trust a host runner if it is shared with other users”, and escaping a host runner is described as trivial. Container runners are “generally safe, but they may be compromised if misconfigured.”
- Register runners at the tightest scope. The deployment page says the tightest registration reduces the scope of risk, and that a repository-level runner only runs actions from its own repository.
- Treat pull requests as untrusted code. Any user can open a pull request that
includes code for Actions to execute, so pull request workflows get no write token,
and workflows triggered by forks have no access to the repository’s secrets. The
deployment page warns that
pull_request_targetworkflows do have access to secrets and need careful review, and that a first pull request from an outside contributor can require approval before workflows run. - Prefer ephemeral runners where you create them on demand. The deployment page
says Forgejo “will assign a runner at most one job before removing it” in ephemeral
mode, and advises it especially with
hostexecution, because the runner token is then accessible to the running job. - Mind the network. A malicious workflow can reach local network resources, and host network mode removes the restrictions between containers and the host.
- Shared runners can be starved. Long-running jobs can affect the availability of a shared runner for other users.
- Keep secrets out of output and store tokens as secrets, not inline.
Keeping a fleet healthy
These patterns come from Fjord’s operations runbooks, which describe how Fjord runs its own pools. They are written for anyone running runners, and each says its numbers are deployment specific.
- Scale on queue pressure, and rest at zero. The runbook on runner autoscaling reacts to pending jobs against available runners, and treats idle runners as a defect.
- One job per machine. Ephemeral, single-use runners that boot, register, run one job and are destroyed remove stale state and bound what a bad job can touch.
- Bound the spend before you create a machine. Budget ceilings, a circuit breaker, a global cap, a create rate limit, a per-forge limit, a job time limit and a startup timeout, evaluated in order and failing closed.
- Short-lived, single-use registration tokens, and no standing admin credential in the scaler. Privileged operations sit behind a separate control plane.
- A label is a hint, not a boundary. The shared pool runbook says a runner label is a routing hint that a tenant may influence or guess, so it layers a generated label, a single-use token, an ephemeral runner and a check on the claimed attempt, and treats a wrong claim as a hard failure. It also says the forge, not the pool, decides which queued job a registered runner receives, and that pinning does not stop another job from the same forge asking for the same labels from being matched first.
- Watch for the silent failures. A machine that boots and never registers holds a slot, a misread queue can ask for far too many machines, and a lost create event leaves an orphan nobody tracks. Tag machines with the intent that created them.
- Signals: queue pressure that spikes and recovers, a live runner count that tracks demand and returns to zero, and a closed circuit breaker.
The shared runner pool runbook says what it does not prove: the tenant isolation of the machines themselves, including what a fork’s pull request may touch and what a machine can reach on the network, has its own review and is not repeated there.
What Fjord provides
From Fjord’s Runners page, as of 2026-11-01:
- Every plan includes the shared runner pool, so managed CI works on Starter, Team and Pro. Nothing dedicated is included at any tier.
- A dedicated Linux runner is a paid add-on on Team (up to one) and Pro (up to three), registered to your instance rather than shared, and not billed by the CI minute. The number is a cap, not an allowance. The rate card carries the price.
- Runners come online with your instance and are ephemeral, each job gets a clean environment, and nothing is installed on your side. The dashboard shows how many runners are registered and how many are busy.
- To use them, target the Linux runners with
runs-on: ubuntu-latestand reference Fjord Actions by full URL so workflows do not depend ongithub.com. See the Actions overview.
What those pages do not state, so do not assume it: job time limits, per-instance concurrency on the shared pool, or a guarantee of tenant isolation. The shared pool runbook describes a per-forge concurrency limit and allowance and policy statuses, and says its numbers are deployment specific. Ask for the figures that matter to you.
Choosing
Running your own runners gives you control of the hardware, the images and the network, and puts the safety work above on you. Using a provider’s runners moves that work to the provider and accepts how they do it. That is a trade, and the questions to put to any provider are the ones above: where jobs run, whether runners are shared and what isolates them, how a job’s environment is cleaned, what limits apply, and what it costs when you need more.
Part of the Forgejo hosting guides. Related: Deploying Forgejo, Migrating to Forgejo, Forgejo hosting costs, and Forgejo backup and disaster recovery. For the wider picture of what a provider takes over, see
Managed Forgejo hosting: what you hand over and what to ask.- Stephen Way