I missed on the first pass your mention of nvm as your upgrade method.
As you can see from testing some system versions, Node 16 is still installed and /usr/bin/node – the one that Ghost uses – uses is still version 16.
NVM is not really meant as a system package manager because it works by modifying environment variables that are only set in your current shell-- and those changes don’t apply to systemd units.
First, I would question why you are upgrading Node, since Node 16 is supported and is working fine.
But if you want to upgrade Node, I would recommend the n version manager, which you can install from NPM. To use it, the syntax would be like sudo n 18.
It will install a new node in /usr/local/bin/node
From there, you can use a method I described previously to create a new Ghost systemd unit file that replaces /usr/bin/node with /usr/local/bin/node OR you can remove /usr/bin/node and symlink it to /usr/local/bin/node. If you do that, you are messing a file with managed by the nodejs package, and it may complain if you uninstall or upgrade the nodejs package later.
Oh look, there’s some official documentation about using nvm:
It seems to recommend that’s OK to use nvm, but to symlink the Node binary that NVM installs to /usr/bin/node, but I would recommend just using n instead.
Thanks for the education on NVM vs n. I understood this much differently.
The hoops/steps to change Node version are significant. I am thinking it would be better or at least a bit easier to deploy new server that is already using the desired Node version then migrating the Ghost site to new server.
Yes, 16 is working fine but 18.xx is current supported version. Whether one upgrades Node now or later eventually it would be less of an optional thing. Upgrading is a certainty at some point. May as well learn the in and outs of doing so now.
FYI: I think Ghost folks have updated DigitalOcean one-click but the old version is still being deployed as of a couple of days ago.
Started a fresh instance of Ghost One-click but the installer is now installing v18.17.1
The instructions from Nodesource were a snap for upgrading to Node v18.18.1. Should make keeping Node current a snap.
Maybe post or tag would be helpful for others. DigitalOcean Ghost 1-Click