How much RAM does Forgejo need?
Self-hosted Git service with code hosting, issues, pull requests and CI, a community-run fork of Gitea. Official requirements, sourced, plus our own measurements.
Last updated: 2026-11-26
Pinned version: Forgejo 17.0.2 (codeberg.org/forgejo/forgejo:17.0.2@sha256:879f4f10a98e)
Our measurement
142 MB idle RAM · 315 MB disk (images 292 + data 23) · forgejo 142 MiB (single container, SQLite)
Official Docker Compose example from the Forgejo docs (SQLite) with the image tag pinned to 17.0.2 instead of 17. Ports were published on localhost only. The install page was submitted with its default values plus one admin account; no repositories. The data folder held about 3 MB at idle.
Method: Official compose file with the image tag replaced by an exact version (never the floating 17 tag). Measured about 10 minutes after setup as docker stats MEM USAGE (MiB), 3 samples 20 s apart (median). Disk = pulled image size (docker reports 292 MB) + the data folder after the load test (23 MB).
Host: 8 vCPU Intel Xeon VM, 16 GB RAM, Debian 13 (kernel 6.12), Docker 29.10.0 + Compose 5.8.0
Version: Forgejo 17.0.2 (codeberg.org/forgejo/forgejo:17.0.2@sha256:879f4f10a98e) · Compose: source · Date: 2026-11-26
With sample data
236 MB idle RAM · 315 MB disk · forgejo 297 MiB peak, 236 MiB settled (single container)
Peak RAM during processing: 297 MB
Sample: One repository created through the API, then the main branch of the public psf/requests Git repository (6,496 commits, 52 MB) pushed over HTTP, 10 issues created, and 15 pages browsed 3 times each (files, blame, commits, graph, code search, compare, zip download), followed by a full clone.
Peak RAM during the push and browsing was 284 MiB. The compare page returned 404 in that first pass because the release tags had not been pushed, so after pushing the tags we requested it 3 more times (HTTP 200), and the peak of that second pass was 297 MiB, which is the figure shown. Four minutes after the first pass RAM had settled at 236 MiB, higher than the empty install because of caches. Disk was about 315 MB (image 292 + data 23). The repository is the same project we used for the Gitea test, but it has grown since, so the two loads are similar but not identical.
Method: Same official setup and host as the idle measurement. Peak RAM sampled about every 2 seconds (docker stats) for 4 minutes from just before the repository was created, plus a 60 second pass for the compare page. Settled RAM = 3 samples 20 s apart, 4 minutes after that (median).
Version: Forgejo 17.0.2 (codeberg.org/forgejo/forgejo:17.0.2) · Date: 2026-11-26
Compare
What the official docs say
- The official docs do not state a minimum or recommended amount of RAM or CPU.
- The official Docker page gives a Compose example with a single container that uses SQLite by default, publishes ports 3000 (web) and 222 (SSH), and keeps everything in one data folder. MySQL and PostgreSQL examples are shown too.
- The recommendations page says SQLite suits low to moderate activity and can go a long way in the early years of an instance, and suggests MySQL or PostgreSQL for high activity.
- For a small instance the docs suggest switching the cache to a size-limited setting, because the default cache keeps up to 50,000 items for 16 hours and is not memory efficient.
Fits a 4GB server?
yesMeasured 142 MiB idle RAM after setup, and a 297 MiB peak while pushing a 6,496-commit repository and browsing it. Using the peak, plus 512 MB for the OS and 30% headroom, that is about 1.1 GB, so it fits 4 GB with plenty of room for other apps. The docs state no RAM requirement, and a busy instance with many users or large repositories will use more.
Sources
- Forgejo docs: Installation with Docker checked 2026-11-26
- Forgejo docs: Installation checked 2026-11-26
- Forgejo docs: Installation from binary checked 2026-11-26
- Forgejo docs: Recommended settings and tips checked 2026-11-26
- Forgejo v17.0.2 release checked 2026-11-26