technical:hosting_your_own_git

This is an old revision of the document!


Hosting your own git repos

Hope this helps you out. I wasn't a huge fan of github even before it became owned by Microsoft. These days I think there are enough reasons to host your own git repos. It's honestly pretty simple an free. I think I first started questioning hosting all of my code/projects at github when their site came under a state sponsored DDoS attack. We were a small SaaS startup with a dev heavy staff. During this attack the whole office stopped pretending to work and actually just blatantly started goofing off.

After that DDoS I started looking for github alternatives and figured out that you can use git itself to just host your own repos. So these days I keep my own gitserver at Digital Ocean. This allows me to control my own uptime and not leave my repos out there for Microsoft to do whatever they want with it.

In a nutshell this is my setup. gitshed is hosted at DigitalOcean and I use my default Debian SSH setup as the base for connectivity. I also took a lot of the steps from Learn Enough GIT I love the Learn Enough courses to get you off the ground. But I did have to modify the methods a bit so I wasn't using github as my repo.

Step 1: Go to your favorite hosting provider as I mentioned, I use Digital Ocean, but you can use AWS, Google, or whomever. I prefer Debian 12.x these days, but you can probably make this work with other versions of Linux or anything you can get git to compile on. I went with a small low cost droplet $6/month I will just grow the droplet if I need it. Once the VPS is setup walk through the basic Debian SHH/Setup to add user accounts and firewall configs.

Step 2: Install git, I just used the default git install from the apt repositories.

sudo apt install git

There are a ton of git related tools in the default Debian apt repos but this should be all you need to get started.

Step 3:

  • technical/hosting_your_own_git.1748316797.txt.gz
  • Last modified: 2025/05/27 03:33
  • by super_stunder