Why I Moved My Git to Self-Hosted Forgejo (and Kept GitHub as a Mirror)

·3 min read

I made self-hosted Forgejo the primary home for my git, and kept GitHub as a mirror so this site still builds the way it always has.

Forgejo logo

Forgejo logo by Caesar Schinas , CC BY-SA 4.0 .

Why

I want to own and maintain my own repos. GitHub is a free offering, and a free offering may or may not be there when I need it.

What’s good about having your own git server

  • The main copy is yours. Your code, history, issues and settings live on a server you control, not on someone else’s free tier.
  • Nobody else sets the rules. Pricing, limits and terms of service can change on a hosted platform. On your own server, they don’t change unless you change them.
  • Private stays private. You decide what’s public and what isn’t, without paying extra to keep a repo private and well protected.
  • You can still use GitHub. A mirror keeps a copy there, so anything that builds from GitHub keeps working, and it doubles as an off-site backup.
  • It’s a good homelab project. You learn how the pieces fit together, from the forge itself to the CI runners and backups.

The options I looked at

Grok Bot helped me compare them:

Option Project site What it’s like
Forgejo forgejo.org Lightweight, GitHub-style forge run under a nonprofit. My pick.
Gitea about.gitea.com Light, fast and capable, nearly the same features as Forgejo. Backed by a company that also sells an Enterprise edition.
GitLab CE about.gitlab.com The most complete, with CI, registries and planning built in. Far heavier than a homelab git server needs.
Gogs gogs.io The original lightweight Go git host that Gitea grew out of. Simple and small.
OneDev onedev.io All-in-one forge with its own built-in CI and package registries.
Sourcehut sourcehut.org A suite built around email-based patches and its own build system. A different way of working from GitHub’s.
Plain git over SSH git-scm.com About as simple as it gets, but you build the web view, CI and mirroring yourself.
GitHub github.com Excellent and free, which is exactly why I don’t want it as my only copy.

Why Forgejo

Forgejo started as a community fork of Gitea and is run under the nonprofit Codeberg e.V. . It’s lightweight, it feels familiar to anyone coming from GitHub, and it has mirroring, packages and its own Actions built in. It gave me what I wanted from a GitHub-style forge, on a server I control.

How it works now

I push to repo.ssnowden.com . Forgejo mirrors every commit to GitHub, and the site keeps building from there. Builds and nightly security scans run on a mini PC in my home lab .

My code lives with me now, and GitHub is the backup instead of the other way around.