---
title: 'Node.js on Shared Hosting (Part 1)'
excerpt: "Installing Node.js on Hostinger's Cloud plan without root access - here's how."
date: 2021-01-11
categories: devops, web
featureImage: '/images/nodejs-on-shared-hosting.webp'

prev:
  text: 'BunnyCDN with Hostinger'
  link: '/blog/bunny-cdn-with-hostinger'

next:
  text: 'Node.js on Shared Hosting (Part 2)'
  link: '/blog/nodejs-on-shared-hosting-part-2'
---

If you read my previous blog post, you know I've been experimenting with CDNs & VPS Servers. This time, I wanted to use
Node.js on the Hostinger's hosting.

Yeah, the same Cloud Global Plan, but as all the support exec. guys say, you cannot normally use Node.js on a server
that does not give you root access. So here's a complete info. about how I installed Node.js on the Cloud Global plan
which was **not** a VPS Server.

Pre-requisites => SSH Access in you cPanel / hPanel.\
Enable the SSH Access in the panel & copy the ssh command (should be like: `ssh -p PORT userId@IpAddress`)

---
Alrighty then, let's go.

* Open terminal & paste SSH command.

* Use command `cd ~`

* Type below command and hit Enter -
    ```shell
    wget -qO- https://cdn.rawgit.com/creationix/nvm/master/install.sh | bash
    ```

* Then type the command -
  ```shell
  export NVM_DIR="$HOME/.nvm"
  [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
  [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
  ```

* Then install `node` via `nvm` -
  ```shell
  nvm install node
  nvm use node
  ```

  The above steps should show this output -

  <BlogPostImage src="/images/nvm-install-node.webp" alt="Successful NVM Node installation output" />

<BlogPostImage src="https://media.giphy.com/media/FnGdcQzqypBaE/giphy.gif" alt="despicable minions" caption="Give
yourself a pat on the back, you successfully installed Node.js on your Server." />

<br/>

In the next blog post,\
I'll show a working example of running a Node.js Express App on the same server.