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.).

 

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 the stable version of Node.js

nvm install stable

Install the latest version

nvm install node

Install an older version (not recommended)

nvm install 17

List available versions

nvm ls-remote

Install 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.1

Use a specific version of Node.js in the current shell

nvm use <version>

Check the currently used version of Node.js

node -v

 

Source

To set up NVM, go to the WebSSH console of your Cloud Server.

Source the .profile file

source ~/.profile

Run the following command to check the NVM installation

nvm

 

Configure 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.


Has this FAQ been helpful?