how to install node js in plesk

Installing Node.js in Plesk

If you want to run Node.js applications on your Plesk server, you'll need to install Node.js first. Here's how you can install Node.js in Plesk:

Step 1: Accessing the Plesk Panel

Log in to your Plesk panel by visiting your website URL followed by "/login". For example, if your website is "www.example.com", you'd visit "www.example.com/login". Enter your login credentials and click "Log In".

Step 2: Installing the Node.js Extension

In the Plesk panel, click on "Extensions" in the left-hand menu. Then, click on the "Extensions Catalog" tab. In the search bar, type "Node.js" and press Enter.

You should see the "Node.js Support" extension appear in the results. Click on it to view more information. Then, click "Install" to install the extension.

Step 3: Creating a Node.js Domain

Once the extension is installed, you'll need to create a new domain that uses Node.js. To do this, click on "Domains" in the left-hand menu. Then, click "Add Domain". Fill in the necessary information such as domain name and hosting settings.

Under the "Hosting Settings" section, select "Node.js" as the hosting type. Then, select the version of Node.js you want to use from the drop-down menu.

Step 4: Configuring Node.js Settings

After creating the domain, you can configure additional Node.js settings by clicking on "Node.js" in the left-hand menu. Here, you can set the Node.js version, install npm packages, and configure environment variables.

Alternative Method: Installing Node.js via SSH

If you prefer installing Node.js via SSH, you can do so by logging in to your server via SSH and running the following commands:

curl -sL https://rpm.nodesource.com/setup_14.x | sudo -E bash -

sudo yum install -y nodejs

This will install Node.js version 14.x on your server. You can change the version number by modifying the URL in the first command.

After installing Node.js via SSH, you'll still need to create a Node.js domain in Plesk and configure the necessary settings. The benefit of installing Node.js via SSH is that you have more control over the installation process.

Subscribe to The Poor Coder | Algorithm Solutions

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
[email protected]
Subscribe