Possible to use ghost with nvm?

I know that the docs says to remove nvm on production. But I can’t because I have other servers using nvm. And here’s the issue I have

I had earlier ghost setup using node v12.x available at /usr/bin/node. But later installed nvm for other projects on the same production machine. Now I need to upgrade node from 12.x to 14.x because I want to upgrade ghost from 4.x to 5.x. I run nvm use 14.x to set the node env to 14. And then before jumping into upgrading the ghost version and messing around with the working setup, I ran ghost doctor and I see that I get this error

System Error
Ghost v4.16.0 is not compatible with Node v12.16.3
  1. How can I go about the upgrade given that I want to use nvm?
  2. Will I lose the draft posts when I upgrade?

Backup the database or export the content.

I am using ghost with nvm now without any issue in production. After adding ghost cli to the node version from nvm and running ghost setup alerted me to update the node config in systemd configuration for the ghost service. Where I replaced

  • usr/bin/node to /path/to/.nvm/node_v14.07/bin/node and
  • /usr/bin/ghost to /path/to/.nvm/node_v14.07/bin/ghost

I killed the systemd service, all node processes then just to be safe and then ran ghost setup again. It’s working without any issue.