I want to upgrade DO droplet Ubuntu to 22.04 before upgrading Ghost to 5.1.1, how to do it?

Hello,

My Ghost droplet currently uses Ubuntu 18.x. I want it to have the latest LTS before upgrading Ghost to 5.1.1. However, the OS upgrade keeps failing the do-release-upgrade part.

What I’ve done so far:

  • Exported the site’s content via Settings – Lab – Export
  • Tarballed, downloaded /var/www/ghost/content to my local machine
  • Run apt update, apt upgrade, and apt dist-upgrade in order. No errors.
  • Run do-release-upgrade. Has errors on non-Ubuntu repos. (Not sure which)

Additionally, I tried not upgrading my OS and just upgrading Ghost to 5.1.1 from 4.48.1. Upgrading fails due to mysql missing from the system.

Any ideas how to proceed?

Getting a new droplet with newer components is also welcome, but I am afraid of losing data/content from doing so.

Ubuntu 22.04 is not ready for production use yet; it isn’t automatically available until the point release is available.

Moreover, it isn’t supported by Ghost just yet.

I recommend you stay with 20.04 since this is supported until 2027, and wait until Ghost confirm that 22.04 is a supported platform.

Why not go the docker way?

Updates are a breeze and you are not dependent on the OS at all.

I have written down 2 guides on my blog since I am self-hosting with docker as well:

You could also just run the database as a docker container and the rest as a local installation if you prefer to not use docker for Ghost for some reason.
That way you do not have to wait for your distro to update packages or update the distro.

1 Like

There’s a problem with docker and ghost 5. See here: database__connection__filename isn't blank and this causes an error with MySQL · Issue #310 · docker-library/ghost · GitHub

It’s not breaking anything right now so in my opinion not something a user should be concerned about at this moment.

Also warnings are not errors.
Warnings will just alert, errors will break your code.

Hello all,

I did nothing with my server, and just run the upgrade again:

apt update &&
apt upgrade &&
apt dist-upgrade &&
do-release-upgrade

… and it somehow worked!

Not sure why, maybe I had connection issues when I made this thread