Some thoughts on personal Git hosting

57 pointsposted 3 days ago
by ColinWright

39 Comments

dividedcomet

a minute ago

I love hosting my personal git, so glad to see others do! I use it for certain projects that I just want to be lazy about (personal website with sensitive data committed to the repo) projects that are for friends/family and don’t need to be public. I chose gitea maybe 2 years ago? And it’s been great. Very light weight compared to gitlab, with useful things like actions. So I can push a new commit to main on my personal server and it’ll deploy my website to the server. I still publish things I want to share to GitHub, but not everything.

I think the thing that sets it apart from others would be I run it on a m2 Mac mini? Very low power consumption, never makes any noise, and seemingly has plenty of power for whatever I need to get done.

NoiseBert69

3 hours ago

I have no problems publishing my public projects on GitHub or Codeberg. Secretly hoping that LLM-Crawlers will choke to dead on my bad code.

But private stuff runs on my own servers.

In 2025 it's mostly maintenance free once the setup is running: Debian will be updated fully automated using unattended-update and the hosted application when there's the need to do one manually. Backups automatically every night using Proxmox and its little brother Proxmox Backup Server. Even with valid certificates using DNS-Auth from Lets Encrypt.

divbzero

2 hours ago

> 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 is a native git request-pull command [1] that generates a summary of pending changes to pull into an upstream project, but it doesn’t enjoy support for all the features offered by GitHub pull requests or GitLab merge requests.

[1]: https://git-scm.com/docs/git-request-pull

quectophoton

an hour ago

Yeah, `git request-pull` is only a helper to create a pull request, while GitHub/GitLab/etc include that in addition to a (convenient) vendor-specific way to track received pull requests and a code review web interface.

Initiatives like ForgeFed are trying to define a more neutral way to share this information, but I don't think there's any estimate date for when there'll be an actual implementation of it. If that ever happens, it'd be possible to get vendor-neutral tooling for that kind of collaboration.

monegator

3 hours ago

All the drawbacks are not drawbacks to me. My projects, my repos, my private server. I don't want nor need to show off ("collaborate") and if i did.. what's the point of self hosting then? Just use github/gitlab/codeberg.

I don't even need to rent a server for that. Everything runs on my router (openWRT is amazing)

goku12

2 hours ago

> I don't want nor need to show off ("collaborate") and if i did.. what's the point of self hosting then? Just use github/gitlab/codeberg.

Let me repeat this again. We didn't centralize git when we started using github/gitlab etc. We centralized discoverability and reach of projects.

So far, everything else can be decentralized - issue tracking, pull requests, project planning, ci, release management and more. But we still don't have a solution to search projects on potentially thousands of servers, including self-hosted ones.

OhMeadhbh

an hour ago

Fwiw.. I have a "normal" private git server over SSH, but for public projects, it copies merges into blessed branches to public, read-only repos accessible via HTTPS. Here's an example:

https://www.bi6.us/GI/B/

I sort of punted on receiving patches and merge requests because most of the projects I'm distributing in this way aren't really open source, but "published source" and there's a small community of people who use them. The people who use the public, read-only repos know how to generate patches and distribute them via email or (in one case) uploading them to an S3 bucket.

Anyway... your mileage may vary, but it's worked reasonably well for a small community. Not sure I would recommend it for a huge open source project.

account42

an hour ago

While less popular these days, email-based workflows don't have the account/federation issue - anyone can just drop by and post a patch series. Of course the workflow itself is going to be an obstacle for most but I'm not sure if that's inherent or only because it's not what people are used to.

eviks

2 hours ago

> 1. Leave my popular / sponsored repos on GitHub > 2. Move my smaller repos to https://git.edent.tel/

Wouldn't 2. make transitioning them into 1. "impossible"?

mixcocam

2 hours ago

I think that the best way to move away from github is to go full chad and doing mailing list with patch submissions à la LKML.

edent

an hour ago

Perhaps I'll go old-school and insist that any patches are stamped into punch-cards before I'll accept them.

ghosty141

18 minutes ago

gitweb + gitolite is all you need in my opinion for hosting private projects. I have had a wonderful experience with it since there are no complex databases, config files etc and it’s very light on resources

skydhash

2 hours ago

> 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.

Why are people so keen on having that network graph of forks? It's not necessary for collaboration. Status symbol?

edent

an hour ago

I don't see it as a status thing - I see it as a convenience thing.

If I want to fork your code and contribute back, that means I need to be on the same system as you.

There's a bunch of Gnome projects which require me to sign up to their specific git hosting service before I can contribute.

On most git servers, I have to fork in order to send a PR, which often means I have to create a fork on their system - which means I need to set up something to replicate it to my local machine.

It's all friction.

I'd love to see a project on (for example) GitHub and then clone it to my GitLab, work on it there, and send a PR from GL to GH.

webstrand

2 hours ago

On lower frequency repos, I often look through the github forks to find patches for issues or features that were not upstreamed. Its not infrequent I find a nice feature someone implemented for themselves but didn't upstream because it wasn't quite quality enough, making a PR is a lot of effort especially when its not clear that it'll ever be accepted.

impure

an hour ago

GitLab is open source, you can self host it. Although the system requirements are quite high, you will not be able to host it on a two euro VPS.

And I wouldn’t be that concerned about contributors. It’s only the very top projects that get any contributors. And even then most of the time contributors are not worth the hassle.

