Forum was down for the past week or so after a failed update. After some nerves on my part (trying to fix it while worrying the whole time I was going to accidentally delete all the posts or somesuch) I managed to get there after a few days tinkering. This post is about what happened, and how it was solved. Is mostly just for my own personal interest so I have a record of how to fix it that I can find it again later.
Bit of background. This forum uses “discourse” (forum software) which runs inside “docker” (containers that run apps so that an app crashing does not crash everything else) and this done on a DigitialOcean “droplet” (DigitialOcean provides the server, which they call a droplet) running Ubuntu.
Discourse has to be updated/upgraded regularly (they email when there is an update) and this can mostly be done by the website simply clicking a link (sometimes this fails and have to log into the droplet and run three lines of code instead: Manually update Discourse and Docker image to latest - Self-Hosting - Discourse Meta ).
On this occasion, while updating discourse/docker I ran into the problem mid-install that Ubuntu was so old (Xenial, 16.04!! was the current LTS when I first got the droplet to create forum) that Docker was incompatible. This left docker failing, and unable to be updated.
So I logged into droplet and tried to run
sudo apt update
sudo apt upgrade
sudo do-release-upgrade
Problem was that while it would rename all the repos from xenial to bionic (from the installed Ubuntu LTS to the next version), it omitted the one for docker so I got error
Err https://download.docker.com/linux/ubuntu xenial InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7EA0A9C3F273FCD8
Eventually I figured out that I had to manually edit the source for docker to use bionic. This involved logging into droplet and then
sudo nano /etc/apt/sources.list.d/docker.list
and replace xenial
with bionic
in the URLs. Then save the file and exit.
Next, Add dockers GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
and I could then do the standard
sudo apt update
sudo apt upgrade
sudo do-release-upgrade
This upgraded Ubuntu to bionic (18.04), and I then did it again to focal (20.04); had to do same manual update of source for docker.
I was then finally able to the standard cli update/upgrade of Docker: Manually update Discourse and Docker image to latest - Self-Hosting - Discourse Meta
And finally the forum was back
On the plus side, the droplet is now 50gb up from 30gb (as it ran out of space and so I couldn’t do the docker upgrade; more issues but happily easily solved ones, just logged into DigitalOcean and did it via their control panel). And I set up automatic weekly backups of the droplet (cheap enough).
I still need to update Ubuntu twice more (to jammy, then noble; 22.04 then 24.04). But docker is being difficult about it as “The aufs storage-driver is no longer supported.”. First though, I’m waiting for Sunday’s auto-backup of the droplet so I don’t have to worry about destroying the whole forum again!