Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

can anyone share what the benefit is over using a self hosted repository host over a service like github/gitlab? obviously you get more power over the interface & such but are there truly any gains over using the larger platforms?


A self hosted repository host gives you the ability to develop software projects without giving up privacy or locking you into a service you don't control.


Aside from the whole self hosting ethos, if you are hosting it from a home server and you are the primary user, you will get a nice performance boost. Downloading binaries, cloning repositories will be instant. If you use CI, it will be running on an actual machine rather than 10% of some 2GHz cloud CPU.

I regularly have to upload multi GB images to a VPS and it's very annoying when it takes like 10 minutes.


Two self hosting tips:

If you're going to use SQLite, make sure you enable the WAL mode on the database. It makes such a huge difference to performance that I don't know why it isn't the default.

If you're going to have multiple concurrent users (or even just one user but a large number of background writing jobs, such as mirroring public repositories), then seriously consider using Postgres. Yes, theoretically it's possible to make SQLite backed applications work fine in this scenario, but Gogs/Gitea/Forgejo has not designed their application like that, so it falls over at surprisingly small sizes and migrating after the fact is painful.


It's very useful for companies - more control, don't have to host your code externally, and you don't have to pay (well, ish; we ended up paying for Gitlab Premium, but that doesn't exist for Forgejo).


From the top of my head with dozens of others:

- Not all projects are suitable for hosting by third parties (you may not want to give away the special sauce behind your wannabe next trillion dollar company, or you may be handling sensitive or confidential data like medical records, etc)

- You are immune to the trending process recently referred to as enshittification that consists of providers in a consolidated market like this one giving you an increasingly worse experience to compel you into more expensive plans, i.e. you gain independence and control

- It might be a competitive advantage to your business to still have the lights on when inevitably the centralised platform becomes unavailable to most (think of trading and events like crowdstrike)


You just have to pay for the hardware instead of going onto crazy expensive fee schemes.


Downtime when you can afford it (for us it's in the middle of the night, and very rarely), not in the middle of the working day when GitHub fucks up yet again.


Maybe privacy, outside of that, same client, so not much.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: