fbpx

How To Setup Node.js App In cPanel

setup node js in cpanel

In this tutorial, I will show you how to setup Node.js app in cPanel.

Using Node.js you can build different types of web applications. HarmonWeb can handle your Node.js app, allowing you to make your different configurations and build your apps easily.

Let’s get started.

How To Setup Node.js App in cPanel

  1. First, log into your cPanel.
  2. Scroll down to the Software section and select Setup Node.js App.
setup Node.js app in cPanel
  1. Click on the Create Application button.
setup Node.js app in cPanel
  1. In the Application root field, enter the directory in which you want to upload the application files.
  2. In Application URL, set the public URL of the application and select the Application startup file that will launch the application. If you don’t set a startup file, app.js is used as the default.
  3. Complete the rest of the required fields, then click Create when you are done.

Enter The Virtual Environment Command Line

When you click on Create, a ‘source’ command will appear on the screen. You can use this to easily access the command line for your app from a safe, virtual environment.

setup Node.js app in cPanel

Copy the ‘source’ command, log into your server using SSH, paste the command in the command prompt, and click ENTER.

You will now be logged into your Node virtual environment, where you will see a command prompt like this:

[example-node-root (10)] [userna5@server-hostname example-node-root]$

Time to Restart Your App

You can now go back and restart your app.

  1. Simply log back into your cPanel.
  2. Go to the Software section and select Setup Node.js App.
  3. Go down to your app in the list of existing applications.
  4. Click stop, restart, or edit the application in the Actions table.

Boom! You have successfully setup Node.js app in cPanel. If you have any questions, you can leave them in the comment section.

Leave a Reply