Upgrading from 4.x to 5.x with Docker

If I’m at 4.8.0, do I only need to change it to 5.0.0 for the upgrade to be successfull?

You need to read the update guide and be careful to emulate the steps - updating direct from 4.8.0 to 5.0.0 is not supported, you must always be on the latest of your major version before attempting an update.

We have no way to enforce that with docker, so you’re pretty on your own.

1 Like

I don’t understand, so I can’t upgrade even with manual steps with docker? I need to make a fresh install?

P.S. Do you know when the member metadata like open rates and location will also be exported via ghost? (that is what is causing me my main problems with fresh installs, as I have to manually SQL UPDATE those rows, which is a pain in the ***).

You can update as long as you follow the update steps. You must be on the latest version of your major before you jump to the next major.

I have raised an issue on the docker repo in the hope that someone will take this on and write a proper guide and/or take steps to prevent bad updates:

2 Likes

You can reply in this thread if you have any Docker-specific questions.

How is the MariaDB related if I’m using MySQL already? I just want to upgrade to 5.x
I apprechiate the help still.

I thought you could reach out to a Docker user.

1 Like

For upgrade ghost docker to latest ghost version:

1 - Enter in container bash: docker -it <container name> /bin/bash
2 - update apt: apt update
3 - create user: adduser ghost
4 - install sudo: apt install sudo
5 - add user ghost in sudo: usermod -a -G sudo ghost
6 - enter on user: su - ghost
7 - enter on ghost path: cd /var/lib/ghost
8 - Update to latest v4 version: ghost update v4
9 - Update latest version: ghost update

If you want you can delete user with: deluser ghost

DONE. Good work

Il Sistemista Ottimista

1 Like

For upgrade ghost docker to latest ghost version:

1 - Enter in container bash: docker -it <container name> /bin/bash
2 - update apt: apt update
3 - create user: adduser ghost
4 - install sudo: apt install sudo
5 - add user ghost in sudo: usermod -a -G sudo ghost
6 - enter on user: su - ghost
7 - enter on ghost path: cd /var/lib/ghost
8 - Update to latest v4 version: ghost update v4
9 - Update latest version: ghost update

If you want you can delete user with: deluser ghost

DONE. Good work

This is wrong.

You just need to replace the tag for updating.

The container will start and do the migration.

Same thing for 4.x to 4.x as for 4 to 5.
Just consider updating to the latest 4.x.x before you upgrade to 5.x.x

Also make sure to update other things like MySQL 5 to MySQL 8 since version 5 is not supported anymore.

You can even get so far and do the updates automatically.

I have written a guide about it.

Keep your self-hosted Ghost blog up to date - fully automated

3 Likes

Just updating the latest 4.x.x and then only to the 5.x.x version via the docker tag cahnge worked, thanks @ajfriesen !

2 Likes

Glad it worked out!

You can keep it up to date automatically as well.
That is how I run my setup.

I rather have a second or two of downtime every now and then as a hacked system.