Terence Eden. He has a beard and is smiling.
Theme Switcher:

Some thoughts on personal git hosting

· 16 comments · 800 words · Viewed ~9,438 times


As part of my ongoing (and somewhat futile) efforts to ReDeCentralise, I'm looking at moving my personal projects away from GitHub. I already have accounts with GitLab and CodeBerg - but both of those sites are run by someone else. While they're lovely now, there's nothing stopping them becoming as slow or AI-infested as GitHub.

So I want to host my own Git instance for my personal projects. I'm experimenting with https://git.edent.tel/

It isn't quite self-hosted; I'm paying PikaPod €2/month to deal with the hassle of hosting and updating the software. I get to point my domain name at it which means I can always change the underlying service if I want. For example, it uses Gitea and I might want to switch to Forgejo later.

So far, it works. But there are a few significant drawbacks.

Network Effects

A large service like GitHub has network effects which are incredible. It feels like 90%+ of all developers have an account there. That means if someone wants to leave a comment or send a PR there is no barrier to entry. That's huge! There are a bunch of popular FOSS projects which make me sign up for yet another service when all I want to do is send a simple bug report which I find deeply annoying.

Luckily, Gitea has built in support for various OAuth providers. So I've set up single-sign-on with Gits Hub and Lab.

An SSO screen with buttons for GitHub and GitLab.

I asked people how easy it was to use - most people were able to use it, although a few people wanted a local-only account.

But is is still a bit of a faff. Even a little bit of hassle turns people away.

Forking isn't Federated

Suppose you want to make a Pull Request or just take a copy of the code. At the moment, you have to create a fork on my server. There's no way to easily fork something to your GitHub or personal server.

You can git clone the repo to your local machine, and you can manually move it elsewhere, but there's no way to send a PR from your repo to mine.

There's also no way for users to find other forks. Perhaps the upcoming ForgeFed proposals will fix things - but it doesn't exist yet.

As pointed out in "Let's Make Sure Github Doesn't Become the only Option" - most of the tooling of git hosting platforms isn't adequate for modern needs.

Discoverability

The easiest way to find code at the moment is to search GitHub. Moving my stuff to a different site means it will only be discovered by a general search engine.

I want people to find and use my code. If that's hard, they won't. I can point existing users to the repo - but it still cuts down on discovery.

Admin Hassles

Although PikaPods takes care of all the hosting administration, there's still the faff of setting up all of Gitea's options.

Long list of config options.

If I get hit by an automated spam attack, it'll be up to me to clean it up.

I'm not sure if I have the time, patience, or expertise to correctly and safely configure everything. Time spent administrating is time not spent coding.

Sponsorship

I get a little bit of money when people sponsor me on GitHub. There's no "sponsor" option on Gitea and, even if there was, the network effects of GitHub are substantial. Getting people to enter their credit card info into a random site isn't as convenient as clicking a button in GitHub.

Now What?

My most popular Github repo has around 140 contributors. I genuinely don't think I could attract that many people to OAuth onto my personal git hosting service.

Gitea seems to have a mixed reputation. But it's the only one offered by PikaPods.

There are interesting discussions about how to replace GitHub but they're only in the early stages.

Although €2/mo isn't a huge amount, I've gotten used to having free services on GitHub / GitLab / CodeBerg.

So this, I think, is my plan:

  1. Leave my popular / sponsored repos on GitHub
  2. Move my smaller repos to https://git.edent.tel/
  3. Create new repos in there as well

I'm also going to look for a hosted Forgejo instance which lets me use my own subdomain - hopefully at a cheaper or comparable price. If you have any recommendations - please let me know!


Share this post on…

