You can deploy and run a Node.js application directly within cPanel using the Application Manager. This process allows you to manage the application's environment, start the process, and monitor its status.
Important: This feature is only available on specific Hostek plans that support Node.js applications.
Before you begin
You will need:
An active Hostek account with cPanel access.
A prepared Node.js application (including your source code and a
package.jsonfile).The specific path to your application's root directory.
Deploying the application
Log in to your cPanel account.
Locate the Software section and select Application Manager.
Click Add Application (or the equivalent button to create a new entry).
Enter a Name for your application.
Select the Application_type (e.g., Node.js).
Provide the Application_root (the path to your files) and the Application_URL (the domain or subdomain where the app will be accessible).
Enter the Startup file (typically
app.jsorindex.js).Click Save or Create.
Configuring and starting the application
Once the application is registered in the Application Manager, you must configure the environment and start the process.
In the Application Manager, find your application in the list.
Click Edit or Manage next to the application.
Under the Environment Variables section, add any necessary keys and values (such as
PORTorNODE_ENV).Click Save to apply the environment changes.
Click Start or Restart to initiate the Node.js process.
Confirm the result
The application status in the Application Manager should change to Running or Started.
Navigate to the Application_URL you defined in the setup to verify that your website is loading correctly.
Limitations
This procedure does not include instructions for installing global npm packages or managing complex build pipelines; these should be completed before adding the application to the Manager.
If the application fails to start, check the internal logs provided within the Application Manager to identify specific Node.js errors.
