When people see this title, a few questions usually come to mind: Why? What for? How? In this article I'll share my experience of building a self-hosted Git server, what pushed me to do it, and how you can set one up yourself.
Plenty of homelab owners run a Git server, but not everyone does. It isn't about complexity, it's about need. I work across development, cybersecurity, and DevOps, and I build many tools around my lab's needs. In that process, I built my own self-hosted Git server.
Why I Did It
I didn't do this because GitHub or GitLab are bad. I ran into a few practical problems:
Uptime
Privacy
Internet dependency
You might think: "Is that really enough reason to run your own server?" Fair question. For most people, occasional downtime is a minor annoyance. But if you need an uninterrupted connection, it's genuinely frustrating.
I experienced this firsthand. During a GitHub outage, I needed to pull and push a specific file for a project, and I couldn't reach my own code.…