Skip to content
Français
Sync not enabled: your progress stays in this browser My learning
Select theme
Français

What is a Git forge, and which one should you run?

20 min read
Improve this page

A Git forge is a Git server with a web interface, user accounts, code reviews and, most of the time, a CI and a package registry. Self-hosting one means becoming its administrator: you own the database, the storage, the proxy, the backups and the version upgrades. This lesson is for anyone who has to choose and run a forge for a team. It gives the typical architecture, six criteria to decide, and the course's verdict: Forgejo 15 LTS is the reference forge, GitLab is the choice when you need a complete platform, and Gitea is an alternative kept as a reference.

What you will learn

  • Tell apart a plain Git server from a forge, and weigh what self-hosting demands of you.
  • Name the components of a forge (application, SSH access, database, storage, proxy, runner) and what to back up or monitor for each.
  • Apply six administrator criteria: license and governance, support cycle, resources, administration features, built-in CI, migration.
  • Compare Forgejo, Gitea and GitLab with those criteria, then justify a choice.
  • Place high availability and Kubernetes as the limits of the scope.

What are the prerequisites?

You need to know what Git is: a repository, a commit, a push. Nothing else is required, and the lesson contains no command to replay. If you have never hosted a repository yourself, the guide Host a Git server (in French) shows the smallest possible server, without an interface.

A few words come up everywhere. A reverse proxy is the server placed in front of the application to receive requests on its behalf and to carry HTTPS encryption (TLS); see the guide Reverse proxy. A runner is the program that executes CI (continuous integration) jobs, that is, automatic tests and builds triggered by a commit. An LTS (Long Term Support) version receives fixes for longer than ordinary versions.

What sets a forge apart from a plain Git server?

A Git server stores and transmits repositories; a forge adds everything a team needs around them. The server in the hosting guide accepts git push and git clone over SSH or HTTP, nothing more. A forge adds accounts and organizations, per-repository permissions, pull requests (the merge request a colleague reviews), issues, a wiki, webhooks (HTTP calls sent to another tool when an event happens), and often a package registry and a CI.

This comfort has an operating cost. A bare repository (the repository reduced to its history, with no working files) in a directory is backed up with an rsync; a forge spreads its state across a database, repository files and settings, which must be backed up together. It also exposes a web application to your users, so an attack surface to patch. Self-hosting is justified by control over the data, an isolated network or cost control; the guide Git platforms (in French) compares the offers from the user's point of view, and this lesson takes the administrator's.

What is a self-hosted forge made of?

A forge comes down to six components: the application, SSH access, the database, the storage, the reverse proxy and the runner. The diagram shows how a client goes through them. First follow the thick lines: the browser, the API or git over HTTPS reach the reverse proxy, which terminates TLS and forwards plain HTTP to the application. Then look at the SSH arrow: it bypasses the proxy, because an HTTP proxy does not speak SSH. Finally, the runner, dotted, lives on another machine and fetches its jobs itself.

Architecture of a self-hosted forge: the browser, API and git over HTTPS reach the TLS reverse proxy and then the application; git over SSH reaches the application without going through the proxy; the application relies on a database and on storage for repositories, LFS and packages; a CI runner on a separate machine fetches jobs from the forge.Forge instanceHTTPSHTTPSSH, bypasses the HTTP proxypolls for jobsBrowser,API, git over HTTPSgit over SSHCI runner(separate machine)Reverse proxy(TLS)Applicationweb, API, GitDatabaseStoragerepositories, LFS, packages
Source · SVG
Esc to close, + and − to zoom, scroll to move around. 100 %

The table gives, for each component, its role and what it asks of you. Read the last column as the list of your future administrator tasks, component by component.

