What you're doing and why it matters
Installing Node.js on a school SSH server means putting the Node runtime on a remote machine you access through the command line, so you can run JavaScript programs there instead of only on your own computer. Schools often give you SSH access to a shared server for coursework, but Node usually isn't pre-installed. You'll need to download it, extract it to a folder you own, and set up your system to find it when you type commands.
This is different from installing Node on your laptop — you can't use a graphical installer, and you won't have permission to put files everywhere on the server. Instead, you'll download a pre-built version, put it in your home directory, and tell your shell where to look for it.
Key Takeaways
- You will download Node as a compressed file, extract it to your home directory, and add one line to your shell configuration file so the server finds it.
- Most school servers run Linux, so you need the Linux version of Node, not the Windows or Mac version.
- After installation, you must log out and back in, or run a specific command, before Node will work.
- If you get a "permission denied" error, you likely tried to install to a system folder instead of your home directory.
Connect to your school server and check what's there
Open a terminal on your own computer and SSH into your school server using the credentials your school gave you. The command looks like this: ssh username@server.address.edu, where you replace username with your school login and server.address.edu with the actual server address.
Once you're logged in, type node --version to see if Node is already installed. If you get "command not found" or a version number that's very old (like v10 or earlier), you'll need to install it yourself. Also type pwd to see your home directory path — you'll need this in the next step.
Download the correct Node version for Linux
Go to the Node.js download page at nodejs.org/en/download. Look for the section labeled "Pre-built binaries" and find the Linux version. Most school servers run 64-bit Linux, so download the file that says "Linux x64" — it will have a name like node-v18.17.0-linux-x64.tar.xz (the version number changes, but the pattern stays the same).
Copy the download link for that file. Go back to your SSH terminal and type cd ~ to move to your home directory. Then type wget followed by a space and paste the link you copied. The command will look like wget https://nodejs.org/dist/v18.17.0/node-v18.17.0-linux-x64.tar.xz. Press Enter and wait for the download to finish — it's about 40 to 50 megabytes, so it may take a minute or two depending on your connection.
Extract the files and move them into place
Once the download finishes, type tar -xf node-v18.17.0-linux-x64.tar.xz, replacing the filename with whatever you actually downloaded. This command unpacks the compressed file into a folder. Then type ls to see the folder that was created — it will be named something like node-v18.17.0-linux-x64.
You can leave the folder where it is, or rename it to something shorter. To rename it, type mv node-v18.17.0-linux-x64 nodejs. This makes it easier to reference later. Type ls -la to confirm the folder is there and see its full path.
Tell your shell where to find Node
Your shell needs to know where the Node executable lives. You do this by editing your shell configuration file. Most school servers use bash, so you'll edit a file called .bashrc in your home directory. Type nano ~/.bashrc to open it in a text editor.
Scroll to the end of the file using the arrow keys. Add a new line that says export PATH=~/nodejs/bin:$PATH. This tells the shell to look in your nodejs folder's bin directory before looking anywhere else. If you renamed the folder to something different, use that name instead of nodejs. Press Ctrl+O to save, then Enter to confirm the filename, then Ctrl+X to exit the editor.
Reload your configuration and test
Type source ~/.bashrc to reload your shell configuration without logging out. Then type node --version to test. If you see a version number like v18.17.0, the installation worked. Type npm --version to confirm npm (Node's package manager) is also working.
If you still get "command not found", double-check that the path in your .bashrc file matches the actual folder name in your home directory. Type ls ~ to see what folders you have, and make sure the name matches exactly. If the folder is named node-v18.17.0-linux-x64 but your .bashrc says ~/nodejs/bin, they won't match and Node won't be found.
Create a test file to make sure everything works
Create a simple JavaScript file to confirm Node runs correctly. Type nano test.js and paste this code:
console.log("Node is working on the school server");
Save and exit the same way as before (Ctrl+O, Enter, Ctrl+X). Then type node test.js. You should see the message printed to the screen. If you do, Node is installed and working. You can now delete the test file by typing rm test.js.
Frequently Asked Questions
What if I get "permission denied" when trying to extract the file?
This usually means you're in a directory where you don't have write permission. Type cd ~ to go to your home directory, where you should have full permission, and try extracting again. If you downloaded the file to a different location, move it to your home directory first with mv /path/to/file.tar.xz ~.
Can I install Node to a system folder instead of my home directory?
No — school servers don't give regular users permission to write to system folders like /usr/local. Installing to your home directory is the correct approach and keeps your installation separate from other users on the server.
Do I need to do this every time I log in?
No. Once you add the PATH line to your .bashrc file and reload it, Node will be available every time you log in. The configuration is permanent until you remove or change that line.
What if my school uses a different shell like zsh?
The process is the same, but you edit ~/.zshrc instead of ~/.bashrc. Add the same export PATH line and reload with source ~/.zshrc. If you're not sure which shell you're using, type echo $SHELL and it will tell you.
Can I install a different version of Node?
Yes. Go back to nodejs.org/en/download, copy the link for the version you want, and repeat the wget and tar steps with the new filename. You can have multiple versions installed in different folders — just change the PATH line in .bashrc to point to whichever one you want to use.