Skip to content

Self-host Forgejo

updated Sep 2026prices checked · Jul 2026Install verified on Ubuntu 26.04 · Sep 2026 · how we test
We earn commissions when you shop through the links below. Full disclosure →

A community-run hard fork of Gitea, stewarded by the Codeberg nonprofit. Near-identical to use, with independent, community-first governance.

Key facts

CategoryCode hosting
LicenseGPL-3.0-or-later
StackGo
Min RAM512 MB
Official imageyes
Measured idle RAM100 MB
Difficulty
Our recommendation

Pick Forgejo when you want Gitea's feature set under community governance: it is a hard fork stewarded by the Codeberg e.V. nonprofit, GPL-3.0-or-later since v9.0 (earlier releases were MIT), developed and released entirely on free software, and "lightweight" enough that the README puts a Raspberry Pi in scope. Forgejo Actions is enabled by default, releases are semver since 7.0, and there is an LTS line — as of September 2026, 15.0.x is the LTS (supported until 15 July 2027) and 16.0.x the current stable. Same 512 MB estimate, same single container as Gitea.

Follow the Forgejo deploy guide →

What you need

  • Any VPS with at least 512 MB of RAM
  • A domain you control — most self-hosted setups need HTTPS in front of them
  • Under an hour if you've used Docker before
Where to host itaffiliate disclosure
Hetzner Cloudrun it on
From $23.59/mo · 2 vCPU / 4 GB / 80 GB · EU + US
Get Hetzner Cloud (opens in new tab)
Kamaterafree trial
From $4/mo · 1 vCPU / 1 GB / 20 GB · US + EU + Asia
Start free on Kamatera → (opens in new tab)
DigitalOceanalso works on
From $6/mo · 1 vCPU / 1 GB / 25 GB · US + EU + Asia
Deploy on DigitalOcean → (opens in new tab)

Paid link — we earn a commission if you shop through it.

Install with Docker Compose

Save this as compose.yml and run docker compose up -d:

# Forgejo — official compose example (forgejo.org/docs → Installation with Docker)
# :16 tracks the latest release; use :15 for the LTS line (supported until 2027-07-15)
networks:
  forgejo:
    external: false
services:
  server:
    image: codeberg.org/forgejo/forgejo:16
    container_name: forgejo
    environment:
      - USER_UID=1000
      - USER_GID=1000
    restart: always
    networks:
      - forgejo
    volumes:
      - ./forgejo:/data
      - /etc/localtime:/etc/localtime:ro
    ports:
      - '3000:3000'
      - '222:22'
# docker compose up -d  →  http://SERVER_IP:3000

What you take on

Forgejo's docs are careful about versions and backups, and our snippet is behind them:

non-negotiableOur snippet pins codeberg.org/forgejo/forgejo:7, the 7.x line from 2024; as of September 2026 the releases are 16.0.5 stable and 15.0.9 LTS. The X tag follows minors automatically, but "Upgrading from X to X+1 (for instance from 12 to 13) requires a manual operation and human verification" — start new installs on :15 (LTS) or :16, and step existing ones through each major with its release notes.
non-negotiableSupport windows are short: a stable release gets fixes "for three months, plus a two week window after the next stable release"; only the first-quarter release becomes LTS with "one year and three months" of critical fixes. Subscribe to the security-announcements repository — details are withheld, only the release date is announced in advance.
non-negotiableBack up before every upgrade — "a requirement when upgrading to a new stable release". The forgejo dump zip contains the SQLite database, but for PostgreSQL or MySQL its SQL dump "has serious long standing open bugs", so use psql/mysql dumps; run forgejo manager flush-queues first and forgejo doctor check --all after. Docker must be >= 20.10.6.
non-negotiableMigration from Gitea is supported only from v1.22 and earlier, in two hops via Forgejo v10.0.x; the Gitea project does not cherry-pick Forgejo commits ("No.") and Forgejo contributions "most likely" never reach Gitea — once your data is on one side, that is the side you are on.
non-negotiableForgejo Actions is on by default ([actions] ENABLED = false turns it off) and the Forgejo Runner is a separate install that "performs remote code execution" with "significant security threats for the host" — read the securing-Actions guide before registering one. The 512 MB floor is our estimate; upstream publishes no figure.

An alternative to

Head-to-head

More in Code hosting

We use analytics cookies (Google Analytics, PostHog) to see which guides are useful. No ad networks, no cross-site tracking. See our privacy policy.