Forgejo vs Gitea: what differs, which to run
Forgejo or Gitea for your own git server? Who controls each, how Actions and packages differ, Gitea migration paths, and a Docker Compose install.
Forgejo vs Gitea: the short answer
Forgejo vs Gitea is mostly a choice about who runs the project, though the two are now separate codebases with a shared history. Pick Forgejo if you want a git server run under a non-profit, with a copyleft licence and a published support calendar. Pick Gitea if you want a vendor that sells commercial support, or you already run Gitea newer than 1.22 and do not want a migration project.
Both are a single Go program that gives you repositories, issues, pull requests, a package registry and built-in CI. Both run in one container on a small VPS. The rest of this guide covers what differs as of 28 October 2026, with versions named: Forgejo 17.0.1 and Gitea 28.2.0. It ends with a Forgejo install in Docker Compose behind a reverse proxy, with git over SSH on port 222 so it does not collide with the host's own SSH daemon. If you are still deciding whether you want a self-hosted forge at all, start with the difference between git, GitHub and a git server. For the wider field, read the self-hosted git server options compared.
Who controls each project, and under what licence
Gitea is MIT-licensed. The LICENSE file in its repository is the MIT text with "Copyright (c) 2016 The Gitea Authors". Gitea's product page says the project gets "leadership and commercial support from CommitGo". That is CommitGo, Inc., which also sells Gitea Enterprise. The free self-hosted edition stays MIT.
Forgejo started as a Gitea fork in October 2022. Its own comparison page says it was created "after a for profit company took over the Gitea project". That is Forgejo's view, so read it as one side of the story. Forgejo's domains are held by the non-profit Codeberg e.V. Forgejo's FAQ says its governance "is collectively defined by its contributors". Its governance page says Forgejo is "ultimately under the control of Codeberg e.V. and its governance". Both statements hold at once: contributors set the day-to-day rules, inside limits set by Codeberg.
Forgejo changed licence with v9.0, released 16 October 2024. Forgejo v8.0 and earlier are MIT. Forgejo v9.0 and later are GPL v3 or later.
What the licence means for someone self-hosting
If you run either one unmodified on your own server, the licence changes nothing in daily use. GPL v3 obligations attach when you distribute the program, for example when you ship a modified binary to a customer. Forgejo uses the GPL, not the AGPL (Affero General Public License), so running a modified copy as a web service does not by itself oblige you to publish your changes.
The licence matters more over the long term. MIT code can be taken into a closed product. GPL code cannot. If you care about which organisation can steer the project in five years, that is the real question in this comparison, and the two answers are a company and a non-profit.
The version numbers no longer line up
Gitea 28.0.0 dropped the old "1." prefix. Its release post says "this release is 28.0.0 rather than 1.28.0". So Gitea went from 1.27.3 (29 August 2026) to 28.0.0 (announced 30 September 2026), then to 28.1.0 (6 October) and 28.2.0 (18 October 2026).
Forgejo uses its own major numbers. Forgejo 17.0 was released on 15 October 2026, and 17.0.1 followed on 26 October 2026. Forgejo's upgrade guide calls it a hard fork of Gitea, and its download page says "The Forgejo and Gitea release cycles are no longer synchronized." The numbers carry no meaning across the two projects, so compare features from each project's own docs.
Release and support cadence
Forgejo publishes a stable release every quarter, on a fixed schedule. Its release schedule page names the LTS (long-term support) releases: 7.0, 11.0, 15.0 and 19.0. Reading the end-of-life column of that table, a normal release gets about three months of support and an LTS release about fifteen. As of 28 October 2026:
- Forgejo 17.0 is supported until 28 January 2027. It is not an LTS release.
- Forgejo 16.0 is supported until 29 October 2026, one day after this guide's date, so upgrade a 16.0 instance now.
- Forgejo 15.0 is the current LTS and is supported until 15 July 2027.
- Forgejo 18.0 is due on 14 January 2027, and 19.0, the next LTS, on 15 April 2027.
Gitea's published support and release policy covers Gitea Enterprise: it follows a rolling release model, with updates and support during an active subscription rather than fixed end-of-life dates for each version. The 28.0.0 and 28.2.0 release posts state no support window. The 28.2.0 post calls itself "the second maintenance release for the 28 series". The Gitea product site links a support and release policy page, so read it before you plan around a support period. What is on record is that the 28.2.0 post lists 12 CVEs (Common Vulnerabilities and Exposures entries). Nine are fixed in 28.2.0, and the other three were fixed in earlier releases and are only disclosed with it. The Gitea team writes "We strongly recommend that all users upgrade as soon as possible."
For a small team the practical result is this. On Forgejo you can stay on an LTS release and do a major upgrade roughly once a year. On Gitea you follow the maintenance releases as they come.
Defaults that changed in Gitea 28
Two Gitea 28.0.0 changes affect a new server straight away:
- Gitea "refuses to start with a Git version older than 2.25.0".
- Self-registration "is now disabled unless
[service] DISABLE_REGISTRATION = falseis set explicitly".
A third change affects CI storage. "Completed Actions runs are now deleted after 400 days by default, together with their jobs, logs, and artifacts." Setting RUN_RETENTION_DAYS = 0 keeps them all.
Forgejo 17 still defaults to DISABLE_REGISTRATION = false, according to its configuration cheat sheet. On a public Forgejo instance, anyone who finds the page can create an account until you turn that off. The install section below does it.
Actions and runners
Both projects ship CI (continuous integration) that reads workflow files written in the GitHub Actions style. In both, the server only schedules jobs. A separate runner program, which you install yourself, executes them.
Forgejo Actions reads workflows from .forgejo/workflows. The docs say "As of Forgejo v1.21, Actions is enabled by default." Jobs run on Forgejo Runner. Forgejo is careful about compatibility claims, and its reference page says "GitHub Actions and Forgejo Actions are not the same and things might not work right away." Forgejo 17.0 added job summaries above the logs, which appear only for jobs from "Forgejo Runner 13.2 or newer".
Gitea Actions has been built in since Gitea 1.19. Gitea's docs describe it as "stable enough for production usage" and "similar and mostly compatible to GitHub Actions". The runner is called Gitea Runner. Gitea Runner 5.0.0, released 8 October 2026, requires Git 2.34.1 or newer. With it, a job that has no runs-on, or an empty one, now fails, except a job that calls a reusable workflow.
If you plan to reuse many workflows from GitHub, test your own workflows on both before you decide. Neither project promises full compatibility. Runner install and job isolation are a topic of their own, covered in running a self-hosted CI runner on a VPS.
Package registry
Both projects host packages next to your code, and both docs list 23 package types today. The lists are almost the same. Forgejo supports ALT Linux packages and Gitea does not. Gitea supports a Terraform registry and Forgejo does not. Every other type is on both lists, including Container images, npm, PyPI, Maven, Cargo, Debian and RPM.
Neither one wins this section. Check that your package type is on the list for the product you pick.
Federation
Forgejo's comparison page says Forgejo "is working on implementing forge federation, with monthly progress reports". Federation means separate forge servers that can follow each other and open issues across instances. Treat it as work in progress. Forgejo's FAQ calls federation experimental, with moderation and access control still missing. The Forgejo 17.0 release post does not mention it. Do not choose Forgejo for federation unless you are willing to wait for it. This guide could not find a current primary source on Gitea's plans either way.
Can you move from Gitea to Forgejo?
Yes. The Gitea 1.22 limit applies to transparent instance upgrades, not repository migrations. Forgejo's upgrade guide says "Upgrades to Forgejo are transparently supported up to Gitea v1.22 included, in two steps":
- "Upgrade from any Gitea version up to and including v1.22.x to Forgejo v10.0.x".
- "Upgrade from Forgejo v10.0.x to any Forgejo version greater than v10."
Forgejo 10.0 is long out of support, so treat it as a stepping stone and go straight on to a current release. The guide also says "To be safe, make sure to perform a full backup before upgrading." Do that before each step, not only the first.
Gitea 1.23 to 1.27, and Gitea 28, are outside this transparent upgrade path. Forgejo explicitly supports moving repositories one-by-one using its in-app migration tool, as long as the Gitea API remains stable. For those instances the options are to stay on Gitea, or to stand up a fresh Forgejo and migrate the repositories across. A plain git mirror moves every branch and tag:
git clone --mirror ssh://git@old.example.com:222/alice/notes.git
cd notes.git
git push --mirror ssh://git@git.example.com:222/alice/notes.gitIssues, pull requests and comments live in the forge's database, not in the git repository, so a mirror push does not carry them. Plan that part before you promise anyone a migration. If you want to keep a GitHub copy alongside the new server, pushing to GitHub and your own git server at once needs only a second push URL on the remote.
How much RAM and disk on a small VPS?
Gitea's docs say "2 CPU cores and 1GB RAM is typically sufficient for small teams/projects", and that a Raspberry Pi 3 can run Gitea for small workloads. That statement is on the front page of the Gitea 28 docs. Forgejo's docs give no RAM, CPU or disk figure. This guide makes no claim that either one uses less memory than the other, because no primary source measures it.
Disk is easier to reason about than RAM. The program itself is small. What grows is your data: repositories, Git LFS (large file storage) objects, packages, and CI logs and artifacts. On Gitea 28, Actions data now expires after 400 days by default. On Forgejo 17, artifacts default to 90 days of retention and logs to 365 days; watch disk use yourself. To see what your instance really uses once it has some traffic, run this from the directory that holds compose.yaml:
sudo docker stats --no-stream forgejo
sudo du -sh ./forgejoThe first line shows live memory and CPU use. The second shows how much disk the data volume holds.
Choose the database before the first start
Forgejo uses SQLite by default. Its recommendations page suggests SQLite for low to moderate activity, and MySQL or PostgreSQL for high activity. It also warns that switching databases later is not a trivial task. A single team on a small VPS is well inside SQLite's range, and SQLite keeps the whole backup in one directory. If you expect a busy instance, start on PostgreSQL. The Forgejo Docker docs include a Compose example with a postgres service.
Install Forgejo with Docker Compose
This install uses the image and layout from Forgejo's Docker docs, with a few changes. The web port binds to 127.0.0.1 only, so the reverse proxy is the one public entry point. Some FORGEJO__ variables set the public URL and the SSH port. Git over SSH uses host port 222, so the host's own sshd keeps port 22.
You need Docker with the Compose plugin. If you have not set that up yet, follow the Docker Compose basics for a VPS first. You also need a DNS (domain name system) record, here git.example.com, pointing at the VPS.
sudo mkdir -p /opt/forgejo
cd /opt/forgejo
sudo nano compose.yamlnetworks:
forgejo:
external: false
services:
server:
image: codeberg.org/forgejo/forgejo:17
container_name: forgejo
environment:
- USER_UID=1000
- USER_GID=1000
- FORGEJO__server__DOMAIN=git.example.com
- FORGEJO__server__SSH_DOMAIN=git.example.com
- FORGEJO__server__ROOT_URL=https://git.example.com/
- FORGEJO__server__SSH_PORT=222
restart: always
networks:
- forgejo
volumes:
- ./forgejo:/data
- /etc/localtime:/etc/localtime:ro
ports:
- '127.0.0.1:3000:3000'
- '222:22'A FORGEJO__section__KEY variable writes KEY into that [section] of app.ini, the Forgejo config file. The image creates that file inside ./forgejo on the first start. SSH_PORT is the port shown in clone URLs. It does not move the SSH server inside the container. The '222:22' line does the real mapping, from host port 222 to the container's port 22. Without SSH_PORT=222, the web page shows clone URLs on port 22, which reach the host's sshd instead of Forgejo.
The 17 tag follows the latest 17.0.x release. Forgejo's docs say a move from one major version to the next "requires a manual operation and human verification", so the tag never jumps to 18 on its own. If you prefer the LTS calendar, use the 15 tag instead.
Start it and check it:
sudo docker compose up -d
sudo docker compose ps
sudo docker compose logs --tail 50 server
curl -sI http://127.0.0.1:3000 | head -n 1
sudo ss -tlnp | grep -E ':(3000|222) 'docker compose ps should list the forgejo container as running. curl should print an HTTP status line. Connection refused means the container is not listening yet, so read the logs. The ss output should show port 3000 on 127.0.0.1 only, and port 222 on all addresses.
If ufw is active, open the SSH port for git and the web ports for the proxy:
sudo ufw allow 222/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcpMany providers also have a network firewall in their control panel, separate from ufw. Open TCP 222 there too.
Put Forgejo behind a reverse proxy
Forgejo's reverse-proxy docs give this Caddy example. Caddy gets a TLS (transport layer security) certificate for the domain on its own. Put it in /etc/caddy/Caddyfile:
git.example.com {
reverse_proxy 127.0.0.1:3000
}sudo systemctl reload caddy
curl -sI https://git.example.com | head -n 1If Caddy is not on the box yet, setting up Caddy as a reverse proxy on a VPS covers the install. Forgejo's docs also have an nginx example. It sets merge_slashes off, which Forgejo needs to handle URL-encoded slashes. It also sets client_max_body_size 512M, which raises nginx's request-body limit to 512 MiB; larger requests still receive HTTP 413. Setting the value to 0 disables that size check. If you are still choosing a proxy, read nginx vs Caddy vs Traefik as a reverse proxy.
ROOT_URL must start with https:// once the proxy serves HTTPS, because Forgejo builds every link and clone URL from it. With the default, http://localhost:3000/, links on pages and in emails point at an address your users cannot reach.
First login, and closing registration
Open https://git.example.com. On the first visit Forgejo shows its installation page, because INSTALL_LOCK is false until setup completes. Keep SQLite3 as the database unless you set up PostgreSQL. Check that the server domain, the SSH port (222) and the base URL match what you put in compose.yaml. Create the administrator account in the administrator section of the page, then install.
Now close self-registration, because Forgejo's default lets any visitor sign up. Add this line under environment: in compose.yaml:
- FORGEJO__service__DISABLE_REGISTRATION=truesudo docker compose up -dup -d recreates the container with the new variable. Sign out and load the sign-in page. The register link should be gone. From then on, only an administrator can create accounts.
Test git over SSH on port 222
Add your public key in your user settings in the web interface. Then, from your own machine, run:
ssh -T -p 222 git@git.example.comA successful run prints a short message from Forgejo and closes the connection, since Forgejo gives no shell. Permission denied (publickey) means public-key authentication failed; check which key your client offered, the key added in the web interface, and SSH key permissions. A timeout means the connection received no response in time. Check the destination IP address, ufw, the provider's firewall and whether your client's network blocks port 222.
Create a repository and copy its SSH clone URL. It should include port 222, in a form like ssh://git@git.example.com:222/alice/notes.git. If it shows no port, the SSH_PORT value did not reach app.ini. Check what the file holds, from /opt/forgejo:
sudo grep -rn --include=app.ini 'SSH_PORT' ./forgejoBackups and upgrades
With SQLite, everything lives in ./forgejo. A consistent backup stops the container first:
cd /opt/forgejo
sudo docker compose stop
sudo tar czf /root/forgejo-backup-$(date +%F).tgz forgejo compose.yaml
sudo docker compose startCopy the archive off the VPS. A minor upgrade within 17.0.x is a pull and a restart:
sudo docker compose pull
sudo docker compose up -dFor a major upgrade, read Forgejo's upgrade guide and the release notes first. Forgejo 17.0, for example, changed how absolute links inside rendered repository documents resolve: they now resolve from the root of the repository. It also deprecated action run webhook events in favour of workflow run events. Take a backup, change the tag in compose.yaml, and run the same two commands.
Which one should you run?
- You run a personal or homelab git server. Either works. Take Forgejo on the LTS tag if you want an upgrade calendar you can plan around.
- You are a small team that wants a support contract. Gitea, with commercial support from CommitGo.
- You care who controls the project and want copyleft. Forgejo, under Codeberg e.V. and GPL v3 or later.
- You run Gitea 1.22 or older. You can move to Forgejo through 10.0.x, with a backup before each step. This transparent upgrade path does not cover newer Gitea; repository-by-repository migration remains available.
- You run Gitea 1.23 or newer. Staying on Gitea is the simple choice. Moving means a fresh Forgejo and a repository-by-repository migration.
- You depend on many GitHub Actions workflows. Test your real workflows on both runners before you commit.
- You need a Terraform or an ALT Linux package registry. Gitea for Terraform, Forgejo for ALT.
FAQ
Can I upgrade Gitea to Forgejo directly?
Transparent instance upgrades are supported only from Gitea 1.22.x or older. Forgejo's upgrade guide describes two steps: Gitea up to 1.22.x to Forgejo 10.0.x, then Forgejo 10.0.x to any later Forgejo. Take a full backup before each step. Gitea 1.23 and later, including Gitea 28, are outside that path. For newer instances, use a fresh Forgejo and its in-app migration tool to move repositories one-by-one, as long as the Gitea API remains stable. A git mirror is another option, but issues and pull requests do not travel with a mirror because they live in the database.
Do GitHub Actions workflows run on Forgejo or Gitea?
Often, with changes. Gitea's docs call Gitea Actions "similar and mostly compatible to GitHub Actions". Forgejo's docs say GitHub Actions and Forgejo Actions "are not the same and things might not work right away". Both need a separate runner that you install: Forgejo Runner or Gitea Runner. Test your own workflows before you migrate CI.
How much RAM does Forgejo or Gitea need on a VPS?
Gitea's docs (Gitea 28) say 2 CPU cores and 1GB RAM is typically enough for small teams. Forgejo's docs give no figure. Measure your own instance with docker stats --no-stream after it has real use. Disk grows with repositories, LFS objects, packages and CI artifacts, not with the program.
Why does the Forgejo clone URL show port 22 when SSH is on 222?
The clone URL comes from the SSH_PORT setting, which defaults to 22. The Compose ports line only maps host port 222 to the container. Set FORGEJO__server__SSH_PORT=222 in the container environment, or SSH_PORT = 222 under [server] in app.ini, and restart. The repository page then shows clone URLs with port 222.
Is Forgejo still free and open source?
Yes. Forgejo v9.0 and later are GPL v3 or later, and v8.0 and earlier were MIT. Gitea's free self-hosted edition is MIT, and CommitGo sells Gitea Enterprise and commercial support on top of it. Running either one unmodified on your own server costs nothing in licence fees.