What git server for a homelabber?

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

piranha32

Active Member
Mar 4, 2023
250
180
43
I'm thinking about setting up a small self-hosted git server for my private projects, where I can store all kinds of projects (software, documents, and other projects, completely not related to software development). I would like to have easy access via web interface to revision history and commits, issue tracker is a plus, but not necessary. Would be nice to have multiple users, with access control. I'm not planning to use CI/CD or code review capabilities.
Should fit in one or a few docker containers, and not require a dedicated VM just to start. Data should be easy to back up using command line tools, easy to automate (so no "click here to create a backup" mechanisms).

I looked at gogs, gitea, and gitlab.
Gogs looks nice, is easy to set up, does pretty much everything I want, but has a small community and is developed by a tiny team.
Gitlab is very well known, uses postgres as a backend, but is kind of big for what I need.
Gitea is much lighter than gitlab, is fully open source, but also less popular.

What would be your preference? Are here any other servers worth considering?
 

kpfleming

Active Member
Dec 28, 2021
392
205
43
Pelham NY USA
I have been using Gitea for ~3 years and have been happy with it; I use it only for repository hosting and issue tracking, but none of the other stuff. The dev team became a for-profit company last year IIRC, and there's concern that the development will start skewing towards non-free/non-open features... and that resulted in a fork called Forgejo. I have not had time to look at that yet, but lots of people have switched over.
 
  • Like
Reactions: piranha32

cageek

Active Member
Jun 22, 2018
94
106
33
I've been using gitea for a few years. It is quite lightweight, and extensively customizable.

A number of years ago, when I was doing a search for a server/web interface, I tried gitlab and it really seemed to want to take over an entire machine. It would have required a large commitment.
 
  • Like
Reactions: piranha32

oneplane

Well-Known Member
Jul 23, 2021
846
484
63
If you want integrated CI/CD, GitLab, otherwise, Gitea. Either way, make sure you don't put it on the internet, only behind an IAP or VPN server.

Both fit in a container or a VM so isolation-wise it doesn't matter much.
 

sko

Active Member
Jun 11, 2021
249
131
43
Gitlab has become absolute bloatware and constantly changes the UI (instead of fixing 5+ year old bugs...). Updating has all kinds of pitfalls and needs to be done regularly, as they constantly push out new versions and there is no proper "stable" or "lts" branch. Bigger version jumps (sometimes even for dot-releases) are explicitly not supported - if you lag behind too much you might end up having to re-install and migrate all repositories manually (been there...). Updates also need a bunch of manual steps for migrations and installing/updating dependencies past the package management it drags in from various sources.
It also poses a constant, noticeable load on the server as there are always a bunch of ruby scripts running and doing whatever they think needs to be done every few seconds. So you'll get some CPU load (and power consumption) spikes every ~10-30 seconds even if theres absolutely no user logged in and repositories aren't changed.
The main (only) reason I haven't dumped it at work is, that I made heavy use of the folders/projects hierarchy to group repositories and manage access for various hosts.


At home I run gitea - its MUCH more lightweight and sane and usually won't need any additional manual labour or any rubber-chicken-waving for updates other than just upgrading from the package repository and restarting the service. It also doesn't pull in loads of stuff past the package management which might leave outdated and orphaned files/libraries on the system.
For personal use there's everything I need - the only thing I do miss sometimes are the folders/projects to better categorize some repositories, but that's not a huge deal.



TL;DR: if you want a sane, lightweight solution that has everything you need for a private git server, just use gitea.
 
  • Like
Reactions: piranha32

oneplane

Well-Known Member
Jul 23, 2021
846
484
63
I disagree with all the GitLab bad, bloat boo. You can install it isolated using just the APT repo which makes everything pretty much automatic.
The omnibus package (and docker images if you wanted to use that instead) includes everything out of the box, no additional installation required.

The only thing you have to do after the initial installation is edit the configuration file so it is setup correctly for your domain (if you use one).

Is GitLab as 'light' as Gitea? Hell no. But it also comes with a lot of features you just don't get with Gitea. In some cases (if you just want git), Gitea itself is overkill as you don't need a webgui to use git, you just need git. If you want some sort of multi-user git, you can even get this with something super simple as GitHub - sitaramc/gitolite: Hosting git repositories -- Gitolite allows you to setup git hosting on a central server, with very fine-grained access control and many (many!) more powerful features.

If we're talking about 'what is the best git' (which is a bit of an odd statement in itself), the only true answer is "it depends". For most usages I'd suggest not self-hosting it, especially when you want outside access or share it with others. And due to the distributed nature, you shouldn't have to worry about 'what if the evil hosting company self-distructs?' because there's nothing on the hosting side that you can't have locally.
 
  • Like
Reactions: piranha32

piranha32

Active Member
Mar 4, 2023
250
180
43
Thanks for all the responses.
I'm testing gitea with postgres (which I already use for other applications), and it seems to be exactly what I've been looking for. It's light, fast, and easy to install.
The server will be mainly for internal use; I may open it for selected users outside, but only via proxy, with strong browser and user authentication using certificates, and maybe 2FA.
Now I can move all my repos from SVN, which I've been using for almost 20 years, to a bit more modern VCS.
 
  • Like
Reactions: oneplane