Skip to content
6 min read

Deploying Forgejo

There are two ways to get a Forgejo forge online for a team: install and run it yourself, or have a provider run it. This guide sets out what each path involves, what has to be in place before the first push, and what you keep maintaining afterwards, so you can choose before you start.

Note

Fjord sells managed Forgejo hosting, so we have a stake in how this reads. Claims about installing Forgejo cite Forgejo’s own documentation, opened on 2026-11-01. Claims about Fjord cite Fjord’s own pages. Neither is an independent check, and where a page does not say something, this guide says so instead of filling the gap.

Path 1: run it yourself

Forgejo’s

installation page lists two official methods, from binary and with Docker. It also lists third-party packaging for various platforms, and says those resources are "not extensively tested to work on every release".

With Docker

The Docker installation page gives these points:

  • You pull the codeberg.org/forgejo/forgejo image, using a tag for the major version. The page says the major tag is set to the latest minor release of that version.
  • Its compose example mounts a ./forgejo directory at /data, sets a user and group id, and publishes port 3000 for the web interface and 222 for SSH.
  • Settings live in app.ini, which is created automatically if it is missing, and can also be set with FORGEJO__[SECTION]__[KEY] environment variables. The page notes that environment variables cannot remove an existing value.
  • If no database is configured it uses SQLite. The page gives compose examples for MySQL and PostgreSQL.
  • The data volume must be owned by the user and group id in the configuration, and the page warns that otherwise “the container may not start”.

From a binary

The binary installation page asks for git and git-lfs to be installed, a dedicated git system user for Forgejo to run as, and a systemd service, for which it provides a unit. Its configuration file is /etc/forgejo/app.ini, which must be writable by Forgejo during setup and which the page suggests making read-only afterwards. SQLite needs no setup. For more capacity it mentions MySQL, MariaDB or PostgreSQL, with setup covered elsewhere. It suggests creating the administrator account during setup, especially if self-registration is disabled.

What those pages do not give: the binary page names no Git version, and the installation page states no database, Git or hardware requirement.

Before the first push

Whichever method you pick, settle these before people depend on the forge. They are our checklist, not a claim about Forgejo’s pages:

  • A database you can back up and restore. SQLite is the default. If you choose another engine, pin its version, because a restore needs a compatible schema.
  • A hostname, TLS and an SSH port people can reach. Decide the public address early: remotes and webhooks will point at it.
  • An administrator account, and who else holds it. Decide registration policy before the forge is reachable from the internet.
  • A backup and a tested restore. See Forgejo backup and disaster recovery.
  • An owner for upgrades. See below.
  • CI, if you will use it. See Forgejo CI runners.

What you keep maintaining

Forgejo’s installation page says a stable release is published every three months, a long term support release every year, and patch releases more often with fixes for bugs and security vulnerabilities. It does not say who applies them on a self-hosted install.

The upgrade guide says to replace the binary or container image and that migrations are handled by the upgrade. It requires a full backup before a new stable release, and gives the support windows: three months of full support for a stable release, and one year and three months of critical fixes and security support for the long term support release. The Docker page adds that moving from one major version to the next “requires a manual operation and human verification”. Fjord’s own runbook, Forgejo patch upgrades you can prove, covers rolling a patch across forges and confirming it took effect. Its main point carries over to any forge: a version bump that is merged is not a forge that is upgraded.

Plan for the rest as well: backups and restore drills, CI runners (Forgejo’s runner administrator guide says the runner performs remote code execution, with security risk to the host and network it runs on), and keeping the host patched.

Path 2: have it run for you

On Fjord, per Provision an instance, you sign in to the dashboard, choose a tier and confirm. The instance moves through requested, provisioning and ready, and the page says provisioning is hands-off: you do not configure servers or DNS. When it is ready, the dashboard shows the instance’s URL and management controls. Getting started with Fjord goes from account to first push.

From Managed Forgejo hosting, Fjord handles provisioning, upgrades, runner registration, Pages hosting and backup operations, while you manage the forge and its repositories. The instance is standard Forgejo, so the web interface, API and git remotes are the ones in Forgejo’s documentation.

Dedicated Fjord instances are billed per instance by tier and have no free tier. Prices are on the rate card, which this guide does not repeat. If you only want to try Forgejo without provisioning an instance, Fjord Commons is a shared instance that is free with a Fjord Account.

Who does what

JobRunning it yourselfOn Fjord, per its documentation
Install and first configurationYou, from the binary or Docker steps aboveFjord provisions the instance
Database and storageYou choose, size and back upPart of what Fjord operates; the pages cited here do not detail it
UpgradesYou apply patch, stable and long term support releasesFjord handles upgrades
BackupsYou build, monitor and test themTeam and Pro: nightly, encrypted, off-site, 90-day rolling retention. Starter: none.
CI runnersYou register and secure themShared pool on every instance; dedicated Linux runners are a paid add-on on Team and Pro
Repositories, users, settingsYouYou

Choosing

Running it yourself keeps every decision with you, which is the reason to do it: you control the host, the network and the schedule, and you pay in time. It fits a team that already runs servers and has a named person who owns upgrades and restores. Managed hosting fits a team that wants the forge and not the operations around it, and accepts that its provider decides how those operations are done. That is our view, and the two paths use the same Forgejo, so moving between them is a migration, not a rewrite: see Migrating to Forgejo.

Part of the Forgejo hosting guides. Related: Forgejo hosting costs, Forgejo CI runners, 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.
Contributors
  • Stephen Way