logoalt Hacker News

xrdtoday at 3:07 PM7 repliesview on HN

I've been messing around with GitLab as a self hosted alternative for a few years. I do like it, but it is resource intensive!

For the past few days I've been playing with Forgejo (from the Codeberg people). It is fantastic.

The biggest difference is memory usage. GitLab is Ruby on Rails and over a dozen services (gitlab itself, then nginx, postgrest, prometheus, etc). Forgejo is written in go and is a single binary.

I have been running GitLab for several years (for my own personal use only!) and it regularly slowly starts to use up the entirety of the RAM on a 16GB VM. I have only been playing with Forgejo for a few days, but I am using only 300MB of the 8 GB of RAM I allocated, and that machine is running both the server and a runner (it is idle but...).

I'm really excited about Forgejo and dumping GitLab. The biggest difference I can see if that Forgejo does not have GraphQL support, but the REST API seems, at first glance, to be fine.

EDIT: I don't really understand the difference between gitea and forgejo. Can anyone explain? I see lots of directories inside the forgejo volume when I run using podman that clearly indicate they are the same under the hood in many ways.

EDIT 2: Looks like forgejo is a soft fork in 2022 when there were some weird things that happened to governance of the gitea project: https://forgejo.org/compare-to-gitea/#why-was-forgejo-create...


Replies

isodevtoday at 4:14 PM

> I'm really excited about Forgejo

Our product studio with currently around 50 users who need daily git access moved to a self hosted forgejo nearly 2 years ago.

I really can’t overstate the positive effects of this transition. Forgejo is a really straightforward Go service with very manageable mental model for storage and config. It’s been easy and cheap to host and maintain, our team has contributed multiple bugfixes and improvements and we’ve built a lot of internal tooling around forgejo which otherwise would’ve required a much more elaborate (and slow) integration with GitHub.

Our main instance is hosted on premise, so even in the extremely rare event of our internet connection going offline, our development and CI workflows remain unaffected (Forgejo is also a registry/store for most package managers so we also cache our dependencies and docker images).

show 1 reply
IgorPartolatoday at 6:10 PM

What exactly is the advantage of running something like GitLab vs what I do which is just a server with SSH and a file system? To create a new repo I do:

  ssh example.com ‘mkdir repos/my-proj.git && cd repos/my-proj.git && git init —bare .’
Then I just set my remote origin URL to example.com:repos/my-proj.git

The filesystem on example.com is backed up daily. Since I do not need to send myself pull requests for personal projects and track my own TODOs and issues via TODO.md, what exactly am I missing? I have been using GitHub for open source projects and work for years but for projects where I am the only author, why would I need a UI besides git and my code editor of choice?

show 5 replies
homebrewertoday at 3:20 PM

Ease of maintenance is an even bigger difference. We've been using gitea for a bit over five years now, and gitlab for a few years before that, and gitea requires no maintenance in comparison. Upgrades come down to pulling the new version and restarting the daemon, and take just a few seconds. It's definitely the best solution for self-hosters who want to spend as little time as possible on their infrastructure.

Backups are handled by zfs snapshots (like every other server).

We've also had at least 10× lower downtime compared to github over the same period of time, and whatever downtime we had was planned and always in the middle of the night. Always funny reading claims here that github has much better uptime than anything self-hosted from people who don't know any better. I usually don't even bother responding anymore.

show 3 replies
gchamonlivetoday at 3:58 PM

https://forgejo.org/docs/latest/user/actions/basic-concepts/

It's a shame that GitHub won the CI race by sheer force of popularity and it propagates its questionable design decisions. I wish more VCS platforms would base their CI systems on Gitlab, which is much much better than GitHub actions.

show 1 reply
zdwtoday at 3:51 PM

If you want even more minimal, Gerrit is structured as a Java app with no external dependencies like databases, and stores all it's configuration and runtime information on the filesystem, mostly as data structures in the git repos.

Shared filesystems is all you need to scale/replicate it, and it also makes the backup process quite simple.

show 2 replies
jmspringtoday at 5:09 PM

One concern the post brings up - single point of failure. Yes, in this case, blah blah big company microsoft blah blah (I don't disagree, but..). I'm more worried about places like Paypal/Google/etc banning than the beast from Redmond.

Self hosting, it's still a single point of failure and the article arguing "mirroring", well... it allows redundancy with reads but writes?

It's an interesting take on a purist problem.

show 2 replies
adamcharnocktoday at 3:25 PM

We've been looking at Forgejo too. Do you have any experience with Forgejo Actions you can share? That is one thing we are looking at with a little trepidation.

show 2 replies