Homelab / Git host update 2026-06-15
- Moved my git repos to Codeberg.
- I tend to make a LOT of commits to my website and blog repos that aren’t really relevant or meaningful to the public, so I decided it would be best if I just hosted those repos in a simple private git server on my NAS. I have a dedicated ZFS dataset for it.
Setting up the git server was super easy on my FreeBSD NAS.
sudo adduser # git user
sudo zfs create naspool/git
sudo chown -R git:git /var/naspool/git
sudo su git
cd ~/
mkdir ~/.ssh
chmod 700 ~/.ssh
touch ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keysI copied my workstation’s public SSH key into
~/.ssh/authorized_keys. Then I initialized the git
repos.
cd /var/naspool/git
mkdir blog.moonshadow.dev.git
cd blog.moonshadow.dev.git
git init --bareThen, on my workstation, I changed the upstream origin of my blog’s local git repo.
cd blog.moonshadow.dev
git remote remove origin
git remote add origin git@nas.carp-wyvern.ts.net:/var/naspool/git/blog.moonshadow.dev.git
git push -u origin mainI can now take snapshots and replicate these repos if I wanted to.