Two parallel rods merging into one, with a cyan ring where they join.

Self-hosted Git server: which GitHub alternative to pick

Five forges let you host your repositories away from GitHub, and four of them come from the same line of forks. Gitea installs as a single binary and ships CI in the GitHub Actions format plus a package registry; a company, Gitea Ltd, shares control of the project and keeps SAML for a paid edition. Gogs, the forge Gitea was forked from, sticks to repositories, issues and pull requests, with no CI and no package registry, and most of its development comes from one maintainer. Forgejo, a fork of Gitea under a non-profit's umbrella, also installs as a single binary, but under the GPL and with a major release every quarter. Codeberg is nothing to install: that Berlin non-profit runs Forgejo free of charge, but only for projects under a free licence. OneDev, written in Java, sits outside that line: it puts repositories, kanban issues, CI and packages in a single server, and the company behind it keeps high availability, time tracking and Renovate for a paid edition.

Gogs, Gitea, Forgejo, OneDev: where each forge comes from and who runs it

Gogs is the original forge, MIT-licensed since 2014. Its development leans heavily on one person: over the past twelve months, the unknwon account authored 157 of the 225 commits on the main branch.

Gitea started as a fork of Gogs and kept the MIT licence, and its docs say almost all of the code has changed since. On 24 October 2022, a project blog post announced Gitea Limited, to which Lunny Xiao, one of the owners, had transferred the domains and the trademark. Since early 2023 a six-seat Technical Oversight Committee has run the project: three members elected for a year from maintainers with no tie to the company, three appointed by the company, and the elected seats count "slightly more" in a vote. Development happens on GitHub, in the go-gitea/gitea repository.

Forgejo came out of that transfer, in October 2022. Its website says the domains and trademark went to a for-profit company without the community's knowledge or approval, and the fork became a hard fork in early 2024. Codeberg e.V., the non-profit behind Codeberg, has custody of Forgejo's domains, while Forgejo keeps a governance of its own. Forgejo's FAQ says the project runs on volunteer contributions, grants, donations and staff lent by their employers. Forgejo changed licence along the way, too: MIT up to v8.0, GPL v3 or later from v9.0.

OneDev doesn't come from any of these forges. Its licence file names OneDev Pty, the company that sells its Enterprise edition, as copyright holder, and development rests on one person: over the past twelve months, the robinshine account, which belongs to Robin Shen, authored 1,044 of the 1,133 commits on the main branch. The project is developed on its own instance, code.onedev.io, and its GitHub repository takes no issues.

CI, package registries and code review in each forge

Gitea Actions, on by default since Gitea 1.21, reads GitHub Actions workflow syntax. Jobs run on Gitea Runner, a separate binary you install and register with the instance, and the docs recommend Docker to isolate them. Gogs has no CI; its README points to a Jenkins plugin. Forgejo on your own server comes with Forgejo Actions, on by default, whose jobs run on Forgejo Runner, a separate program you install and register; an action referenced without a full URL comes from data.forgejo.org, which only hosts free-licensed actions, rather than from GitHub as on Gitea. Codeberg gives you two routes. Woodpecker CI is granted on request after a volunteer reviews it, builds for linux/amd64 only, and its docs warn that it "might break at any time and for an undefined period". Forgejo Actions runs on your own runners, or on runners Codeberg hosts in a limited open alpha. OneDev has its own CI: jobs live in a .onedev-buildspec.yml file that a GUI lets you edit without writing YAML. They run in containers on the server itself, with no agent or runner to install, or on agents, in Kubernetes or in isolated virtual machines.

Package registries split the same way. Gitea handles 23 formats, including npm, PyPI, Maven, Cargo, Go, Helm, Debian, RPM and container images. Gogs has none. Forgejo's docs list 23 as well. OneDev handles eight: container images, npm, Maven, NuGet, PyPI, RubyGems, Cargo and Helm. Codeberg has one, counted against a quota: past 1.5 GiB of packages, LFS files and attachments, you have to ask for more.

Code review is where Gogs falls behind. The comparison table in Gitea's docs credits it with inline comments and approvals on pull requests. Forgejo, and therefore Codeberg, puts a comment button next to each changed line, has accepted comments spanning several lines since v16, offers a Review button to approve or request changes, and can request reviewers from a CODEOWNERS file. OneDev lets you start a discussion on any selection of code or diff, even outside a pull request, accepts suggested changes you apply directly, sets review rules by author, branch and changed files, and suggests reviewers from the Git history. On Gogs, the request for line comments on pull requests has been open since September 2015.

