Articles on: Web Hosting
This article is also available in:

How to use Node.JS via SSH or the Terminal?

What is the difference between "Setup Node.JS App" and the ".bashrc" method?


  • "Setup Node.JS App": This tool is only used to configure a Node.JS application accessible via the web (such as an API or an Express.js site). It automatically configures an environment and manages the web server execution. See the dedicated FAQ on this topic.
  • ".bashrc" method: It gives you full control over Node.JS. You can run any Node.JS script, whether it is a cron job, a command-line tool or a build script.


How to configure Node.JS with the ".bashrc" method?


  1. Connect via SSH to your server or to the Terminal in cPanel
  2. Check the available Node.JS versions:

ls -ld /opt/alt/alt-nodejs*

If you are missing the version you need, don't worry, our technical support will install it for you

  1. Run this command, adapting the path to the chosen version:

echo 'export PATH=/opt/alt/alt-nodejs20/root/usr/bin/:$PATH' >> ~/.bashrc

  1. Apply the new configuration:

source ~/.bashrc

For your information, the configuration will be applied to your future connections, so you will not need to run this command again.

  1. Verify that the Node.JS version you chose is active:

node -v

  1. If you get a "RangeError: WebAssembly.instantiate(): Out of memory" error on one of your scripts, run it via SSH and not via the cPanel terminal (the latter imposes stricter memory usage limits).

Updated on: 14/02/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!