I have been hosting my own Git service for many years now. It wasn’t until recently when I checked for an alternative that I started to realize. The one who’s starting to take over everything Git-related is called Gitea. Let’s start from the beginning.
The need for a self-hosted Git service
It started with a need to store my personal notes. Even if most notes probably can be public I sometimes writes personal ones that I don’t want to have public. It makes me at peace knowing that if I want to make it public it’s an action rather than the default.
I like to be portable and not dependant on any note-taking app that would lock me in. So that I can easily migrate to any future alternatives if wanted. As an Emacs user the natural choice was org-files in a org-folder. Then I can just use that folder as the repo and I’m done.
I considered using Github to have personal notes in a private repo. But the thought of letting Github have all my notes didn’t felt well. Even if the label shows “Private repo” there’s nothing stopping Github from using my notes for other purposes. Who knows what usages they will find for my notes. I don’t want to find out, as long as they never been there they can never be used. The need of a self-hosted Git service was born.
How Gogs was almost perfect
When I started many years ago I did some research and came across Gogs. Others such as Gitlab and Gitea looked overkill, especially Gitlab that felt like adding a lesser cloud hosting provider to my hosting. Gitea had a lot of features that I really didn’t need (if I only knew) so the choice fell on Gogs. I was happy with Gogs for many years. It has all the features you can wish for a personal Git service, but as time would tell it started to show it’s black spots.
I recently wanted to migrate to a new Postgres cluster for my self-hosted databases. It caused problems since Gogs didn’t seem to support my new and shiny Postgres 14 instance. I searched for a solution and found an issue that the maintainer is testing for Postgres 11 & 12 and it’s unable to initalize with Postgres 13 with last reply in 2020. So I figured there’s no need to be all excited that will change anytime soon. Another example is when I wanted to use a PAT token to authenticate via HTTP (since I’m using 2FA) and found that the token is supposed to be sent via the username. From a security perspective this was far from optimal to say the least (to Gogs credit it seems the issue got a merged PR recently). It made me question if it’s really a good idea to stay with Gogs and a single maintainer.
For clearance, I don’t want to rant too much about Gogs. It’s a fantastic project and I’m very grateful for it. I’m giving big credits to the creator and all the contributors that made it happen, Gogs is truly amazing. It’s, in fact, because of Gogs that Gitea was possible in the first place.
The rise of power
Ever since I first started with Gogs I always had my eyes on Gitea. I got nudged by it in many ways. I found that it has it’s own Android client on f-droid. There was a Hacker News thread related to self-hosting Git and it was overwhelmingly suggesting Gitea. But the big thing that put the needle in the coffin was that Codeberg.org, was powered by Gitea.
Let’s talk a bit about Codeberg. For many years Github has been the number one go-to place for hosting open-source code. It still is. But there’s a problem, Github is not very privacy friendly and it’s run by a for-profit company. Even though Microsoft has done a pretty good job keeping Github a great place for it’s users, sooner or later they will leverage it’s power for profit. Copilot is one of the first eyebrow-raisers recently, I think this is just the beginning of what to expect of Github. Codeberg is a non-profit organisation that care for user’s privacy and runs by donations. They are a direct answer to Github’s weakness and there’s already many, projects, migrated. I think it’s safe to say that Codeberg has passed the hype and is here to stay.
Gitea has a lot going for it. It’s one of the best self-hosted Git services out there. It’s open-source and has a vibrant community around it. With recent additions such as Codeberg it gives good incentives that Gitea will live long and prosper. Will Gitea be able to take the crown from Github? At least I’ve made up my mind! I will start using Gitea as my new self-hosted Git service.