To deploy a Node.js app in cPanel, follow these steps:
-
First, log in to your cPanel account.
-
In the "Software" section, click on the "Setup Node.js App" icon.
-
In the "Create a Node.js App" page, enter the following information:
- App Name: Enter a name for your app.
- App Directory: Select a directory for your app or leave the default value.
- App Main File: Enter the name of the main file of your app (e.g., index.js).
- Node.js Version: Select the version of Node.js that you want to use for your app.
- Environment: Select the environment in which your app will run (e.g., production or development).
-
Click the "Create" button to create your Node.js app.
-
After your app is created, you will see a "Start" button next to it. Click this button to start your app.
-
To access your app, click on the "Visit App" button. This will open your app in a new tab in your web browser.
That's it! Your Node.js app should now be running in cPanel.
Note: Check the "Error Log" part of the "Node.js App" page in cPanel if your app deploys incorrectly. This can aid problem-solving.