ComponentRoleWhat the administrator does with it
Applicationweb interface, API, Git logic (permissions, reviews, webhooks)upgrade it, configure it, read its logs
SSH accessgit clone and git push with a keychoose between the system sshd and the forge's built-in SSH server
Databaseaccounts, issues, repository metadatachoose it from the start, back it up with the rest
StorageGit repositories, LFS files (large files kept out of the Git history), packages, attachmentssize it and back it up
Reverse proxyTLS, HTTP to HTTPS redirectrenew the certificate, never expose the application directly
Runnerexecutes CI jobsisolate it from the forge, register it, secure it

The database is the choice with the heaviest consequences. According to the Forgejo documentation, four engines are supported: MariaDB 10.6 or later, MySQL 8.4 or later, PostgreSQL 14 or later and SQLite (database preparation). SQLite is fine for a trial; a team takes PostgreSQL, which you back up and monitor like any other database. GitLab, for its part, only supports PostgreSQL (GitLab requirements). Pick the engine at installation time: the Gitea documentation warns that converting a database from one type to another is a poorly tested process (Gitea database preparation).

SSH deserves a clarification. By default, Forgejo lets the system sshd authenticate keys (the START_SSH_SERVER setting is false); it can also embed its own SSH server (configuration cheat sheet). The lesson Install Forgejo LTS (in French) makes a third choice, publishing the container's SSH on port 2222, and shows what that changes for the clone address.

The runner is the component to handle with the most care. The Forgejo documentation states that the instance does not run workflows itself: it hands them to runners, and the runner "performs remote code execution", that is, it runs code sent by your users (Forgejo Actions). A forge whose runner runs on the same machine as the application therefore puts its repositories within reach of a malicious job. That is why the diagram places the runner separately.

The forge's resources mostly live in the storage. GitLab warns that the space reserved for its repositories must be at least the sum of all repositories and advises against network file systems such as NFS for its Gitaly layer, which serves the repositories (GitLab requirements). Keep the general rule: a slow or shared disk is paid for in clone time.

Which criteria should you use to choose a forge to run?

Six criteria separate the forges from an administrator's point of view: license and governance, support cycle, resources, administration features, built-in CI and migration. A feature list tells you what users will see; these six criteria tell you what you will live with in three years. Each one is covered below with the source that establishes it.

Do license and governance protect your choice?

The license says what you may do with the code; governance says who decides the project's future. Forgejo is under GPL v3 or later since version 9.0 (MIT up to and including 8.0), according to its FAQ; it sits under the non-profit association Codeberg e.V., which keeps its domains, while its governance remains independent, defined by its contributors. Gitea is under the MIT license according to the project site, which states that commercial direction and support are provided by CommitGo Inc., the publisher of the paid offers Gitea Enterprise and Gitea Cloud. GitLab is published by a company: in its repository, the code outside the ee/, jh/ and doc/ directories is under MIT Expat, the documentation under CC BY-SA 4.0 and ee/ under a separate license (license).

Forgejo was born in late 2022 from a split in the Gitea community, when Gitea's domains and trademark passed to a commercial company. It became a fork (a copy of the project that now evolves separately) fully independent, a hard fork, in early 2024 (comparison with Gitea). That page is written by the Forgejo project: read it as a sales pitch, not as a neutral assessment. For an administrator, the useful question is simple: what happens if the publisher changes its policy? An association and a copyleft license (which requires modified versions to be redistributed under the same license) reduce that risk; they do not remove it.

What support cycle does each project promise?

The support cycle decides how often you will have to upgrade. Forgejo publishes a stable version every three months and an LTS version every year (installation). The release schedule lists 15.0 (LTS) supported until July 15, 2027, 17.0 stable until January 28, 2027 and 14.0 at end of life since April 30, 2026. An LTS stays supported for more than a year (fifteen months for 15.0), and the next LTS, 19.0, is planned for April 15, 2027: that leaves three months to upgrade. The stable branch, for its part, demands one upgrade per quarter.