Sign-in differs as well. Gitea can act as an OAuth 2.0 provider for other apps, pulls accounts from LDAP or Active Directory and supports OpenID Connect, but its free version has no SAML. Gogs accepts LDAP, SMTP, PAM, a reverse-proxy header and GitHub accounts; neither its README nor its authentication page mentions OpenID Connect. Forgejo reads accounts from LDAP or FreeIPA, accepts OpenID Connect sources and can map their groups to teams, and acts as an OAuth2 provider; PAM takes a custom build, since the official binaries leave it out. OneDev reads accounts and groups from LDAP or Active Directory, accepts sign-in through OpenID as well as GitHub, Discord or Twitch, can enforce two-factor authentication for groups or the whole instance, and acts as an OpenID Connect provider itself. The comparison of self-hosted SSO tools covers the OpenID Connect providers Gitea, Forgejo and OneDev can hand sign-in over to.

What each forge needs to run

Read from the repositories and documentation on 7 October 2026, on 16 November 2026 for Forgejo and for the version Codeberg runs, and on 26 November 2026 for OneDev.

ForgeLicenceWhat you runCIPackagesLatest release
GiteaMIT; paid Enterprise edition on the sidea Go binary or Docker image, Git 2.25 or later; SQLite, PostgreSQL, MySQL, MariaDB or SQL Server; 2 cores and 1 GB for a small teamGitea Actions, separate runner23 formats28.1.0, 6 Oct 2026
GogsMITa Go binary, Git 1.8.3 or later; SQLite, MySQL, MariaDB or PostgreSQL; 2 cores and 512 MB for a teamnone, Jenkins pluginnone0.14.3, 7 Jun 2026
ForgejoGPL-3.0-or-later since v9.0, MIT beforea Go binary for Linux (amd64, arm64, arm-6) or a container image, Git 2.34.1 or later; SQLite, PostgreSQL 14, MySQL 8.4 or MariaDB 10.6 at minimum; a Raspberry Pi or a small cloud instance, per the READMEForgejo Actions, separate runner23 formats17.0.1, 26 Oct 2026; LTS 15.0.11 the same day
CodebergGPL-3.0-or-later (Forgejo)nothing: hosted service, free accountWoodpecker on request, Forgejo Actions1.5 GiB with LFS and attachments, more on requestForgejo v17.0 (codeberg-17 branch), v17.0.1 included, latest commit 28 Oct 2026
OneDevMIT; paid Enterprise edition on the sideJava 17 and Git 2.11.1 or later, or a Docker image; embedded HSQL for demos, MySQL, PostgreSQL or MariaDB in production; 2 cores and 2 GBbuilt in, jobs on the server, on agents or in Kubernetes8 formats17.2.4, 24 Nov 2026

SQLite is built into Gitea, but the docs warn that it does not scale: an instance expected to grow needs PostgreSQL 12, MySQL 8.0, MariaDB 10.4 or SQL Server 2012 SP4 at minimum. Gogs makes do with less: its README says a Raspberry Pi or a $5 DigitalOcean droplet is enough to get started. Gogs upgrades go one minor version at a time, so a 0.12 instance has to pass through 0.13 before 0.14. Its main branch, which is heading for 0.15, removes the /install web installer and makes a working custom/conf/app.ini mandatory. Forgejo also ships SQLite, which its docs consider enough for at least ten users; otherwise it takes PostgreSQL 14, MySQL 8.4 or MariaDB 10.6 at minimum, and it dropped Windows support in 2024. OneDev starts on an embedded HSQL database that its docs reserve for demos; for production they recommend MySQL 5.0, PostgreSQL 9.0 or MariaDB 5.0 at minimum. It runs on Linux and Windows, on amd64 and arm64 alike, and on Apple Silicon Macs; 16.9.0 dropped Intel Macs and FreeBSD.

On releases, Gitea shipped eighteen stable versions in twelve months, up to 28.1.0 on 6 October 2026. Its 28.0.0 would have been 1.28.0: the project dropped the "1." prefix, and that release turns off open registration by default and deletes finished Actions runs after 400 days. Gogs went from 0.13.0 in February 2023 to 0.13.1 almost two years later, in December 2024, then put out five releases between January and June 2026; the latest, 0.14.3, fixes 22 vulnerabilities, one of them remote command execution through a crafted branch name. Forgejo puts out a major release every quarter (v17.0 on 15 October 2026) and supports each one for three months, plus two weeks after the next one ships; the first-quarter release becomes a fifteen-month LTS, as v15.0 did, covered until 15 July 2027. v17.0.1 and v15.0.11 shipped on the same day, 26 October 2026. Codeberg doesn't deploy those releases as they are: production runs on its own Forgejo branch, with commits specific to Codeberg. OneDev ships far more often: 118 releases in twelve months, four of them major, with 14.0 on 4 January 2026, 15.0 on 25 April, 16.0 on 26 June and 17.0 on 28 October; the latest, 17.2.4, came out on 24 November 2026.

