I’ve started building a small decentralized, non commercial app with a Rust backend + Node.js frontend running on k8s. I would have my own dedicated server for this. Just mentioning the setup because it might grow and for git there seem to be only GitHub and GitLab around and I prefer GitLab.
I care a lot about security and was wondering if it makes sense to self-host GitLab. I‘m not afraid of doing it, but after setup it shouldn’t take more than 1-2 hours per week for me to maintain it in the long run and I’m wondering if that’s realistic.
Would love to hear about the experience of people who did what I’m planning to do.
EDIT: Thanks for all the answers, trying my best to reply. I want CI/CD, container registry and secrets management that’s what I was hoping to get out of GitLab.
For self hosting there is also https://forgejo.org/ which is a fork of https://about.gitea.com/ , the latter of which started to shift to a corporate model.
technically the same as forgejo, codeberg is the main forgejo contributor/the org owning it
Quick question: forgejo is the git program that you can install self host a git server, while codeberg is probably the biggest forgejo-kind git server that is open to the public, right?
I dont have a home server to host forgejo (yet?), so I’m thinking of making an account on codeberg, is that correct reasoning?
I did an inplace upgrade of gitea to forgejo. No issues.
I’ve been self hosting this for 2 or 3 years now.
There has been zero maintenance other than the occasional update button
I use it for my docker compose files that portainer pulls from with the click of the button to update my containers when needed.
I edit the files in VS code with the git plugin and it works without issue
Thanks! This looks actually really interesting. Did you try doing CI/CD with it? In future I would probably collaborate with others who’d be also using my self-hosted Git. What would be critical for me is that I can set it up in a way that once I open a PR that branch automatically gets deployed to a dev Kubernetes environment and when I merge with main that it automatically deploys to staging and only when I release a tag the branch would end up in prod. Also I’d like to do secrets management over the platform. I like that Forgejo would be non-commercial and I would prefer it over GitLab if it can do these things well.
Gitlab uses a ton of resources and is a pain to setup. Once you get it going, it’s fine.
Going to echo what others have said: Use Gitea or Forgejo instead if you can. Both have runners you can setup like gitlab, but they instead mimic github actions instead of gitlab ci/cd.
I run a semi-private gitea instance, and have not had any problems past the initial setup in 2+ years.
I tried hosting Gitlab for a while, but configuration and upgrades were difficult, and your really have to stay on top of updates due to vulnerabilities. It also used a lot of resources and wasn’t super responsive.
I moved to Forgejo (a hard fork of Gitea), and haven’t looked back; I cant recommend it enough. It’s fast, doesn’t take a lot of resources, actively developed, and has all the features I need.
Codeberg is a public instance of Forgejo if you want to try it out first.
Thanks! May I ask what kind of setup you were running and if there’s any feature you might be missing that existed in GitLab but doesn’t in Forgejo?
I was on an old repurposed desktop with 16gb ram and a i7 6700k at the time.
I haven’t felt that I’ve been missing any features from Gitlab. I do use Woodpecker-CI for runners because Forgejo action’s weren’t working for Docker builds, but I think the Forgejo actions have come a long way since I made that decision; I’ll have to try them out again one of these days.
I remember Gitlab requiring quite a large amount of resources, so if you’re talking about a solo project, I’d skip it and go with something a lot leaner like Gitea, personally.
I’ve never had any security issues with GitHub in the past though, and extended features are free for open source projects, so it’s kind of hard to ignore.
I have been maintaining several self-hosted GitLab instances over the past 5 years, and it rarely takes me longer than 20minutes per update.
Their upgrade paths are clearly marked and well thought out. Their packaging methods are of great quality.
You will not regret going with GitLab.
Thank you! I’m running a Servarr over Docker Compose, and have managed some Kubernetes clusters in the past (although poorly tbh). Any idea how complicated that is in comparison? Also, do you use their Helm charts?