---
title: How To Setup Node.js App in cPanel￼
description: "Node.js is a popular, event-driven JavaScript runtime you can use to build robust web applications. If you are already familiar with creating Node.js apps, you may be wondering how to get your app onto a shared server, a hosting environment…"
url: "https://truehost.com/support/knowledge-base/how-to-setup-node-js-app-in-cpanel/"
updated: "2024-06-07"
---

# How To Setup Node.js App in cPanel￼

Node.js is a popular, event-driven JavaScript runtime you can use to build robust web applications. If you are already familiar with creating Node.js apps, you may be wondering how to get your app onto a shared server, a hosting environment in which you are limited in customization. Node.js requires some configuration of your server environment. But now, you can use a virtual environment within your shared hosting environment that allows for the customization necessary to run your app. Learn how to set up a Node.js in cPanel below.

- Setup Node.js App in cPanel
- Enter The Virtual Environment Command Line
- Stopping and Restarting Your App

## Setup Node.js Application

Step 1 : Log in to cpanel

Step 2 : Choose **Setup Node.js App** under *Software*

 ![](https://truehost.com/support/wp-content/uploads/2023/04/image.png)

Step 3 : click Create Application

![](https://truehost.com/support/wp-content/uploads/2023/04/image-1-1024x553.png)

Step 4 : Fill in the *Application root* field (this is the directory in which you will upload for application files)

Step 5 : Select your Application URL and startup file (if you do not name a startup file, `app.js` is used as the default)

Step 6 : Fill in the remaining fields with your preferred values

Step 7 : Click **Create** when ready

## Enter The Virtual Environment Command Line

- Copy the “source” command listed above your app settings:

![](https://truehost.com/support/wp-content/uploads/2023/04/image-2.png)

##

Once you have logged into the server via SSH, copy and paste the “source” command into the command prompt and hit `ENTER`.

You will then see that you have been logged into your Node virtual environment, seeing a command prompt similar to the following:

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

## Stopping and Restarting Your App

You can also stop and restart your app whenever you may need it. This can be done easily from the cPanel interface

Step 1 : Log into cPanel (as you did above)

step 2 : Choose **Setup Node.js App** under *Software*

step 3: Select your app from the list of existing applications

step 5 Click to stop, restart, or edit your application under the *Actions* table

**Well done! You now know how to set up a Node.js app in your cPanel.**