Running your own forge or handing your repositories to Codeberg

Codeberg takes the operations work off your hands: the association runs Forgejo on its own hardware in a rented facility in Berlin and applies upgrades itself. In return it sets terms that a forge on your own server never would. Every public repository needs a free licence, approved by the FSF or the OSI, or a Creative Commons licence without the NC and ND variants. Private space is a stopgap: up to 100 MB for free software contributors, and no personal cloud or media storage. The terms also ban projects that mostly consist of code written by generative AI tools, along with cryptocurrency projects. The FAQ puts it plainly: if you don't contribute to any free software project, "Codeberg is unfortunately not the right place for you."

Money doesn't buy an exception to those rules. Going past 750 MiB of Git storage takes a request, and the FAQ states: "We do not accept any payments for exceptions to our rules." The terms make no promise about the availability of hosted content and leave backups to the user.

A forge on your own server follows whatever rules you set: private code, a proprietary licence or AI-written code all have a place there. The flip side is that upgrades and backups are your job. Installing Forgejo keeps Codeberg's software without Codeberg's terms. Gitea offers a middle ground, Gitea Cloud, which gives each customer a dedicated instance in the region they pick, with no published price; gitea.com is free, with a limited number of repositories.

Leaving GitHub: repositories, issues and workflows

Gitea imports a GitHub repository through a built-in migration form; to bring the issues and pull requests along too, it needs at least the username of the source account. It can also keep mirrors in either direction: pull a repository that stays on GitHub at regular intervals, or push its own copy there. Gitea workflows use GitHub Actions syntax, and an action referenced without a host, such as actions/checkout@v4, is downloaded from GitHub unless configured otherwise. The docs list where it departs from GitHub: environment and annotations are ignored, and the job token has narrower permissions.

Gogs imports or mirrors a repository and its wiki from another code host; its README mentions neither issues nor pull requests.

Codeberg's migration tool brings over the issues, labels, wiki, releases and milestones of a GitHub repository, as long as you give it an access token created on GitHub. Pull mirrors from other forges are disabled there, and the FAQ suggests pushing with git push --mirror instead. A migrated copy with no unique contributions that sits inactive for more than a month can be removed, after a notice that leaves 90 days to ask for it to be kept. On CI, Forgejo's docs state that its Actions are designed to be familiar to GitHub Actions users, not to be compatible with them.

Forgejo on your own server has the same migration tool, which since v17 also brings over the pull requests and reviews of a Bitbucket Data Center repository. It keeps mirrors in both directions, including pull mirrors from other forges. A Gitea instance can upgrade to Forgejo in place up to Gitea 1.22, going through Forgejo v10.0; the upgrade guide doesn't cover later Gitea releases such as 28.1.0.

OneDev imports the code, milestones (which become iterations) and issues of a GitHub repository, using a personal access token; its importer skips pull requests. It can also import from GitLab, Gitea, Bitbucket Cloud, Jira Cloud and YouTrack.

Licences and paid plans

Gogs and Gitea are both MIT. Gogs has no paid plan and no hosted service; its README points to third-party hosting such as Cloudron, YunoHost and alwaysdata. Gitea keeps part of its features for Gitea Enterprise, a self-hosted edition billed per user per month: SAML, branch protection rules inherited across an organisation, dependency scanning, an IP allowlist, mandatory two-factor authentication and autoscaling runners on Kubernetes. The edition's page still lists the audit log, which reached the free version in 28.0.0. Forgejo's website calls Gitea "open core".

OneDev is MIT-licensed, with OneDev Pty as copyright holder. Its Enterprise edition costs $6 per user per month, with a minimum of twelve user-months per order; disabled accounts, service accounts and AI users don't count. It adds clustered high availability, security and compliance scanning, Renovate, time tracking, the audit log, custom dashboards, code search across projects and the web terminal for debugging jobs. The README presents several of these features without flagging them as paid, and their code sits in a submodule, server-ee, which can't be cloned from code.onedev.io without authenticating.

Forgejo, the software behind Codeberg, has been under GPL v3 or later since v9.0, a copyleft licence: a modified version you redistribute stays under the GPL. Forgejo's FAQ says the AGPL and the EUPL were proposed to guard against a takeover by a for-profit company, but no agreement was reached. Codeberg sells nothing. The association lives on donations and on the fees of more than 1,700 members, who elect its presidium and board, and you don't have to join to use the service.