Cant update ghost-cli, crashes server midway

Im new to ghost. I was working on a site I installed on DigitalOcean last year using their Ghost droplet and following their tutorial. Today it my site crashed when updating a page as it sometimes does, so I rebooted it on DI.

Next thing I new I was up in the command line trying to update Ghost, figuring it might help with stability, maybe I’d get some new features…and I should probably learn how to update anyway.

I made a backup and proceeded. First the update failed cuz there wasn’t enough memory, then file permissions were wrong, then the node version was too old, then the node version was too new, then I read apparently nvm is a bad idea for Ghost, then I had to roll back the npm version, now Im stuck on the ghost-cli being out of date with the error:
Ghost v5.75.3 is not compatible with this version of the CLI. Your CLI version is 1.24.0, but Ghost v5.75.3 requires ^1.25.0

I run npm install -g ghost-cli@latest and it hangs up. I uninstall/reinstall the ghost-cli package and it hangs on reify:@tryghost/zip: timing reify:loadBundles and crashes the whole server.

Whats going on here??

The official 2 command upgrade documentation makes it look so easy. Im no command line expert but Im generally able to get by. Is this just how it is with self-hosted Ghost?

Any info would be greatly appreciated!

No, updating is straightforward when the server is set up correctly.

It’s difficult to tell since you haven’t provided much information about your server, software versions etc.

Therefore, it would be helpful if you shared details of the host OS, Droplet size, database, and the output of ghost doctor and node -v.

SSH to your server in two different windows. In the first, run htop.

In the second, run your upgrade command that crashes. Is the server running out of memory during the upgrade by chance?

I dont think so…about 100mb of my 1GB ram stays free.

Server info:
Digital Ocean Ubuntu/1GB/MYSQL

Ghost Doctor output (post updating stuff while trying to update ghost):
OS: Ubuntu, v22.04.3 LTS
Node Version: v18.17.0
Ghost Version: 5.33.6
Ghost-CLI Version: 1.24.0
Environment: production

At some point in 2023, I used the DigitalOcean “One click” Ghost droplet image and followed the official “How to install Ghost on Digital Ocean” tutorial to install/config. Havent logged in or touched anything on the server since, only the /ghost web admin - which is why Im surprised things are so seemingly misconfigured and difficult “out of the box”.

If there is a better way/image/tutorial, I’m open to redoing the whole install. I want to like Ghost!

That’s right.

You could try upgrading the Droplet, running the upgrade, then downgrading again.