Considering self hosting my own git repositories. What are some options?
from idunnololz@lemmy.world to selfhosted@lemmy.world on 11 Mar 22:31
https://lemmy.world/post/44134491

Update

Forgejo seemed to be the winning answer so I tried setting it up. Total setup time was less than 10 minutes. I pushed 10 repositories to test it out and so far it seems pretty good. Thank you everyone for the answers!


As the title states, I am looking to host maybe ~100 git repositories locally on my home network.

I’m not planning on doing anything too crazy with my repositories. The solution doesn’t need to support like 1000s of contributors however it should support the most basic features such as being able to see individual commits, branches, diffs, maybe some PR related mechanism, a web GUI, etc.

I don’t like to tinker too much. The solution should work and be stable. Stability is a hard requirement. I want to write code and not have to worry about losing it. Yes I will make backups.

Please let me know what some of the best options are at the moment. Thank you!

#selfhosted

threaded - newest

ryokimball@infosec.pub on 11 Mar 22:35 next collapse

Self-hosting gitlab?

Ek-Hou-Van-Braai@piefed.social on 12 Mar 06:35 collapse

Surely this is the correct answer.

GitLab is awesome and has good CI-CD

ryokimball@infosec.pub on 12 Mar 15:39 collapse

Idk, I had not heard of gitea or forgejo before. Personally I really want strong & flexible CI/CD, and Don’t know what the alternatives have to offer there, but it would be worth looking into. GitLab is pretty resource-heavy even for low user count.

First_Thunder@lemmy.zip on 11 Mar 22:35 next collapse

I personally don’t host yet anything, but do know of a friend with a functional Gitea at home

DFX4509B@lemmy.wtf on 11 Mar 22:37 next collapse

Just host a bare git repo.

idunnololz@lemmy.world on 11 Mar 23:02 collapse

I’d prefer it to have a website UI just in case I want to take a quick look at something when I’m not home.

frongt@lemmy.zip on 11 Mar 23:16 collapse

Over a VPN, right? I always recommend not exposing services to the Internet if you can avoid it.

idunnololz@lemmy.world on 12 Mar 00:40 collapse
xombie21@lemmy.dbzer0.com on 11 Mar 22:38 next collapse

Gitea is the answer, configure/install with docker. I have had mine going for a few years now and haven’t had to touch it besides updating the docker container which I automated.

SpaceNoodle@lemmy.world on 11 Mar 22:51 next collapse

Same, but fuck the docker overhead

RIotingPacifist@lemmy.world on 12 Mar 04:27 next collapse

Didn’t use docker then fairly sure there is a Deb for it.

kill_dash_nine@lemmy.zip on 12 Mar 10:24 collapse

Just curious - what do you mean by the docker overhead?

SpaceNoodle@lemmy.world on 12 Mar 14:53 collapse

CPU, RAM, disk space, network translation, management abstraction, buried logs …

lime@feddit.nu on 11 Mar 22:52 collapse

why gitea instead of forgejo?

SpaceNoodle@lemmy.world on 11 Mar 23:53 collapse

Why forgejo instead of gitea?

Creat@discuss.tchncs.de on 12 Mar 00:37 collapse

Forgejo was soft forked from Gitea after they went commercial and changed the license (I think). If there aren’t any so far, expect pay walled features eventually.

Forgejo turned into a hard fork after communication issues between the teams. I haven’t looked too deeply into it (as I don’t really care about the fact that it’s a hard fork now). This means while it used to be a drop-in replacement allowing you to go back and forth between the two, it’s now an active conversion, I think.

SpaceNoodle@lemmy.world on 12 Mar 00:42 collapse

Thanks for answering my question instead of only downvoting like half the other chuckleheads. Guess I’ll migrate to Forgejo if my Gitea instance ever gets too old.

moonpiedumplings@programming.dev on 12 Mar 02:47 collapse

You should probably migrate now, forgejo is currently a soft fork that is fully compatible, but in the future they are planning to hard fork and not be compatible. Well, they are in the process of doing so right now.

SpaceNoodle@lemmy.world on 12 Mar 03:00 collapse

Good to know, I’ll look into it this weekend.

whelk@retrolemmy.com on 11 Mar 22:50 next collapse

I finally decided to make the move off github a couple weeks ago and ended up self hosting with Forgejo. It was really easy to set up, and my buddies and I are loving it. Provides a robust web interface and handles pull requests with automatic merges and all that. I haven’t had any issues thus far

lime@feddit.nu on 11 Mar 22:51 next collapse

if it wasn’t for the webui, a bare git repo would suffice. any repo can be a remote. it’s distributed, after all.

forgejo is the most popular choice right now.

if you wanna be extra you can host git-pr

fizzle@quokk.au on 12 Mar 00:51 next collapse

I would like to use bare repos because I don’t share with anyone else and don’t really need the web-ui for issues or wikis or anything.

However, I need git-lfs and if I understand correctly, that doesn’t wont work with a bare repo over ssh.

