Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Manually install Node.js on Cloud Server
This guide explains how to deploy Node.js with a Cloud Server to always have the necessary environment to compile or build modern frontends (React, Vue, etc.).
Preamble
- Node.js is a free software platform in JavaScript oriented towards network applications that need to scale, a simple and effective solution to integrate frontend tools into any server stack.
Node.js= official name of the language/environment.NodeJS= "technical" or simplified name in certain contexts (often for practical reasons, no real technical difference).
- For additional help contact a partner or launch a free call for tenders β also discover the role of the host.
Install Node.js
Prerequisites
- Install NVM on your Cloud Server.
- Warning, version 18 of Node.js is not compatible with old Cloud Servers; perform a migration beforehand!
Install the stable version of Node.js
nvm install stableInstall the latest version
nvm install nodeInstall an older version (not recommended)
nvm install 17List available versions
nvm ls-remoteInstall a specific version
nvm install <version>Switch Node.js versions and set version 6.3.1 (or another version) as default
nvm alias default 6.3.1Use a specific version of Node.js in the current shell
nvm use <version>Check the currently used version of Node.js
node -vSource
To set up NVM, go to the WebSSH console of your Cloud Server.
Source the .profile file
source ~/.profileRun the following command to check the NVM installation
nvmConfigure Node as a service
To configure Node as a service, using a "systemd-user service" is recommended.
Redirect traffic to a specific port
Refer to this other guide regarding traffic redirection to a specific port and dedicated IPs.
Link to this FAQ: