Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Use your Node.js app's interpreter over SSH

If your Node.js app was made with the Node.js Selector, you can run its commands from a remote terminal. This guide shows how to enter the right Node.js version.

Web Hosting2 min read8 steps4 screenshots

What is an interpreter?

An interpreter is a program that reads your code and runs it. For Node.js, the interpreter is node. Different apps may need different Node.js versions, like different apps needing different keys.

On hosting with CloudLinux and cPanel, the Node.js Selector gives each app its own version in a private folder. That folder is called a virtual environment. It keeps one app's tools apart from the others.

What is SSH?

SSH is a safe way to type commands on a server from your own computer. You need SSH access turned on for your account. If you cannot connect, ask Hostvento support.

Steps

  1. Log in to cPanel and open Setup Node.js App.
  2. Open your app. Near the top you will see a line that starts with source. It shows the exact command for your app.
  3. Copy that command.
    Screenshot: Copy that command.
  4. Open a terminal on your computer and connect:
ssh username@YOUR_SERVER_IP

Use the username and server address from your welcome email.

Screenshot: Use the username and server address from your welcome email.
  1. Paste the copied command. It looks like this:
source /home/username/nodevenv/myapp/18/bin/activate && cd /home/username/myapp

This switches to the Node.js version of your app and moves into its folder. The numbers and names in your command will be different.

Screenshot: This switches to the Node.js version of your app and moves into its folder. The numbers an
  1. Check the version:
node -v

It should show the version you picked in cPanel.

Screenshot: It should show the version you picked in cPanel.
  1. Now run what you need, for example:
npm install

This downloads the packages your app uses.

  1. Go back to the cPanel page and click Restart so the app uses the changes.
Tip: Always run npm install after you have entered the environment. Otherwise it may use the wrong Node.js version.

Quick recap

  • An interpreter runs your code. For Node.js it is node.
  • Copy the source command from Setup Node.js App.
  • Paste it into an SSH session to enter your app's version.
  • Restart the app from cPanel after changes.