How to Update Ghost on DigitalOcean
When self-hosting Ghost you're on your own to keep it updated, here's the process I go through to keep this site up to date with the latest features added to Ghost.
Before you make any changes, create a Snapshot of your server! Or at the very least backup anything important
Connect to your DigitalOcean droplet via SSH using the browser console (the button is on the top right when viewing your droplet dashboard)
Update Repository Package Lists and then Update Packages (&& will only use the dist-upgrade command after the apt-get update is successful)
apt-get update && apt-get dist-upgrade
Enter y
to accept the installation of any updates.
Change to Ghost webserver directory (this is the default for a DigitalOcean Marketplace Ghost server)
cd /var/www/ghost
Update Ghost-CLI
sudo npm install -g ghost-cli@latest
If there is an update to Ghost-CLI, then follow the instructions to update.
You likely also want to update NPM using sudo if there is an NPM update notice spit out at this step.
Now change to to the Ghost Manager User (ghost-mgr is the default user for the DigitalOcean Marketplace Ghost server)
sudo -i -u ghost-mgr
Change to Ghost webserver directory (this is the default for a DigitalOcean Marketplace Ghost server)
cd /var/www/ghost
Run the Update
ghost update
After the update is applied, open up your website and click around to make sure everything is working.