Skip to content

Gitea vs Forgejo: which self-hosted Git server to run

Gitea and Forgejo compared: the 2022 fork, MIT vs GPL, who governs each, Actions and runners, federation and migration, then how to deploy either one.

Abhishek Jaiswal

7 min

On this page 10 sections

Gitea and Forgejo are both lightweight self-hosted Git servers with repositories, issues, pull requests, a package registry and built-in CI. Forgejo began as a fork of Gitea in late 2022 and became a separate codebase in 2024.

Pick Gitea if you want an MIT-licensed server with a company behind it and a hosted option. Pick Forgejo if you want a GPL-licensed project run by its community under a non-profit. For a small team the day-to-day experience is close, and both deploy in one click from the Ownkube Marketplace.

The short version

Gitea Forgejo
License MIT GPLv3 or later since v9.0 (MIT up to v8.0)
Steward Gitea Ltd holds the domains and trademark Codeberg e.V., a Berlin non-profit, holds the domains
Built-in CI Gitea Actions, “mostly compatible” with GitHub Actions Forgejo Actions, familiar to GitHub users but not designed to be compatible
Federation None known, per Forgejo’s comparison page Experimental, built on ForgeFed and ActivityPub
Hosted option Gitea Cloud Codeberg runs Forgejo for open-source projects
Ownkube template Gitea Forgejo

How the fork happened

In October 2022 Gitea’s maintainers announced Gitea Limited, a company to sell support and hosting around the project. In a post on the Gitea blog, Lunny Xiao wrote that he had transferred the Gitea domains and trademark to the company, and that the code would stay MIT licensed and open to everyone.

A group of contributors published an open letter on 28 October 2022. They said the transfer happened without the community’s knowledge or approval, and asked the owners to restore community control. That didn’t happen. Forgejo followed, announced publicly in December 2022 under the umbrella of Codeberg e.V., which also moved its own hosting to Forgejo.

For its first year Forgejo was a soft fork that pulled in Gitea’s changes. In February 2024 it became a hard fork. Forgejo’s announcement said the two projects’ “governance and development models” had diverged, and that a hard fork let them “reduce tech debt at a much higher pace.” Since then each project develops on its own, and Forgejo aims to keep its API compatible with Gitea’s.

License and governance

Gitea is MIT licensed. Gitea Ltd owns the trademark and domains and sells Gitea Cloud, a dedicated hosted instance. Forgejo’s comparison page describes Gitea as open core with some code outside the free release. If your company wants a vendor to call and a permissive license, Gitea gives you both.

Forgejo switched to GPLv3 or later with v9.0. Versions up to v8.0 were MIT. Its FAQ says governance “is collectively defined by its contributors,” with decisions and funding discussed in public repositories. Codeberg e.V. keeps custody of the domains, and Forgejo has registered no trademark. A switch to the AGPL has been proposed, and the FAQ says no agreement has been reached.

For most teams that only run the server, the license changes little. It matters if you plan to ship a modified version to others, because the GPL requires you to share those changes.

Actions and runners

Gitea added Actions in version 1.19, and Forgejo had split its CI off from Gitea’s before the 2024 hard fork. In both, the server only schedules work. The jobs run on a separate runner that you install and register with your instance.

Gitea Actions Forgejo Actions
GitHub workflow files ”Similar and mostly compatible" "Familiar” but “not designed to be compatible”
Runner Gitea Runner, a hard fork of nektos/act Forgejo Runner

If you’re moving workflows from GitHub, Gitea’s aim of compatibility means fewer edits. Forgejo’s docs say most workflows need small changes.

A runner connects out to your server’s HTTPS address, so it can live on any machine you have, such as a spare server, a build box or a laptop. Most setups run jobs in Docker containers on that machine.

Federation

Forgejo is building forge federation on ForgeFed, an extension of ActivityPub, so that people on one instance can follow and contribute to repositories on another. Its FAQ calls the work “experimental” and warns of breaking changes, and the project publishes monthly progress reports.

Forgejo’s comparison page said in December 2024 that it knew of no federation work in Gitea. If cross-instance collaboration is a reason you’re self-hosting, Forgejo is where that work happens. If you only need a private server for your team, federation won’t affect your choice today.

