Spent the morning upgrading my self-hosted Forgejo instance to the latest version. I started 30 minutes before heading out the door to an event, which is “always” a great idea. 🤦♂️
After removing the repo managed version of Forgejo, which never worked for me, I was able to download and install the latest Debian package. I did have to uninstall the previous version first, which was a little terrifying. I did create a Hetzner snapshot before I started, just so that I can revert back to a working version should I screw everything up. Fortunately I didn’t need the snapshot, but I did need to move “app.ini” out as installing the package would’ve overwritten it and apt
was refusing to proceed.
I eventually got the packaged installed and Forgejo running again. Fortunately everything was still there when I check the frontend. But when I tried doing a push, Git was throwing an error indicating that it couldn’t find the repository. I was unable clone any repos either, either using SSH keys or HTTPS.
I not entirely sure what was causing this issue. It may have been the move of “app.ini”. I did this as root, and maybe Forgejo, which runs in a jailed account, had an issue with reading or writing to that file. I changed the owner back to “forgejo” and also went through the the pre-update actions upgrade guide, and either one of those must’ve fixed something as Git started working again.
Anyway, I now have an updated version of Forgejo running. And despite the weird Git thing, it went relatively smoothly. But there are a few lessons here: always read the upgrade guide, and don’t do something like this minutes before you need to be somewhere else.