How To Set Up Runcloud Node.JS

Mark Caggiano
4 min readJul 26, 2020

Setting up nodejs with can be confusing, but in reality it is very easy.

First, connect to your server with ssh:

ssh runcloud@yourserver.runcloud

Then cd to your home directory, become root and install nodejs + npm:

yourserver.runcloud $ cd ~
yourserver.runcloud $ su
# Insert root password

Go to:

Choose your distribution and follow the instruction to install nodejs, you need to. I will put the instructions for my specific case:

# Using Ubuntu
curl -sL | sudo -E bash -
sudo apt-get install -y nodejs

Then type node and npm to see if they are installed.

Now exit from super user and change npm configuration to use your $HOME directory:

# exit # Exit from super user
yourserver.runcloud $ NPM_PACKAGES="$HOME/.npm-packages"
yourserver.runcloud $ mkdir -p "$NPM_PACKAGES"

Set npm to use this directory for its global package installs:

yourserver.runcloud $ echo "prefix = $NPM_PACKAGES" >> ~/.npmrc

Configure your PATH to see commands in your $NPM_PACKAGES prefix by adding the following to your .bashrc

# NPM packages in homedir
export NPM_PACKAGES="$HOME/.npm-packages"

# Tell our environment about user-installed node tools