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

How do I use Node.js over SSH or via the Terminal?

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


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


How do I set up Node.JS with the ".bashrc" method?


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

ls -ld /opt/alt/alt-nodejs*
If the version you want is missing, 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 on your next logins, so you won't need to type this command again.


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

node -v


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

Updated on: 17/07/2026

Was this article helpful?

Share your feedback

Cancel

Thank you!