> For the complete documentation index, see [llms.txt](https://docs.petrosky.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.petrosky.io/getting-started/tutorials/installing-nodejs-12.md).

# Installing NodeJS 12

NodeJS - Tutorials

## How to install NodeJS 12 on Debian/Ubuntu?

First of all. Connect to your VPS Server using your Credentials

#### Step 1:

{% hint style="info" %}
root\@petrosky:/# apt-get update && apt-get upgrade -y

{% endhint %}

#### Step 2:&#x20;

Downloading the NodeSource Script using 'curl' command.

{% hint style="info" %}
root\@petrosky:/# curl -sL <https://deb.nodesource.com/setup\\_12.x> -o nodesource\_setup.sh
{% endhint %}

#### Step 3:

Running the NodeSource Script

{% hint style="info" %}
root\@petrosky:/# bash nodesource\_setup.sh
{% endhint %}

![](https://1491144344-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjV1Qo8RBxPquhVJp7Hkt%2Fuploads%2FyzffY96l8J3gjzr99lhA%2Fimage.png?alt=media\&token=0753141e-2992-483e-a1bf-e590eca39420)

#### Step 4:

Installing NodeJS Using the following command:

{% hint style="info" %}
root\@petrosky:/# apt install nodejs
{% endhint %}

![](https://1491144344-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjV1Qo8RBxPquhVJp7Hkt%2Fuploads%2FHd26QJToxjnBMUGmxU1E%2Fimage.png?alt=media\&token=c575dd50-92c8-44bd-9eb5-cf5fa6f97c89)

And finally NodeJS 12 is installed! Now we can check the version by using: **node -v** command!

![](https://1491144344-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjV1Qo8RBxPquhVJp7Hkt%2Fuploads%2FHc0QLPsRumCdcZFvz7CR%2Fimage.png?alt=media\&token=45111da4-a858-458e-9f2a-9e260b68c536)
