Hey team, sorry this isn’t in tutorial format! The kind support agents at Cloudways shared this snippet with me and I’ve saved it here for the next time I need it, and to possibly help others.
Please feel free to ask questions in comments.
curl https://gist.githubusercontent.com/cloudways-haider/f7cb6627f6674c263624589d360e12b4/raw/9d0b2c78ace5b7b2dedb411e9d676129e34b470a/nvm_install.sh | bash
source ~/.bashrc
nvm install 12.0.0
nvm alias default node
exec bash
node -v