Layer 5 · self-hosting reality check
What it actually takes to self-host Forgejo
The docs say Not stated by the vendor. Cloudron's package runs it within the default 256 MB app-container limit and runs PostgreSQL and Redis separately. In practice you want 2 GB for Forgejo plus PostgreSQL on one box for a 5–20 person team. CI builds need their own machine. Here is the honest version — real requirements, real monthly cost, what you will be maintaining, and the one thing that catches people out.
Usually reached from GitHub alternatives, where Forgejo is one of the picks.
Wondering whether you need to at all? Is GitHub free? — what the free tier actually allows, and where the wall is.
| RAM — documented minimum | Not stated by the vendor. Cloudron's package runs it within the default 256 MB app-container limit and runs PostgreSQL and Redis separately |
|---|---|
| RAM — what it really needs | 2 GB for Forgejo plus PostgreSQL on one box for a 5–20 person team. CI builds need their own machine |
| CPU | 2 vCPU for the forge. Actions jobs run on runners, which you size separately |
| Disk | Repositories, LFS objects, release attachments and packages grow without limit; the database stays small. Watch the repository storage. |
| Monthly cost | $6–12/mo for a 5–20 user instance on a 2 GB VPS, plus a separate runner box if you use Actions |
| Setup time | 30 minutes with docker compose; an afternoon once you add SSH, TLS and an Actions runner |
| How you install it | The codeberg.org/forgejo/forgejo image (root or rootless) via docker compose, or the single binary under systemd. It uses SQLite unless you configure PostgreSQL or MySQL with FORGEJO__database__ variables. |
| Ongoing maintenance | A new major version every quarter. Stable majors get about three and a half months of fixes; the yearly LTS gets 15 months (v15 LTS runs to 15 July 2027). The docs require a full backup before each stable upgrade. |
| Where it stops scaling | One small box carries a small-to-mid team. CI capacity runs out first, and you add more by attaching more runner machines. One runner can serve many repositories or instances. |
The thing that catches people out
Forgejo ships a new major version every quarter, and non-LTS majors get fixes for barely more than three months (v16.0: 16 July to 29 October 2026). Following the latest stable means a major upgrade every quarter. The docs say each jump from X to X+1 needs a manual step and human checking, with a full backup first. There is no downgrade: Forgejo refuses to start on an older version. Pin the LTS tag (15 today) and plan one major upgrade a year. If you are coming from Gitea, only versions up to 1.22 migrate.
When not to self-host Forgejo
You rely on GitHub-hosted runners, Codespaces or public GitHub's network effect, or nobody will own the upgrades. If your code is open source, Codeberg runs Forgejo for you; otherwise stay on GitHub.
Every guide here carries this section. A site that only ever tells you to self-host is selling something — the useful answer is sometimes no.
Other Layer 5 self-hosting guides
- Self-hosting LibreOffice2 GB with a large spreadsheet open
- Self-hosting ONLYOFFICE6 GB for the Document Server with a handful of concurrent editors
- Self-hosting Collabora Online4 GB, and roughly 1 GB per 20 concurrent documents
- Self-hosting CryptPad2 GB for a small instance
- Self-hosting Mattermost4 GB for a team of 50 with PostgreSQL on the same box
- Self-hosting Rocket.Chat6 GB with MongoDB on the same machine
Common questions
- How much RAM does Forgejo actually need?
- 2 GB for Forgejo plus PostgreSQL on one box for a 5–20 person team. CI builds need their own machine in practice. The documented minimum is Not stated by the vendor. Cloudron's package runs it within the default 256 MB app-container limit and runs PostgreSQL and Redis separately, which is the figure at which the process starts rather than the figure at which it works under real use. 2 vCPU for the forge. Actions jobs run on runners, which you size separately alongside it.
- What does self-hosting Forgejo cost per month?
- $6–12/mo for a 5–20 user instance on a 2 GB VPS, plus a separate runner box if you use Actions This is commodity VPS pricing and excludes your time, which is the larger cost for most people — budget for a new major version every quarter. Stable majors get about three and a half months of fixes; the yearly LTS gets 15 months (v15 LTS runs to 15 July 2027). The docs require a full backup before each stable upgrade.
- How long does it take to set up Forgejo?
- 30 minutes with docker compose; an afternoon once you add SSH, TLS and an Actions runner, via The codeberg.org/forgejo/forgejo image (root or rootless) via docker compose, or the single binary under systemd. It uses SQLite unless you configure PostgreSQL or MySQL with FORGEJO__database__ variables..
- When should I NOT self-host Forgejo?
- You rely on GitHub-hosted runners, Codespaces or public GitHub's network effect, or nobody will own the upgrades. If your code is open source, Codeberg runs Forgejo for you; otherwise stay on GitHub.
- What is the most common mistake when self-hosting Forgejo?
- Forgejo ships a new major version every quarter, and non-LTS majors get fixes for barely more than three months (v16.0: 16 July to 29 October 2026). Following the latest stable means a major upgrade every quarter. The docs say each jump from X to X+1 needs a manual step and human checking, with a full backup first. There is no downgrade: Forgejo refuses to start on an older version. Pin the LTS tag (15 today) and plan one major upgrade a year. If you are coming from Gitea, only versions up to 1.22 migrate.