I was using gitea a while back and they had a way to dump repos and db, but there didn’t seem to be a way to restore. That being the case I switched to gogs which has been great. It was only recently I learned that gogs wasn’t very active and there was some kind of security breach. Mine is only accessible on my LAN so not particularly worried about security.

Anyhow, looking at forgejo now it seems like there still isn’t a great way to restore from backup? I guess that might not matter to me if I’m only interested in the repos and no comments or other stuff that might be in the database.

Serinus@lemmy.world on 12 Mar 02:26 collapse

But ci/cd though

lime@feddit.nu on 12 Mar 06:22 next collapse

just use a make file like a civilised human being

PotatoesFall@discuss.tchncs.de on 12 Mar 09:05 next collapse

forgejo supports woodpecker CI I thought?

eodur@piefed.social on 12 Mar 12:00 collapse

Why not forgejo’s built in ci/cd? Its worked great for me so far?

DaPorkchop_@lemmy.ml on 12 Mar 10:46 collapse

Jenkins has fairly solid Gitea/Forgejo integration :)

chtk@sh.itjust.works on 11 Mar 22:52 next collapse

If you’re looking for a bare bones solution, and you already have a machine that you can SSH into, you could just use that. There are desktop GUI/TUI apps galore that you can use to inspect commits, branches and such.

At work I’m in the process of planning a move from Subversion to Git. So I’ve been looking at Forgejo, a hard fork of Gitea maintained by Codeberg. It has all the important features of other forges like GitLab and Gitea. But is completely open source.

mesamunefire@piefed.social on 11 Mar 22:56 next collapse

If all of the below doesnt work out, you can host git by itself. I did that at an office once.

https://gist.github.com/Kreijstal/28fc987270b71849505bbc89b3f2d90a steps look correct.

But for me forgejo worked out well for my side projects and mirroring.

aegg@europe.pub on 11 Mar 22:56 next collapse

I’ve used Gitea before, Frogejo also looks pretty good

litchralee@sh.itjust.works on 11 Mar 22:57 next collapse

I second the option of Git + SSH. That will scale to one hundred repos. And if you don’t want the repos to be checked out, use “git clone -n” to not do that. It’ll just be dozens of repos which only have the minimal .git/ directory. All other repos that specify this one as the upstream will have no issues pulling or pushing code.

You won’t have PR features nor a web UI though.

theunknownmuncher@lemmy.world on 11 Mar 23:03 next collapse

Forgejo is the way

Decronym@lemmy.decronym.xyz on 11 Mar 23:20 next collapse

Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

Fewer Letters More Letters
Git Popular version control system, primarily for code
SSH Secure Shell for remote terminal access
VPN Virtual Private Network

3 acronyms in this thread; the most compressed thread commented on today has 6 acronyms.

[Thread #157 for this comm, first seen 11th Mar 2026, 23:20] [FAQ] [Full list] [Contact] [Source code]

thirdBreakfast@lemmy.world on 11 Mar 23:31 next collapse

Forgejo + Tailscale. Forgejo is the app behind Codeberg so it’s battle tested. I switched to it from Gitea after the controversy.

slowtrain33@lemmy.ml on 11 Mar 23:34 next collapse

I’ve set up a few gitlab servers at companies and it’s always been well received. Doing it from scratch may be more complex than you want, but I think there are docker images for a more turnkey type solution. And the option of building CI/CD pipelines in the future is always nice to have.

corsicanguppy@lemmy.ca on 12 Mar 00:23 next collapse

It’s monstrous, but gitlab installs from one big RPM on a base box; and with one config file you’re up.

foggy@lemmy.world on 12 Mar 15:19 collapse

While I agree, out of the box the configs ARE NOT for home lab use.

tal@lemmy.today on 12 Mar 00:59 next collapse

Relevant:

en.wikipedia.org/wiki/Forge_(software)

fizzle@quokk.au on 12 Mar 01:04 next collapse

Forgejo seemed to be the winning answer so I tried setting it up. Total setup time was less than 10 minutes.

Just a heads up… I haven’t looked at this since forever ago (when foregjo was gitea), but make sure you have a restore plan. I think there’s a dump command but no restore.

ppb1701@ppb.social on 12 Mar 01:11 next collapse

@idunnololz I'm running gitea and tailscale. Sadly I had not heard of Forgejo at the time or I might have went with it instead. (Might switch over if i get bored or an itch one afternoon). Works great for me though.

cecilkorik@piefed.ca on 12 Mar 02:00 next collapse

I love Forgejo, I’m glad you are happy with it too. Their upgrade process is pretty minimal/straightforward (at least it has been so far) and their runner configuration is a bit heavy to set up initially (I maybe took the security recommendations a bit too intensively despite the fact that I’m running a completely private site, but allowing systems that run arbitrary commands automatically is legitimately a bit intimidating) but has been really nice and reliable now that it’s working.

msokiovt@lemmy.today on 12 Mar 02:06 collapse

I’d go for Forjego or Gitea.