Ghost is an open-source publishing platform for creating blogs, digital magazines, and newsletters. Its interface allows you to manage content and publications from a single environment.
With Ghost 6, the platform incorporates integration with ActivityPub, the protocol used in the Social Web. This enables publications from a Ghost site to be available on compatible platforms, such as Mastodon, where other users can follow the account and interact with the content.
Selecting the update method
To update Ghost using our pre-installed image, you must follow the procedure corresponding to the version of Ubuntu you used when deploying the server. If you chose the image based on Ubuntu 24.04, follow its update instructions. If you chose Ubuntu 26.04, use the procedure corresponding to that version.
Updating Ghost
Select the procedure to follow below:
It will be essential to have the ownership and permissions of the Ghost directory correctly configured. Therefore, first switch to the Ghost user:
# su ghostinst
Next, access the Ghost path:
# cd /var/www/ghost
Then run a Ghost diagnostic check:
# ghost doctor
All checks should appear as correct, as shown in the following result:
Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org
✔ Checking system Node.js version - found v16.18.1
✔ Checking logged in user
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
✔ Checking system compatibility
✔ Checking for a MySQL installation
+ sudo systemctl is-active ghost_ejemplo-clouding-host
Instance is currently running
ℹ Validating config [skipped]
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking binary dependencies
✔ Checking free space
✔ Checking systemd unit file
✔ Checking systemd node version - found v16.18.1
If any of the checks show an incorrect result, you will need to fix it, and usually, the diagnostic output explains how to resolve the problem.
Ghost Backup
Before updating Ghost, it is recommended to have a backup of it. Therefore, you can directly use the native built-in tool. Running the following will create a Ghost backup:
# ghost backup
You can also use a snapshot of the server instead of using Ghost's native option; it will be faster and safer than storing the backup on the same server.
Updating to the latest version of Ghost
Once the previous preparation steps are completed, run an update to update Ghost.
# ghost check-update
Result:
Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org
Current version: 4.48.2
Latest 4.x version: 4.48.8
Latest version: 5.23.0
Major update available!
In the result, we can see that there is a new revision of the current version and a major version available. For example, the command to only perform the update of the current version is as follows:
# ghost update
In case you already have the latest available version of Ghost, it is not necessary to specify the version:
# ghost update
Running the update will output the following content as a result:
Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org
+ sudo systemctl is-active ghost_ejemplo-clouding-host
✔ Checking system Node.js version - found v16.18.1
✔ 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 content folder ownership
✔ Checking memory availability
✔ Checking free space
✔ Checking for available migrations
✔ Checking for latest Ghost version
# 4.48.8
This release contains fixes for minor bugs and issues reported by Ghost users.
---
View the changelog for full details:
* Ghost - https://github.com/tryghost/ghost/compare/v4.48.7...v4.48.8
* Admin - https://github.com/tryghost/admin/compare/v4.48.7...v4.48.8
🪄 Love open source? We're hiring [JavaScript Engineers](https://careers.ghost.org/)
to work on Ghost full-time
✔ Fetched release notes
✔ Downloading and updating Ghost to v4.48.8
+ sudo systemctl stop ghost_ejemplo-clouding-host
✔ Stopping Ghost
✔ Linking latest Ghost and recording versions
+ sudo systemctl start ghost_ejemplo-clouding-host
✔ Restarting Ghost
ℹ Removing old Ghost versions [skipped]
Afterwards, you can check the status of Ghost with a diagnostic check:
# ghost doctor
Everything should appear as correct, as in the following result:
Love open source? We’re hiring JavaScript Engineers to work on Ghost full-time.
https://careers.ghost.org
✔ Checking system Node.js version - found v16.18.1
✔ Checking logged in user
✔ Ensuring user is not logged in as ghost user
✔ Checking if logged in user is directory owner
✔ Checking current folder permissions
✔ Checking system compatibility
✔ Checking for a MySQL installation
+ sudo systemctl is-active ghost_ejemplo-clouding-host
Instance is currently running
ℹ Validating config [skipped]
✔ Checking folder permissions
✔ Checking file permissions
✔ Checking content folder ownership
✔ Checking memory availability
✔ Checking binary dependencies
✔ Checking free space
✔ Checking systemd unit file
✔ Checking systemd node version - found v16.18.1
You can also verify that you have the latest revision of the version by running again:
# ghost check-update
For the Ghost version with Ubuntu 26.04, it is necessary to update using Docker Compose, so we will follow these instructions:
First, update the Git repository:
cd /opt/ghost
git pull
Download updates for the images used:
docker compose pull
Recreate the images:
docker compose up -d
Optionally, clean up old images to free up space:
docker image prune
Remember, if you have questions about this or any other topic related to your servers at Clouding, feel free to contact soporte@clouding.io We are here to help you with whatever you need, just ask us!