GitLab follows another rhythm: a minor version every month, a major version every year. Its maintenance policy fixes bugs on the current version only (19.6 on November 30, 2026) and security flaws on the two previous versions. Staying on the same version for a long time is therefore not planned for. For Gitea, the latest version is 28.4.0, published on November 15, 2026. The documentation consulted publishes no support policy for the community edition, and no LTS, as of October 16, 2026. The only trace is the release cadence page of the Enterprise offer: it says that no end-of-life matrix per version is published and that a major version stays "current" until the next one is released. For how long fixes last on a previous version, the documentation points to the support contract: do not assume maintenance beyond the current version.

What resources should you plan for?

GitLab needs a much bigger machine than Forgejo or Gitea. For a single-node installation, its documentation gives 8 vCPU and 16 GB of RAM as a baseline, and accepts 8 GB at the minimum in a constrained environment (GitLab requirements). The Gitea documentation considers "2 CPU cores and 1GB RAM" typically enough for small teams (Gitea documentation).

Forgejo does not publish a numeric minimum configuration in its installation documentation (none found as of October 16, 2026). Since it shares its origin with Gitea, you can expect a similar order of magnitude, but that is an inference: size it by measuring on your real load. With GitLab, on the contrary, sizing is something to think through before buying the server.

What administration features are there?

A forge is run through an administration interface and a command line. GitLab has a very rich administration area, the gitlab-ctl tools and the Rails console, and an official administration training of several modules. Forgejo offers administration documentation that covers authentication (through an LDAP directory, PAM or OIDC, ways of delegating the login), backup, quotas, moderation and a forgejo command for administration tasks (administration documentation). The Gitea documentation is of the same nature.

The concrete criterion is what you want to automate: create accounts, lock a user, back up, check the state of the instance. A scriptable command beats a click, and all three projects offer one on the command line. The course teaches these tasks on Forgejo; GitLab has its optional module.

Does the built-in CI replace a separate tool?

All three forges ship a CI, but their workflows are not interchangeable. Forgejo Actions is "designed to be familiar to users of GitHub Actions, but it is not designed to be compatible": the syntax looks like GitHub's, with no promise of compatibility (Forgejo Actions overview). A workflow copied from GitHub may therefore need adjustments, to be tested before you promise a migration. Gitea, for its part, announces a CI "compatible with GitHub Actions"; that is its claim, to be checked on your own workflows. GitLab CI uses its own format, .gitlab-ci.yml.

In all three cases, execution goes to a separate runner, with the same security risks. A runner provisioning tool exists for Gitea: GARM (in French) does not manage Forgejo, according to the project README, and so stays out of this course. If you already have an external CI that suits you, a forge without a built-in CI is not a flaw.

How do you migrate to a forge, and leave one?

Git repositories move without trouble; the rest depends on the import tools. A repository is copied with git clone --mirror then git push --mirror. Issues, pull requests, the wiki and permissions only follow if the destination forge knows how to import them from the source forge. Before committing, try the import of a test organization, and count what is missing.

Forgejo documents a path from Gitea in its upgrade guide (installation). Because Gitea 28 has diverged from Forgejo, the migration is limited: the migration guide accepts Gitea versions up to and including 1.22.x, towards Forgejo 10.0.x, then from 10.0.x to a more recent version. A Gitea instance newer than 1.22 is therefore outside the documented path. The course devotes a lesson to migrating an organization; the guide Git platforms (in French) covers migration from the user's point of view.

Forgejo, Gitea or GitLab: which one to choose?

Forgejo suits a team that wants a lightweight forge under community governance; GitLab, a team that wants a complete platform and can afford to run it; Gitea, a team that accepts a commercial publisher and an MIT license. The table summarizes the six criteria (license and governance take two rows) and adds the database. Read it column by column: each cell points back to the source cited above, and a cell that says "no published minimum" or "no published policy" flags a fact that the documentation consulted does not establish.