akkartik

2 hours ago

Critical data here is how many PRs one is creating on others' projects and receiving on one's own projects. To me OP sounds like "Lifestyles of the Rich and Famous." At my level of git collaboration, just git push contributions on any code forge and send me a link, and I'll do the work to pull it in wherever I am.

zokier

3 hours ago

> 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

Have people forgotten that email exists?

skydhash

2 hours ago

For simple changes, you can just `git diff` it to a file, put that file on a pastebin and share that link with any communication tool (or share the file directly). `git format-patch` is more where you want to share the commits (message and all). And you're not tied to using email. It's just a collection of files that you can share using whatever.

edent

an hour ago

Sure. But then I have to copy that patch, hope my email client hasn't mangled it, upload it somewhere, run an arcane command.

Do you not see how much easier something like GH is?

dogleash

2 hours ago

My email client (the default offering from my service provider ofc) is a POS. Therefore all of email is a miserable, failed tool and I can't believe you're being such a boomer rn.

abound

2 hours ago

For my private, personal Git server, I recently moved from Gitea to Soft Serve [1], and have enjoyed how light and fast it is. I have it hooked up via Tailscale (using TS_DEST_IP to forward traffic [2]), so it has its own IP on the network and I don't have services fighting for port 22.

TUI tools over SSH definitely aren't for everyone, but if that's your style and you want a place to dump all your non-public projects, it's a great choice.

Most non-private stuff goes on Sourcehut, and anyone can contribute via email (i.e. without any account) assuming they don't mind going through the arcana required to set up git-send-email.

[1] https://github.com/charmbracelet/soft-serve

[2] https://hub.docker.com/r/tailscale/tailscale

Fluorescence

an hour ago

What did you not find fast about gitea/forgejo?

I've really enjoyed using them but I guess I don't do much with the web interface.

> TS_DEST_IP

So you run tailscale in your git server container so it gets a unique tailnet ip which won't create a conflict because you don't need to ssh into the container?

I might give that a go. I run tailscale on my host and use a custom port for git which you set once in your ~/.ssh/config for host/key config on client machines and then don't need to refer to it repo uris.

TBH, I think it's tailscale I'd like a light/fast alternative to! I have growing concerns because I often find it inexplicably consuming a lot of CPU, pointlessly spamming syslog (years old github issues without response) or otherwise getting fucked up.

account42

an hour ago

What do you even need a git server for if its just for private projects - you can have a remote repo accessible via ssh without any other software needed.

navigate8310

an hour ago

When people say, they can contribute via email, does this mean they'll zip altered files and mail to the repo owner?

BatFastard

an hour ago

I recently began running Gitea on my NAS to host an unreal5 project which requireds significant LFS, Github's free LFS limits are very small. And honestly trying to decipher their paid account limits was too much for my old brain that day.

Anyone have experience with LFS on other repos?

dinkleberg

2 hours ago

I got the self-hosting bug a few years back and have been running a gitea server (among many others) on a mini PC running in my basement that is setup with tailscale so I can connect to it from anywhere, and it has been fantastic. For any OSS projects that I want to be open to the world, I still put it up on GitHub. But for anything else, it is just going on my Gitea instance.

skydhash

an hour ago

I just use ssh. I would use Gitea if it was a team project, but it's too much of a hassle for my personal usage. So creating a repository is `ssh git@server git init --bare repo.git` and the remote is `git@server:repo.git`. Pretty much all I need.

worldsavior

2 hours ago

Why people self host a git site? If they're not an organization and are not looking for views, there aren't any reasons to self host.

packetlost

an hour ago

I self-host most of my personal git repos on a NAS. They're literally just `git init --bare` folders in `/srv/src` that I access over SSH. Requires essentially zero setup and maintenance and I don't have to be worried if my internet or some other provider dies.

bayindirh

an hour ago

I do some personal R&D and want to keep it under wraps until I'm ready to share it to the world. Keeping stuff on services you can depend is great for many things (I use SourceHut, btw.), but sometimes you want to have your code on-premises.

This is not the next billion dollar business, but I don't want to share the code until I write a couple of papers on it, and anchor the code's and idea's provenance correctly.

I had a softer stance on the issue, but since AI companies started to say "What's ours is ours, and what's yours is ours", I need to build thicker walls and deeper moats.

No, it won't be permissively licensed if I open source this.

snmx999

an hour ago

I self-host a git site to keep my code private and to integrate an issue tracker. The maintenance effort is very low. I'm running Gitea on my local network Ubuntu server.

panny

an hour ago

I would self host if I also wanted build actions, issues, wiki like Github/Gitea support. I believe the article is about this part. How do I collaborate with others without building a dependency on a tyrant? Gitea + Traefik + Keycloak + federated github login probably does the trick these days. It's been a while since I built a SDLC project.

calvinmorrison

2 hours ago

Github steals my software, the 'software conservatory' steals my software, etc.

I dont want it in a vault, I dont want you to do anything other than read it on my site. I dont want an archive. most of my code is not licensed. All rights reserved.

It's there as a personal portfolio that's it.

And these scanners don't respect the LICENSE file, they think if its on the web - they can not just index it but make full copys and reproduce it.

zokier

2 hours ago

> most of my code is not licensed. All rights reserved.

By virtue of uploading code to github you are granting them license as per their terms of service.