---
title: "Migrate from Gitea to Forgejo: version limits and safe paths · CloudSat"
description: "Move from Gitea to Forgejo safely: which versions upgrade in place, the two-step path through Forgejo v10, what to do from Gitea 1.23 or 28.x, and checks."
url: https://cloudsat.io/learn/migrate-gitea-to-forgejo
updated: 2026-11-18T12:00:00Z
source: CloudSat (https://cloudsat.io/). Prices in USD.
---

[Self-hosting](https://cloudsat.io/learn/topic/self-hosting)

# Migrate from Gitea to Forgejo: version limits and safe paths

Move from Gitea to Forgejo safely: which versions upgrade in place, the two-step path through Forgejo v10, what to do from Gitea 1.23 or 28.x, and checks.

CloudSat team November 18, 2026 6 min read

Moving from Gitea to Forgejo used to be a binary swap. For most installations it no longer is, because the two projects have diverged too far to share a database format. Treat the move as a small project in four phases: assess what you run, protect it, move it by the route your version allows, and prove that nothing was lost. Most of the risk disappears in the first two phases.

## Phase 1: assess

### Which Gitea version do you run?

The version appears in the footer of the web interface and on the site administration dashboard. From a shell:

```bash
gitea --version                          # binary install
docker exec -u git gitea gitea --version # container named gitea
```

That number decides the route:

| Your Gitea version | Supported route to Forgejo |
| --- | --- |
| 1.22.x or earlier | Upgrade in place to Forgejo v10.0.x first, then follow Forgejo's regular upgrades |
| 1.23 to 1.27, or 28.x | No in-place upgrade; migrate repositories into a new Forgejo instance |

Forgejo announced the limit in December 2024: v10.0 would be the last release able to upgrade Gitea instances, and only up to Gitea 1.22, because the codebases had been reimplemented and re-architected too far to keep database compatibility. Gitea has since moved on to 1.27 and then to 28.0, released on September 30, 2026, with schema changes of its own. Forgejo's announcement mentions that newer Gitea databases might be converted with manual database edits, on a best-effort basis only. Treat that as unsupported and keep it out of production.

### What does the instance actually use?

Make a short inventory before choosing a date: Actions workflows and runners, package registries, LFS, webhooks, mirrors, OAuth or LDAP sign-in, and any customized templates. Each item is something to test later, and on the repository route, something to rebuild.

## Phase 2: protect

Take a backup you have actually opened:

```bash
sudo systemctl stop gitea
sudo -u git gitea dump -c /etc/gitea/app.ini -f /tmp/gitea-dump.zip
```

The dump contains repositories, the database and configuration; move it off `/tmp` to safe storage right away. For PostgreSQL or MySQL, also keep a native dump (`pg_dump` or `mysqldump`) so you can restore without Gitea's tooling. On a CloudSat server, a [snapshot](https://cloudsat.io/docs/take-a-snapshot) taken right before the change gives you a full rollback point.

Then rehearse. Restore the dump on a scratch server, run the route you chose against the copy, and time it. A rehearsal turns surprises, such as an action that no longer resolves or an LDAP setting that needs a new path, into notes for the real run.

## Phase 3: move

### Route A: in place, for Gitea 1.22 and earlier

This is a true upgrade. Forgejo runs automatic database migrations on its first start and does not rewrite your `app.ini`.

For container installs, Forgejo's images use the same layout under `/data` as Gitea's, so the switch is an image change. Pin the v10 line first:

```yaml
services:
  forgejo:
    image: codeberg.org/forgejo/forgejo:10
    environment:

      - USER_UID=1000
      - USER_GID=1000

    volumes:

      - ./gitea:/data

    ports:

      - "3000:3000"
      - "222:22"

    restart: unless-stopped
```

Keep the same volume and ports you used for Gitea. For rootless images, the data must be owned by UID and GID 1000. If you configure settings through environment variables, Forgejo's documentation recommends supplying them under both the `GITEA__` and `FORGEJO__` prefixes during the transition.

For binary and package installs, stop Gitea, install the Forgejo v10 binary or package, and point it at the same configuration and data. Forgejo's Arch Linux instructions show the cautious version: copy `/etc/gitea/app.ini` to `/etc/forgejo/app.ini`, copy `/var/lib/gitea` to `/var/lib/forgejo`, fix ownership for the `forgejo` user, and update the paths in the new `app.ini`. Copying instead of moving keeps the Gitea side intact for a rollback.

Start Forgejo, watch the log while migrations run, then ask it to check itself:

```bash
docker compose logs -f forgejo
docker compose exec -u git forgejo forgejo doctor check --all
```

Once v10 runs cleanly, Forgejo supports upgrading from v10.0.x straight to any later release. Change the image tag to the long-term support line (`15`) or the current stable line (`17`), start again, and run the doctor once more. Choose LTS if you prefer fewer upgrades; v15 is maintained until July 2027.

### Route B: repository migration, for Gitea 1.23 and newer

Here you build a new Forgejo instance and pull repositories into it with Forgejo's migration feature, which talks to the Gitea API. Git history always transfers completely, and the migration can also bring issues, pull requests, labels, milestones, releases, the wiki and LFS objects.

For a few repositories, use **New migration** in the Forgejo interface, choose **Gitea**, and paste an access token created on the old instance. For dozens, script it against the API:

```bash
curl -fsS -X POST https://forgejo.example.com/api/v1/repos/migrate \
  -H "Authorization: token $FORGEJO_TOKEN" -H "Content-Type: application/json" \
  -d '{"clone_addr": "https://gitea.example.com/acme/shop.git", "service": "gitea",
       "auth_token": "'"$GITEA_TOKEN"'", "repo_owner": "acme", "repo_name": "shop",
       "private": true, "issues": true, "pull_requests": true, "labels": true,
       "milestones": true, "releases": true, "wiki": true, "lfs": true}'
```

Forgejo refuses by default to migrate from private network addresses; if the old Gitea sits on your LAN or a VPN, allow it under `[migrations]` in `app.ini` with `ALLOWED_DOMAINS` or `ALLOW_LOCALNETWORKS`. Create the owning organizations first, since the target owner must exist.

The instance around the repositories does not travel. Plan to recreate user accounts with their two-factor settings and SSH or GPG keys, organizations and teams, webhooks, deploy keys and branch protection rules, Actions secrets and runners (Forgejo uses its own Forgejo Runner), and authentication sources such as LDAP or OAuth. Treat migrated metadata as best effort and spot-check busy repositories, especially pull requests from forks.

For the cut-over itself:

1. Announce a freeze window and stop writes on the old instance by blocking its HTTP and SSH ports.
2. Run the full migration, recreate webhooks and runners, and register users.
3. Point DNS at Forgejo, or give the new instance the old hostname, so existing clones keep working; tell users to update their remote if the SSH port changed.
4. Keep the old server read-only for a few weeks in case something was missed.

## Phase 4: prove it worked

- **Clone and push** over both HTTPS and SSH with a normal user account.
- **Compare counts** of repositories, open issues and releases against the old instance.
- **Fire a webhook** with a test push and confirm the receiver gets it.
- **Run one Actions workflow.** Forgejo resolves short `uses:` references through its own default actions URL, so an action that worked on Gitea can fail with "repository not found"; use full URLs such as `https://github.com/actions/checkout@v6` or change the default.
- **Open LFS files** and attachments in a repository that uses them.
- **Run the doctor** one last time and read its output, even when everything else looks fine.

## FAQ

### Do I have to move at all?

No. Forgejo is no longer an upgrade of Gitea; it is a different project. If you depend on Gitea-specific features or its commercial support, staying is reasonable. The [forge comparison](https://cloudsat.io/learn/self-hosted-git-forge-comparison) lays out where the two differ in license, governance and features.

### Can I go back to Gitea after an in-place upgrade?

Not by swapping the binary back, because Forgejo has already migrated the database. Restore the backup or snapshot you took before the change.

### Does Forgejo keep my app.ini?

Yes. The documentation states there is no automatic modification of `app.ini` related to this upgrade. Forgejo recommends letting it write its own config file in general, since it stores generated secrets there.

### Is there a shortcut for Gitea 1.23 or later?

There is no supported one. Some administrators have rolled a newer database back by hand to a 1.22 schema, but that is risky and undocumented. Repository migration takes longer and is predictable.

**Run it on CloudSat.** Cloud VPS on AMD EPYC and NVMe from $1.98/mo in 13 regions, delivered in under 5 minutes and paid in crypto. [See plans](https://cloudsat.io/plans) or [deploy a server](https://dash.cloudsat.io/console/deploy).

## Keep reading

[All guides in Self-hosting](https://cloudsat.io/learn/topic/self-hosting)

- [Self-hosted Git forge: Gitea, Forgejo, OneDev or GitLab CE](https://cloudsat.io/learn/self-hosted-git-forge-comparison): Self-hosting Self-hosted Git forge: Gitea, Forgejo, OneDev or GitLab CE 6 min read
- [Run a private Git server over SSH with nothing but Git](https://cloudsat.io/learn/bare-git-server-over-ssh): Self-hosting Run a private Git server over SSH with nothing but Git 6 min read
- [Leave Framer for a site you own: a migration plan](https://cloudsat.io/learn/leave-framer-for-a-site-you-own): Self-hosting Leave Framer for a site you own: a migration plan 6 min read
- [A self-hosted developer stack on one VPS: layout and limits](https://cloudsat.io/learn/developer-tool-stack-on-one-vps): Self-hosting A self-hosted developer stack on one VPS: layout and limits 6 min read
