Knowledge base
1000 FAQs, 500 tutorials and instructional 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.). However, it is recommended to use the integrated node.js solution.
Preamble
- Node.js is a free software platform in JavaScript for 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).
- Local partners referenced by Infomaniak can handle these procedures if needed: launch a free call for tenders; they take care of everything, freeing you from technical details — also discover the role of the host.
Install Node.js
Prerequisites
- Install NVM on your Cloud Server.
- Note that 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 available
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 Node.js version
node -v
Source
To set up NVM, go to the WebSSH console of your Cloud Server.
Source the .profile file
source ~/.profileRun the following command to verify the NVM installation
nvm
Configure Node as a service
To configure Node as a service, it is recommended to use a "systemd-user service".
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:
Has this FAQ been helpful?