SELF-HOSTED WEEKLY  ·  FORGEJO  ·  HEADSCALE  ·  DOCMOST  ·  VAULTWARDEN  ·  TESTED MIGRATION GUIDES  ·  2026 EDITION  ·  MAP YOUR STACK  ·  SELF-HOSTED WEEKLY  ·  FORGEJO  ·  HEADSCALE  ·  DOCMOST  ·  VAULTWARDEN  ·  TESTED MIGRATION GUIDES  ·  2026 EDITION  ·  MAP YOUR STACK  · 
NODATOOLS
Home/Blog/7 Best Self-Hosted Git Alternatives to GitHub in 2026 (Tested)
Trending Topic

7 Best Self-Hosted Git Alternatives to GitHub in 2026 (Tested)

Tested 7 self-hosted Git alternatives to GitHub — Forgejo, Gitea, GitLab CE, Codeberg, OneDev, Gogs, Sourcehut. Real install time, RAM use, and which one fits your team in 2026.

10 min readMay 8, 2026

According to Red Squares, GitHub had 32.5 days of partial or full outages in 2025. That's nearly a month of "the build server is down because someone else's vendor is down."

Search interest for gitlab self hosted is up +100% in the past week, gitea up +140%, forgejo up +90%. People are tired of depending on a single vendor's status page for their daily code work.

I spent a week testing the 7 most-mentioned self-hosted Git options in 2026, with one rule: install on a fresh $5/month VPS and time everything. Here's what's actually worth the migration.

Quick answer: For most small-to-medium teams, Forgejo is now the default choice — it's a Gitea fork with stronger community governance, runs in 256 MB of RAM, and installs in 4 minutes via Docker. Gitea is fine if you don't care about the governance dispute. GitLab CE is the right call if you need built-in CI and have at least 4 GB of RAM to spare.


Test Setup

I used a fresh Hetzner CX22 VPS (2 vCPU, 4 GB RAM, $5/month — referral link) with Ubuntu 24.04 LTS and Docker installed. Each tool was installed clean, then tested with:

  • A 50 MB repo push (sample Next.js project with full git history)
  • 5 concurrent users browsing the web UI
  • One scheduled CI build (where the tool supports it)
  • 24 hours of idle to measure RAM creep

For each tool I tracked: install time (from docker compose up to first login), idle RAM, active RAM under load, and time to first push.


Comparison Table

ToolInstallIdle RAMActive RAMBuilt-in CIBest For
Forgejo4 min180 MB320 MB✅ Forgejo ActionsMost teams in 2026
Gitea4 min200 MB350 MB✅ Gitea ActionsExisting Gitea users
GitLab CE18 min2.6 GB4.1 GB✅ GitLab CITeams that need CI/CD
Codeberg0 min (hosted)✅ WoodpeckerFree open-source projects
OneDev6 min600 MB950 MB✅ Built-inSmall teams that hate YAML
Gogs3 min110 MB180 MB❌ External onlyResource-constrained boxes
Sourcehut30 min+800 MB1.2 GB✅ builds.sr.htEmail-driven workflows

The clear winners by install simplicity + resource efficiency: Forgejo, Gitea, Gogs. The clear winner by feature density: GitLab CE.


1. Forgejo — The Default Choice in 2026

Forgejo is a community-led fork of Gitea created in late 2022 after Gitea was transferred to a for-profit company. In 2025–2026, Forgejo became the version that Codeberg (the largest non-profit Git host) ships, which has accelerated its adoption.

