Open-source GitHub alternatives you can self-host

Gitea, Forgejo, GitLab CE, Gogs, OneDev, GitBucket and Sourcehut compared: features, licenses and self-hosting instead of paying for GitHub seats.

This guide contains advertising for blitz.cloud. Links to it are marked as ads.

GitHub charges per seat once you need private repositories, extra storage or more CI minutes, and every push still lives on someone else's servers. These seven tools cover the same ground, from git hosting and pull requests to full CI/CD pipelines, and you can run any of them yourself.

They split into two groups. Gitea, Forgejo, Gogs and GitBucket stay close to GitHub's own layout: a lightweight forge with issues and pull requests. GitLab Community Edition and OneDev add a full CI/CD pipeline and project-management tools on top, closer to GitHub plus a separate CI service bundled in. Sourcehut takes a different path again, built around email patches instead of a web-based pull request. The rest of this guide goes through each one.

Gitea

Gitea bundles git hosting, code review, a package registry and CI/CD (Gitea Actions, which reads the same workflow syntax as GitHub Actions) into one application. It is written in Go, ships as a single binary or Docker image, and is the most widely used self-hosted forge on this list.

It is MIT licensed, with about 59,160 GitHub stars by November 2026, and self-hosts with Docker Compose, a plain binary or Kubernetes. Gitea is also in the blitz.cloud App Store Ad, where it installs in one click, comes with HTTPS and is hosted in the EU. On the free plan there, an app sleeps after 30 minutes without a visitor; for a git server that also receives webhooks or CI triggers at odd hours, that is worth knowing before you rely on it for anything time-sensitive.

Forgejo

Forgejo began as a fork of Gitea in 2022 and now develops independently under a community-run governance model instead of a single company behind it. Feature-wise it still tracks close to Gitea: git hosting, pull requests, issues, packages and Actions-compatible CI.

It is MIT licensed and self-hosts with Docker or a binary. Forgejo's primary repository lives on Codeberg rather than GitHub, so a GitHub star count would not reflect its real community size; we leave it out rather than guess. Forgejo is also in the blitz.cloud App Store Ad with the same one-click install and EU hosting as Gitea, and the same 30-minute free-plan sleep applies.

GitLab Community Edition

GitLab CE is the most complete tool on this list: git hosting, issues, merge requests, a built-in container registry and a CI/CD pipeline runner that handles more complex build and deploy workflows than GitHub Actions out of the box. It is the closest match if you want to replace GitHub and a separate CI service at the same time.

The core is released under MIT, though GitLab also sells Premium and Ultimate tiers with extra features layered on top of the free Community Edition, an open-core model like a few other tools in this space. It had about 7,175 GitHub stars for the CE repository by November 2026, and self-hosts with Docker, a Linux package or a Helm chart. It is also the heaviest to run of the seven: GitLab's own hardware guidance names 8 CPU cores and 16 GB of memory as the baseline for a single-node install, though it says a small instance can run with as little as 8 GB.

Gogs

Gogs is the project Gitea itself forked from in 2016, and it stays deliberately minimal: git hosting, issues and pull requests, written in Go, with no CI/CD or package registry built in. That makes it the lightest tool here to run, at the cost of needing a separate CI service if you want automated builds.

It is MIT licensed, with about 47,950 GitHub stars by November 2026, and self-hosts with Docker, a binary or even a Raspberry Pi build. Development moves slower than Gitea's; check the release date before counting on a specific fix landing soon.

OneDev

OneDev packages git hosting, issue tracking with Kanban boards, pull requests and a visual CI/CD pipeline editor into one application, aimed at a small team that wants one tool instead of stitching GitHub and a separate CI service together. It also offers optional AI agent integration for working through issues and fixing failing builds.

It is MIT licensed, with about 15,370 GitHub stars by November 2026, and self-hosts with Docker or Kubernetes; the project advertises running on a single CPU core and 2 GB of memory for a medium-sized team.

GitBucket

GitBucket runs on the JVM and aims for GitHub API compatibility, so existing tools built against GitHub's API often work against it with a different base URL. It covers repositories, issues, pull requests and a wiki, and a plugin system covers most of what it leaves out.

It is Apache-2.0 licensed, with about 9,420 GitHub stars by November 2026. Self-hosting is unusually simple: download the WAR file from its GitHub releases and run java -jar gitbucket.war, with no Docker or database setup needed for a first try.

Sourcehut

Sourcehut is the odd one out here: instead of a web-based pull request, patches travel by email through git send-email, alongside git and Mercurial hosting, CI across several Linux distributions and BSDs, mailing lists and a ticket tracker. It is built deliberately without JavaScript and without AI features.

It is GPL-2.0 licensed. Self-hosting is possible and documented, but it ships as a collection of independent services rather than one Docker Compose file, which makes it more work to set up than the other six tools here. It fits people who already work the email-patch way, not a drop-in replacement for a team used to reviewing pull requests in a browser.

How they compare

ToolBest forLicenseSelf-host withStars (Nov 2026)
Giteafull-featured forge, least setupMITDocker, binary, K8s~59,160
Forgejocommunity governance, same features as GiteaMITDocker, binarynot on GitHub
GitLab CEreplacing GitHub and a CI service togetherMIT (core)Docker, Linux package, Helm~7,175
Gogslightest resource footprintMITDocker, binary~47,950
OneDevbuilt-in CI/CD without GitLab's overheadMITDocker, K8s~15,370
GitBucketGitHub API compatibilityApache-2.0Single jar~9,420
Sourcehutemail-based patch workflowGPL-2.0Several servicesnot on GitHub

Which one to pick

If you want the closest match to GitHub's own look and feel with the least setup, Gitea and Forgejo cover git hosting, issues and Actions-compatible CI, and both install in one click on blitz.cloud. Pick GitLab CE if you also want to replace a separate CI/CD service and have the memory to spare. Gogs is the lightest option if you only need git hosting and pull requests. OneDev suits a small team that wants CI/CD built in without GitLab's overhead. GitBucket is worth a look if something you already run depends on GitHub's API. Sourcehut is for a team happy to work by email rather than pull requests.

FAQ

Is any of these as polished as GitHub?

Gitea and GitLab CE come closest in day-to-day feel. The others focus on a narrower feature set and show it in a less refined interface, though all seven cover the basics of hosting git repositories and reviewing code.

Can I import my existing GitHub repos and issues?

Gitea, Forgejo, GitLab CE and GitBucket can clone your repositories directly over git with no conversion needed. Issues and pull requests do not migrate automatically; moving them means exporting from GitHub's API and importing with each tool's own API or a community migration script.

Do I need my own server to run these?

You need something that can run Docker, a binary, or in GitBucket's case a Java runtime: your own machine, a VPS, or a managed host. Gitea and Forgejo are both in the blitz.cloud App Store and install with one click; the other five you set up yourself.

Are they actively maintained?

Gitea, GitLab CE, Gogs, OneDev and GitBucket all had commits or releases within the past month as of November 2026. Forgejo and Sourcehut remain in active use too, though their primary repositories sit outside GitHub, which is why this guide does not quote a GitHub release date for them.

Do these support GitHub Actions workflows?

Gitea and Forgejo run their own Actions implementation that reads the same YAML syntax as GitHub Actions, so many existing workflow files work with little change. GitLab and OneDev use their own pipeline formats instead, which means rewriting your CI configuration.