Journal

Self-hosted GitLab instead of GitHub — why and how

GitHub is great. But there's one problem — it's not yours. When I decided to set up my own GitLab instance, I never looked back.

Why not GitHub?

GitHub is a Microsoft product. Your code, your pipelines, your data — all sitting on their servers, on their terms. As long as you don't hit the limits — it's fine. But those limits exist:

  • CI/CD: the free plan gives 2000 minutes per month on GitHub Actions. On self-hosted GitLab — zero limits, because the runner runs on your own server
  • Storage: limits on private repos, LFS limits, registry limits
  • Namespaces: popular project names are taken by other users
  • Privacy: Microsoft can see every commit, every pipeline, every secret in Actions

What does self-hosted GitLab give you?

I set up GitLab on my own VPS and I get:

  • Unlimited repos — private, public, as many as I want
  • Own CI/CD runner — no minute limits, pipelines run on my server
  • Own Docker Registryregistry.racis.dev instead of registry.gitlab.com or hub.docker.com
  • Own domaingit.racis.dev sounds better than github.com/username
  • Full control — backups, configuration, access — all mine

Mirror on GitHub

I didn't abandon GitHub completely — I use it as a mirror. The original repo lives on git.racis.dev, and GitHub gets an automatic push on every commit. This way projects are publicly visible on GitHub, but the code stays on my own infrastructure.

Is it worth it?

If you have your own server — absolutely. GitLab Community Edition is free and open source. The only cost is setup time and some RAM (GitLab needs ~4GB).

Independence from corporate limits is priceless — especially when you're building your own infrastructure and want full control over everything.