What's good:

  • Identical UX to Gitea — if you've used either, you know both
  • Forgejo Actions is GitHub Actions-compatible (.forgejo/workflows/*.yml) — most existing GitHub Actions workflows run unchanged
  • Governance is held by Codeberg e.V., a non-profit, so the "rug pull" risk is structurally lower than Gitea
  • Default Docker compose runs in 256 MB of RAM after first launch

What's not:

  • The marketing page is much less polished than GitLab's, which makes it a hard sell to non-technical decision-makers
  • Mobile UI is functional but not great
  • No built-in container registry (you bridge to a separate registry — harbor or distribution work fine)

Install:

curl -L https://codeberg.org/forgejo/forgejo/raw/branch/forgejo/docker/docker-compose.yml -o docker-compose.yml
docker compose up -d
# Visit http://your-server:3000, finish the web installer

Total time from blank server to first repo push: ~4 minutes in my test.

Verdict: ⭐ For most small-to-medium teams in 2026, this is the right answer. The Forgejo-vs-Gitea debate matters less for the code than for the governance — if you care that the maintainers won't switch the license out from under you, pick Forgejo.


2. Gitea — Still Solid, But the Trust Story Changed

Gitea is the original — Forgejo is a fork. The codebase is now run by Gitea Ltd., a for-profit registered in Hong Kong. Functionally, Gitea and Forgejo are still 95% identical in 2026.

What's good:

  • Larger ecosystem of plugins and integrations (it's been around longer)
  • Gitea Cloud (their hosted offering) is a real option if you want self-host or hosted from the same vendor
  • Documentation is more polished

What's not:

  • The for-profit transition in 2022 caused a major community split; some maintainers left, the trust never fully recovered
  • The license is still MIT, but governance is concentrated
  • Most "best self-hosted Git" lists still default to Gitea out of habit; the actual recommendation in indie circles has been shifting

Verdict: Pick Gitea if you're already running it and migration cost is real. Pick Forgejo for new installs. The technical difference is minimal; the governance difference is real.


3. GitLab Community Edition — Worth It Only If You Need Built-in CI

GitLab CE is the heavyweight option. It's the same codebase as gitlab.com, minus the proprietary "premium" features. Installs as an all-in-one Omnibus package or via Docker.

What's good:

  • Built-in GitLab CI is genuinely the best self-hosted CI on the market — .gitlab-ci.yml is more expressive than GitHub Actions
  • Built-in container registry, package registry, issue boards, wiki, and pages
  • Full LDAP / SAML / OIDC support out of the box

What's not:

  • 2.6 GB idle RAM in my test, 4.1 GB under modest load. You cannot run this on a $5 VPS
  • Update process is its own DevOps project — Omnibus upgrades have broken in production for me twice
  • Web UI is heavy; on slow connections the dashboard takes 4–6 seconds to load

Cost reality: the smallest VPS that runs GitLab CE comfortably is ~$20/month (Hetzner CX32 or equivalent). Add backup storage, that's $25–30/month minimum.

Verdict: Worth it only if you genuinely need CI and don't want to glue separate tools together. For pure repo hosting, this is overkill.


4. Codeberg — The Easy Mode

Not technically self-hosted — Codeberg is a free Forgejo instance run by the Codeberg e.V. non-profit in Germany. For open-source projects, this might be the best option full stop.

What's good:

  • Zero install. Zero maintenance. Push, pull, browse, done
  • Codeberg uses Forgejo, so your code is portable: if Codeberg ever shuts down, you can migrate to a self-hosted Forgejo and your URL structure is identical
  • Woodpecker CI is integrated and free for OSS

What's not:

  • Only for open-source projects (commercial / private repos not allowed on the free tier)
  • No SLA, donation-funded, occasional brief downtime
  • German privacy and content policies apply

Verdict: If your project is open source, start here. You can always migrate to self-hosted Forgejo later if you outgrow it — same software, same URLs.


5. OneDev — The "I Hate Configuring CI" Pick

OneDev is a less well-known option that includes a Git server, issues, code review, and a built-in CI/CD system that doesn't require you to write YAML files. CI is configured through the web UI.

What's good:

  • Built-in CI configured via web UI, not YAML — genuinely faster for simple pipelines
  • Pull request / code review workflow is closer to GitHub's than Gitea/Forgejo's
  • Single Java JAR, simple to deploy

What's not:

  • Smaller community, fewer integrations
  • Java-based, so the 600 MB idle RAM is unavoidable
  • Documentation is functional but sparse compared to GitLab or Gitea

Verdict: A real option if your team includes non-DevOps people who do code review. Niche but well-built.


6. Gogs — The Lightweight Option

Gogs is the project Gitea originally forked from in 2016. Development has slowed, but it's still actively maintained and is the absolute lightest option in this list.

What's good:

  • 110 MB idle RAM — runs on a $3/month nanoserver
  • Single Go binary, no Docker required if you don't want it
  • Boring and stable — fewer breaking changes between versions

What's not:

  • Feature gap is widening compared to Gitea / Forgejo (no built-in Actions, weaker pull request UI)
  • Maintainer activity is roughly 1/10 of Gitea's

Verdict: Pick Gogs if your hardware is genuinely tiny (a Raspberry Pi 3, an old laptop) and you don't need built-in CI.


7. Sourcehut — The "Email-Driven" Outlier

Sourcehut (sr.ht) is a different philosophy: every interaction is via Git, mailing lists, and a CLI. No drag-and-drop, no notifications. The hosted version costs $2–10/month; the self-hosted version is open source.

What's good:

  • Email-driven patches feel oddly clean once you're in the rhythm
  • builds.sr.ht is a serious CI platform (used by major OSS projects)
  • The maintainer (Drew DeVault) writes clearly about long-term technical decisions

What's not:

  • Self-hosting requires deploying ~10 separate microservices — this is a real DevOps project
  • The UX is intentionally hostile to people who want a GitHub clone
  • Not the right answer for most teams

Verdict: Skip unless your team is already comfortable with git send-email and you have a DevOps person to maintain it.


Migration Cost Reality

Migrating away from GitHub takes 2–4 hours per repo if you do it carefully:

  • Push the bare clone to your new server (git push --mirror) — 5 minutes per repo
  • Update CI/CD to point to the new remote — 30 minutes if you used GitHub Actions extensively
  • Update docs, contributor guides, badges — 30 minutes
  • Update local clones for every team member — depends on team size
  • Notify external contributors (if open source) — variable

If you have 10 active repos, plan for a weekend. If you have 100, plan for a month and pick which to migrate first based on activity.


Hosting Recommendations

For self-hosted Git, you want a stable VPS with good network and predictable pricing:

  • Hetzner Cloud (referral link) — CX22 ($5/mo, 2 vCPU 4 GB) is enough for Forgejo / Gitea with a small team. CX32 ($10/mo) is the comfortable floor for GitLab CE.
  • Hostinger VPS — slightly cheaper than Hetzner for entry tiers, support is faster
  • Your own home server — for OSS or personal use, a Raspberry Pi 5 or used Intel NUC works fine for Gitea/Forgejo with backup pushed to S3-compatible storage

The companion site NODA.PICS runs the same way — a home GPU + Cloudflare R2 for storage. The architecture is public and identical to what you'd use for self-hosted Git: cheap VPS or home box, persistent volume, off-site backup.


The Bottom Line

  • If you want the best balance of features, governance, and resource cost: Forgejo
  • If you want the absolute most polished Git server with built-in CI and have $20/mo for hosting: GitLab CE
  • If you only host open-source projects: Codeberg (it's just hosted Forgejo)
  • If you have a Raspberry Pi: Gogs
  • If you're already running Gitea and migration is expensive: keep Gitea, no rush
  • If you're committed to email-driven workflows: Sourcehut, but you already knew that

The whole "self-hosted Git" search trend is up +100–140% because GitHub had a rough 2025 and AI-assisted coding tools made teams realize how much of their workflow depends on a single vendor's uptime. The migration is annoying but reversible, and the operational cost is genuinely low — a $5 VPS handles most teams under 20 people.

If you're ready to start, Forgejo + Hetzner CX22 + a weekly rclone backup to Cloudflare R2 is the path of least resistance. Total monthly cost: about $5.50.

#self-hosted git#github alternatives#forgejo#gitea#gitlab self hosted#open source#devops