CriterionForgejoGiteaGitLab (CE)
LicenseGPL v3+ since 9.0MITMIT Expat outside ee/, jh/, doc/
Governanceindependent, domains held by Codeberg e.V.commercial direction, CommitGo Inc.GitLab company
Supportquarterly stable, yearly LTS (15 until 2027-07-15)no LTS or published policy found (community edition)monthly, security fixes on 3 versions
Resourcesno published minimum, to be measured2 cores and 1 GB for a small team8 vCPU and 16 GB (8 GB minimum, constrained)
DatabaseSQLite, MariaDB, MySQL, PostgreSQLPostgreSQL, MySQL, MariaDB, SQLite, MSSQLPostgreSQL only
Built-in CIForgejo Actions, close to GitHub Actions with no promised compatibilityGitea Actions, announced as compatibleGitLab CI, own format
Migrationfrom Gitea 1.22.x at mostnot assessed herenot assessed here

The three columns do not weigh the same in the course. Forgejo 15 LTS is the reference forge: its LTS holds until summer 2027, which leaves time to practice without chasing versions. GitLab has an optional module, aligned with the official GitLab administration curriculum. Gitea keeps its reference pages, including the Gitea presentation (in French), but is not taught: its version 28 diverges from Forgejo, and a command or a path that is valid for one may no longer be for the other.

For GitLab, the GitLab presentation (in French) covers the platform. My opinion, for a team of a few dozen people with no need for project portfolio management: I take Forgejo on its LTS. The reason lies in operations, not in features: a predictable upgrade rhythm and, very probably, a modest machine (to be measured).

What about high availability, and Kubernetes?

High availability (HA) is about surviving the failure of one machine by running several instances; it stays out of the scope of this course. Before needing it, ask the administrator's question: how long can the team stay without a forge? For many teams, a single instance, a tested backup and a fast restore meet the need; the lesson Back up and restore Forgejo (in French) covers that topic.

The GitLab documentation gives the measure of the effort: it writes that HA is complex and that the required environments can be large (reference architectures). It provides a "Cloud Native Hybrid" architecture where the stateless components run in Kubernetes with a Helm chart, while PostgreSQL and Redis stay on machines or managed services, because running those stateful components in Kubernetes is not supported. For a forge spread across several regions, GitLab offers Geo.

Forgejo also deploys in containers, but the course covers neither its HA nor its deployment on Kubernetes. If that need arises, start from the notions of this lesson: each component of the diagram then becomes a piece to replicate, and it is generally the database and the storage, more than the application, that complicate the operation. The place of a forge in a wider architecture is covered in Forges, artifact repositories and registries.

Which selection mistakes should you avoid?

Five mistakes keep coming back when you choose a forge from its feature list. Almost all of them come from an underestimated operating cost.

  • Sizing from an old page. GitLab's requirements change from one version to the next: read the official page for the version you install, not an old blog post.
  • Installing the stable branch without an upgrade plan. A stable Forgejo version goes out of support in about a quarter; without an upgrade calendar, you end up unsupported.
  • Believing in GitHub Actions compatibility. Forgejo does not promise it: test your workflows before migrating a team.
  • Leaving the runner on the forge's machine. A malicious job would then reach the repositories and the database.
  • Aiming for high availability too early. A backup restored successfully is worth more than a cluster nobody knows how to run.

Key takeaways

  • A forge is a Git server with accounts, code reviews, and often a CI and a registry: self-hosting it makes you responsible for the database, the storage, the proxy, the backups and the version upgrades.
  • Its components are the application, SSH access, the database, the storage, the reverse proxy and the runner; SSH bypasses the HTTP proxy and the runner is isolated from the forge.
  • Six administrator criteria: license and governance, support cycle, resources, administration features, built-in CI, migration.
  • Forgejo 15 LTS is supported until July 15, 2027; stable 17 until January 28, 2027; GitLab ships one version a month and only fixes security on three versions (the current one and the two previous).
  • GitLab asks for 8 vCPU and 16 GB of RAM on one node (8 GB at the minimum in a constrained environment); Gitea announces 2 cores and 1 GB for a small team, and Forgejo publishes no minimum: to be measured.
  • Forgejo Actions is not compatible with GitHub Actions: it looks like it, without promising it.
  • High availability and Kubernetes are out of scope: you start with a single instance, a restored backup and a controlled upgrade.