Kualo / docs
On this page

How to Set Up Node.js for Command-Line Use using NVM

Install NVM inside your Kualo cPanel account to run Node.js command-line tools and build utilities without touching the system version.

5 min read Updated 4 Jun 2026

Node.js is a versatile JavaScript runtime that can power websites and APIs, run command-line tools, automate tasks, or support development workflows using utilities like Webpack, ESLint or Prettier. If you want to use Node.js inside your Kualo cPanel account, the setup you need depends on how you plan to use it.

There are two main approaches:

  • If you are building a web-based Node.js application - such as a site using Next.js, Express or Nuxt - use the Node.js Selector in cPanel. This integrates your app with the web server using Phusion Passenger and allows it to run securely over standard web ports 80 and 443.
  • If you are using Node.js for command-line utilities only - scripts or build tools that do not need to be accessed via the web - this guide covers the right approach.

We will show you how to install your own version of Node.js using NVM (Node Version Manager) so you are not restricted to the default system version that cPanel provides.

Step 1: enable SSH access

SSH access is required to install Node.js manually. If SSH is not yet enabled on your account, please contact our support team and we will be happy to turn it on.

We use a non-standard SSH port. We will provide the correct port number when SSH access is granted.

Once enabled, connect using an SSH client:

ssh [email protected] -p [port]

Replace [port] with the port number we give you.

Step 2: install NVM (Node Version Manager)

When you connect via SSH, you may notice that a version of Node.js is already installed:

$ node -v
v16.15.0

This version is globally installed on the server by cPanel. It is shared across accounts and may be older because it is tied to server-wide applications. You cannot upgrade this system version - but thanks to CloudLinux, you can install your own copy inside your account using NVM.

NVM allows you to install and manage different versions of Node.js within your hosting account. It works entirely in your user space and does not require root access.

To install NVM, always use the official installation instructions to ensure you are using the latest supported version:

https://github.com/nvm-sh/nvm#installing-and-updating

At the time of writing, the command looks like this:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

Always check the NVM GitHub page for the latest version number before running this command, as it may have been updated since this guide was written.

Once the install finishes, you should see confirmation that NVM was installed and configured. The installer automatically adds the required setup lines to your .bashrc file so that NVM is available the next time you connect via SSH.

To start using NVM straight away without reconnecting, run these two lines:

export NVM_DIR="$HOME/.nvm"
source "$NVM_DIR/nvm.sh"

Step 3: install Node.js via NVM

Now that NVM is ready, you can install your desired version of Node.js. To see all available versions, run:

nvm ls-remote

To install the latest LTS (Long-Term Support) version:

nvm install --lts

Or install a specific version, for example:

nvm install 18.19.0

Once installed, the selected version will be activated automatically and set as your default.

Verify it worked:

node -v
npm -v

Some newer versions of Node.js (including most 18.x releases and all 20.x and 22.x releases) require system libraries that are not available on older versions of CloudLinux. Many servers now run CloudLinux 8 or 9, which support all modern Node.js versions. If your server is running an older operating system, you may see errors when trying to use a modern version.

If you run into compatibility issues, you have three options:

  • Use an older version of Node.js, such as 16.x, which is known to work on CloudLinux 7.
  • Create a dummy app using the Node.js Selector in cPanel. This lets you activate the Node.js environment from the command line and run CLI tools using any supported version, even on older operating systems. See our separate guide on using the Node.js Selector for command-line scripts for details.
  • Contact our support team if you need a newer version of Node.js and we can check whether a migration to a CloudLinux 8 or 9 server is possible.

Notes and limitations in shared hosting

While you can now run Node.js from the command line, please be aware of the following limitations in a shared hosting environment:

  • Custom ports are not available. You cannot run applications that bind to ports such as 3000 or 8080, as these are blocked for security reasons. For web-facing applications, use the Node.js Selector in cPanel, which integrates your app with the web server over standard ports.
  • Long-running or background processes are not allowed. Persistent scripts or daemons will be terminated automatically by the system. If you need recurring tasks, use cron jobs to run scripts on a scheduled basis.
  • Resource limits apply. All processes run within your CloudLinux resource limits, including CPU, memory and disk I/O. If your scripts exceed these thresholds, they may be throttled or stopped.
  • Global NPM packages are tied to the active Node.js version. If you install a global package using npm install -g, it is only available within the currently active version set by NVM. Switching Node.js versions may require you to reinstall global packages under the new version.
Was this helpful?
Your feedback helps us find gaps in the docs.
Still need a hand?
Real people, around the clock - start a chat or open a ticket and we'll help you put it right.