Upgrading Ghost running on a Digital Ocean droplet
It's one-click install, but updates need to be done manually. Configure terminal/Filezilla for SSH access, backup content, use the ghost-cli to do the update.
Connecting to the droplet
Generate SSH key
ssh-keygen -t rsa -b 4096 -C "me@email"
Upload content of id_rsa.pub (public key) to Digital Ocean
Optionally convert to PPK for use with Filezilla
sudo apt install putty-tools
puttygen id_rsa -o digitalocean.ppk
Backup content
- SFTP to backup /var/www/ghost/content/images
- Export post content to JSON through Ghost interface -> Labs
Update Ghost and dependencies
Connect via terminal
ssh root@dropletIP
Switch to unpriveleged user
sudo -i -u ghost-mgr
Ensure Node is updated
sudo apt-get install -y nodejs
Ensure Ghost cli is updated
sudo npm install -g ghost-cli@latest
Update Ghost
ghost update --no-check-mem
Other useful commands
Restart Droplet
sudo shutdown -r now