Updating a Ghost Docker Container on Reclaim Cloud

One of the things I wanted to figure out after installing Ghost as a Docker Container on Reclaim Cloud was how to update it to subsequent versions. Below is a very short video on the process as well as the commands to do this via SSH:

Keep in mind, changing permissions for the user is something you only need to do once, after that you should be able to change to the non-root user and update Ghost.

Run the following command to see what user Ghost is installed as, keep in mind Ghost is installed at /var/lib/ghost using the official Docker Image:

ls -al /var/lib/ghost/.ghost-cli

The following result of the above command let’s us know node is the user in the group node:

-rw-r--r-- 1 node node 83 Jan 5 09:40 /var/lib/ghost/.ghost-cli

We then change the user node to a superuser with the following command:

sudo usermod -aG sudo node

And then update the user permissions:

sudo chown node:node /var/lib/ghost

This command changes the file permissions:

sudo find ./ -type d -exec chmod 00775 {} \;

You also need to update the node user’s password given you will be prompted for it:

sudo passwd node

After that, change to the node user:

su - node

Change into the ghost install directory:

cd /var/lib/ghost

And finally run the following command to update Ghost:

ghost update

This is where you will be prompted for the node user’s password:

? Sudo Password

If all goes well you should get something similar to the following output, but in this case Ghost was already up to date:
+ sudo systemctl is-active ghost_undefined
? Checking system Node.js version - found v14.18.2
? Ensuring user is not logged in as ghost user
? Checking if logged in user is directory owner
? Checking current folder permissions
? Checking folder permissions
? Checking file permissions
? Checking memory availability
? Checking free space
? Checking for available migrations
? Checking for latest Ghost version
All up to date!

This entry was posted in Ghost, reclaim, Reclaim Cloud and tagged , , , , . Bookmark the permalink.

2 Responses to Updating a Ghost Docker Container on Reclaim Cloud

  1. Pingback: bavaweekly 1-11-2022 | bavatuesdays

  2. Pingback: bavaweekly 1-11-2022 -the Show Notes | bavatuesdays

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.