Skip to content
Code hosting · alternatives

Best Self-Hosted Alternatives to GitHub

prices verified

GitHub's free tier is genuinely excellent, and pretending otherwise would be dishonest: unlimited private repositories, Actions minutes, Pages, package hosting, and a collaborator pool that already has an account. People self-host anyway for reasons that have little to do with the bill — code that should not leave the building, a policy or jurisdiction that requires it, or simply not wanting the record of everything they build to sit under one company's terms of service. The forges below run exactly the same Git on a server you control, most of them on a box small enough that the server is the only cost.

GitHub costs about $48/year and keeps your data on its servers. These researched, open-source alternatives give you the same workflow on hardware you own — here's what each needs to run.

The short answer
The familiar forge, on a small box
Giteapull requests, issues and a built-in Actions runner in one container that is happy on 512 MB — the default swap for most people leaving GitHub.
The same shape, community-governed
Forgejoa community hard fork of Gitea stewarded by a nonprofit, near-identical to use and the pick when governance is part of why you are leaving.
The leanest forge here
Gogsthe older, simpler project Gitea forked from — repositories, issues, pull requests and webhooks at a documented 512 MB, with no CI runner inside.
You need the whole DevOps platform, not a forge
GitLab CEmerge requests, a CI/CD runner fleet, container and package registries and Pages in one install — and 8 GB of RAM as its constrained floor.
Code search and navigation built in
OneDevlanguage-aware symbol lookup at any commit plus GUI-configured CI/CD in one 2 GB container, with clustering and audit logging behind a subscription.
A GitHub-compatible REST API on the JVM
GitBucketa single Java WAR whose API compatibility is a stated project priority, so GitHub-targeted tooling often works against it unchanged.

The alternatives

What you give up by leaving GitHub

What you actually give up is the network, and it is the hardest part to replace. Your collaborators, reviewers and drive-by contributors already have GitHub accounts, your dependencies are hosted there, and the Actions your pipelines call live in its marketplace — none of that follows you to a private forge, and an open source project that moves off it will feel the drop in casual contributions immediately. You also give up hosted runners: GitHub's CI executes on machines somebody else sizes, patches and pays for, while a self-hosted runner is another box on your bill and in your patch cycle. And you become the durability story — repositories, issues, pull request history and the database under them are your backups now, restore-tested by you, and a forge nobody can reach is a team that cannot ship. The trade is worth taking when the code genuinely should not sit on someone else's server, when a policy says so, or when the forge is for a small team who will all have accounts regardless. It is not worth taking because GitHub's free tier stopped being generous, because it has not.

Head-to-head

Common questions

Are these GitHub alternatives really free?

The software is open-source and free to run. Your only cost is the server it runs on — often a few dollars a month, less than most SaaS subscriptions.

How much server do I need to self-host one?

Most of these run comfortably on a small VPS — 1–2 GB of RAM is enough for a single-user or small-team setup. Each app's page lists its minimum RAM.

Will I lose features by leaving GitHub?

It depends on the app. The alternatives below cover the core workflow; polish and integrations vary, so check each one's stack and difficulty before you commit.

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