Moving between them

Forgejo can upgrade a Gitea install in place, but only from older versions. Its docs give a two-step path:

  1. Upgrade from any Gitea version up to and including 1.22 to Forgejo 10.0.
  2. Upgrade from Forgejo 10.0 to any later Forgejo release.

Gitea 1.23 and later are not supported for an in-place switch. From a newer Gitea, the practical route is the built-in migration tool. Create the repository on the new server with New migration, point it at the old instance, and it copies the repository along with issues, pull requests and releases. It’s slower for a large server, but you can move and check one repository at a time.

A new install on Ownkube starts on a current release of either project, so it pays to choose before you push your first repository.

Deploy either one on Ownkube

The Gitea template and the Forgejo template are set up the same way. Each one creates a Postgres 18 database, deploys the official image, and passes the database host, name, user and password in as variables. Repositories live on a 10 GiB persistent volume at /data, so they survive every redeploy.

From the terminal, okctl runs the same installs:

Terminal window
okctl regions list
okctl boxes list --kind database
okctl marketplace deploy gitea --region <region-id> --db-box <box-id>
okctl marketplace deploy forgejo --region <region-id> --db-box <box-id>

The Marketplace sets up other self-hosted apps the same way. We have guides for Vaultwarden, Umami and n8n.

Pick the domain before the install page

Both templates leave the install page on. Whoever completes it creates the admin account, so finish setup right after the deploy.

The install page also sets the server’s base URL from the address in your browser, and every clone URL uses it. If you want git.example.com, add the domain first, then open the install page on that address. Custom domains need the Personal or Team plan, take two DNS records per host, and your DNS stays at your provider:

Terminal window
okctl domains add <app> git.example.com

Clone and push over HTTPS

The templates turn SSH off, because the app takes traffic over HTTPS only. Clone and push over HTTPS. Create an access token in your user settings and use it as the password when Git asks.

Back up the repositories too

On the Personal and Team plans you can turn on 7-day backups with point-in-time restore for the database. That covers users, issues and pull requests. The Git repositories themselves sit on the app’s volume, which database backups don’t include. Set up a push mirror to another Git host for the repositories you can’t lose, or keep a regular clone of them somewhere else.

Sizing and cost

Both servers are single Go binaries and stay light for a small team. Start on metered pricing, billed per minute, and watch the memory graph. For a flat price, Spark 1 (0.5 GiB, $5 a month) or Spark 2 (1 GiB, $10 a month) covers most small teams.

Add the smallest database box at $4 a month and 5 GB of storage at $1.25. On Spark 1 that comes to about $10 a month, whichever server you pick.

If a client wants their Git server inside their own AWS account, the same app moves there with no rewrite, and logs, metrics and health checks come with it.

FAQ

Is Forgejo a drop-in replacement for Gitea?

It was until the 2024 hard fork, and it still is for Gitea 1.22 and older through Forgejo 10.0. For newer Gitea versions, move repositories with the migration tool.

Which one does Codeberg run?

Forgejo. Codeberg e.V. holds Forgejo’s domains and runs it for its hosting.

Can I mirror my GitHub repositories?

Yes, in both. The migration tool copies a repository from GitHub, GitLab and other hosts, and can keep it as a pull mirror that syncs on a schedule.

Do Gitea Actions workflows run on Forgejo?

Many do with small edits. Forgejo’s docs say Forgejo Actions is not designed to be compatible with GitHub Actions, so test each workflow on a runner before you switch.

How do I update either one?

Change the image tag on the deployment and redeploy. Both run their database migrations on start. Pin a version so an upgrade is a step you choose and can roll back.

Where Ownkube fits

A Git server needs a database, a volume for the repositories and a stable HTTPS address that every clone points at. Ownkube Compute provides each of those on servers we run. Deploy the Gitea template or the Forgejo template, add your domain, then finish the install page. See Ownkube pricing for the per-minute wallet model, from $5 a month. Deploy my first app.

Abhishek Jaiswal · Founder and Engineer

Abhishek Jaiswal is the founder and engineer behind Ownkube, a cloud for personal software. He builds the platform and writes here about cloud cost, migrations, and running production infrastructure in your own AWS account without a DevOps team.

Share