16 thoughts on “Some thoughts on personal git hosting”

  1. @Edent the biggest blocker for me is CI. I haven't found a real managed CI that supports Gitea/Forgejo/Codeberg. If I'm storing production secrets in CI, I really want them to have a dedicated security team that's patching quickly and monitoring for intrusions. I hooked Codeberg up to a self-hosted woodpecker instance, but I don't trust it with production secrets.

    Reply | Reply to original comment on m.mtlynch.io

    1. There is also some support for CI for Radicle - see their blog posts (linked in Git Rev News).

      Also, beside Radicle, there is also Tangled (https://tangled.sh/), but it is in earlier stages of development than Radicle.

      Reply

  2. @Edent I realized that the term “fork” is starting to lose its original meaning. Originally, forking mean cloning a repository. In the case of Git and other distributed VCSs, cloning happens completely distributed without creating an account. However, GitHub, Codeberg, Forgejo, Gitea, and GitLab have hijacked the term, so now it means “Git clone,” but an account is required.

    Reply | Reply to original comment on fe.disroot.org

  3. @Edent@mastodon.social Pesky challenge, isn't it? I don't have the need to move off GitHub at the moment, I'd rather keep my code accessible, but then I don't like to 100% rely on the big platforms. I ended up with a similar-ish approach to yours:
    1. I keep my public repos on GitHub.
    2. I host the private ones on a Gitea instance self-hosted with YunoHost, on a VPS.
    3. The GitHub projects get cloned automatically to Gitea on each update.

    This lets me have a public display, that people can use and interact it. If GitHub reaches a breaking point for me, I can cut it off and I already have a clean copy of my repositories elsewhere.

    Reply | Reply to original comment on social.interordi.com

  4. The folks over at Symfony (PHP) have some great tooling for working with split repositories while maintaining history.

    The base but not all of that is open source. I wonder if they can be incentivized to open source it all.

    Because you would be able to work in your own instance while letting contributors work on GitHub. The tool (or an alternative) can help sync automatically. Then you meet contributors where they are but lose nothing (except visibility) if GitHub disappears.

    Reply | Reply to original comment on bsky.app

  5. I've been using PikaPods for over six months and can't recommend them enough!

    Reply

  6. Why not mirror your repositories from GitHub to your own instance? That way you remain in control of the repos and always have a public backup if GitHub or Microsoft decides to suddenly introduce pricing or randomly ban/take down repos or accounts, but you can also profit from GitHub’s existing network and collaboration features.

    Personally, I host canonical copies of my repos on a NAS in my bedroom and then mirror them to GitHub and Codeberg with some fancy git hooks. (And I wrote my own Git frontend in PHP for serving a public overview.) This works pretty well and I get best of both worlds.

    As a side-note: Git was always meant to be distributed. In theory, everyone can clone a repo and make changes and send the patches upstream to be merged. Git even bundles tooling to facilitate this workflow out of the box (git send-email). I realise email is maybe a little old-fashioned, but I think a low-tech solution where we collectively decide on some method to upstream patches (so send, receive and apply) would be far better than a complex high-tech standard for federating git forges with a lot of moving parts. Because in theory, it should be as simple as: clone a repo, make changes, send the proposed changes to the maintainer to be reviewed and merged. We have a myriad of ways to contact each other already, so I don’t see a reason we should have to create an account specifically for sending a patch.

    Reply

  7. 100% agree with article + comments. I have 2 different Gitea instances - one for personal, one for work - hosted on servers I control, access restricted by IP. That said, I'm not writing repos for the wider world, I just need a place to keep track of my code. I also keep a "devops" repository that I use to store all my server/device configs, IP address inventory, SSH keys, etc. Again, private, restricted by IP address in Nginx. I've found Gitea to be SUPER easy to set up, backup, and maintain. Nice to know I'm not the only one 🙂

    Reply

  8. I'm certainly no expert. But Railway has a template for Forgejo.

    https://railway.com/deploy/Ot34oR

    Disclaimer ... referral code

    I started using Railway a couple of month ago and I love it. I've setup a Directus instance. A Umami instance and now Forgejo. All under my Hobby plan at 5$ a month. Your mileage may vary.

    Enjoy your posts.

    Cheers and respect.

    Reply

What are your reckons?

All comments are moderated and may not be published immediately. Your email address will not be published.

See allowed HTML elements: <a href="" title="">
<abbr title="">
<acronym title="">
<b>
<blockquote cite="">
<br>
<cite>
<code>
<del datetime="">
<em>
<i>
<img src="" alt="" title="" srcset="">
<p>
<pre>
<q cite="">
<s>
<strike>
<strong>

To respond on your own website, write a post which contains a link to this post - then enter the URl of your page here. Learn more about WebMentions.