---
title: "How to Install Node.js"
description: "In this guide, we'll show you how to install Node.js on your VPS or dedicated server. Node.js is a server-side JavaScript framework built off the V8 JavaScript engine from Google Chrome that allows..."
url: https://www.inmotionhosting.com/support/website/install-nodejs/
date: 2013-05-10
modified: 2025-02-12
author: "InMotion Hosting Contributor"
image: https://www.inmotionhosting.com/support/wp-content/uploads/2013/05/canva-install-nodejs.jpg
categories: ["Website"]
type: post
lang: en
---

# How to Install Node.js

![How to Install Node.js](https://www.inmotionhosting.com/support/wp-content/uploads/2013/05/canva-install-nodejs-1024x538.jpg)

In this guide, we'll show you how to install [**Node.js**](https://www.inmotionhosting.com/support/website/nodejs/) on your VPS or dedicated server. Node.js is a server-side JavaScript framework built off the V8 JavaScript engine from Google Chrome that allows for event-driven, asynchronous I/O requests to help handle many concurrent requests efficiently. The best method to install Node.js depends on whether you use a cPanel server or an unmanaged cloud server.

You'll need [root access](https://www.inmotionhosting.com/support/amp/obtain-root-access/) to follow the steps below.

## Install Node.js on cPanel Hosting

1. [Log into WebHost Manager (WHM)](https://www.inmotionhosting.com/support/edu/whm/logging-into-whm/).
2. Open EasyApache 4 (EA4).
3. Under "Software," select "Customize."
4. Select "Additional Packages."
5. Select the "nodejs10" toggle switch so it turns blue and displays "Install" to the right.![Install nodejs10 in EasyApache 4](https://www.inmotionhosting.com/support/wp-content/uploads/2021/11/nodejs-whm.png)
6. On the left select "Review."
7. At the bottom select "Provision."

## Install Node.js using NVM

For Cloud Server Hosting and [Bare Metal Dedicated Server](/bare-metal-servers) Hosting, Node.js developers recommend using [Node Version Manager (nvm)](https://github.com/creationix/nvm#install-script) to install Node.js.

1. [Log into SSH](https://www.inmotionhosting.com/support/server/ssh/how-to-login-ssh/)
2. Install nvm, you can use the install script using cURL or Wget: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
3. Verify the installation succeeded: command -v nvm If you don't receive output stating "nvm," restart your server (shutdown -r) and try again.
4. Type `nvm install ` or install the latest version: nvm install node #
5. List installed Node.js versions: nvm ls-remote
6. Open the console: nvm use noyour hosting plande
7. To open the Node.js console and verify Node is running, run node
8. Run this test command: console.log("Hello, World!"); Which should return:`Hello, World! undefined`
9. Type Ctrl + D to exit Node

### Install Node.js using RPM

Those who prefer official Red Hat package manager (RPM) repositories can use the steps below.

1. Log into SSH
2. Download Node.js version 10 Long-Term Support (LTS) by running: curl -sL https://rpm.nodesource.com/setup_10.x | bash - For Node.js v11, run: curl -sL https://rpm.nodesource.com/setup_11.x | bash -
3. To install Node.js, run: yum -y install nodejs
4. To ensure the developer tools needed for npm development are installed, run: yum install gcc-c++ make
5. To open the Node.js console and verify Node is running, run: node
6. Run this test command: console.log("Hello, World!"); Which should return:`Hello, World! undefined`
7. Type Ctrl + D to exit Node

You should now have a successful installation of **Node.js** running, and in further guides we'll go more in-depth with some of the amazing things you can do with **Node.js**!
