Node.js is an open-source server environment that enables JavaScript to run on the server side across platforms like Windows, Linux, Unix, and macOS.

This guide walks you through how to set up Node.js for web applications using the end user interface in cPanel.

Note: If Node.js is disabled on your hosting account, the Node.js Selector icon will not appear in cPanel.


Accessing Node.js Selector in cPanel

  1. Log in to your cPanel account.

  2. Navigate to the Software section.

  3. Click on Select Node.js Version.

This will take you to the Web Applications interface where you can manage your Node.js apps.


Understanding the Web Applications Page

The Web Applications interface displays a list of your Node.js applications with several columns:

  • App URI: Shows the full URI of the application along with its associated domain.

  • App Root Directory: Displays the root directory of your application within your home directory.

  • Mode: Can be either Production or Development.

  • Status (started/stopped): Indicates whether the application is running and shows the Node.js version.

  • Actions: Allows you to start, stop, restart, edit, or delete the application.


How to Manage Your Application

✅ Start Application

  • Click the Start icon in the Actions column of a stopped app.

  • Once started, the icon will change to Stop.

❌ Stop Application

  • Click the Stop icon in the Actions column of a running app.

  • Once stopped, it will revert to the Start icon.

???? Restart Application

  • Click the Restart icon. The row will be temporarily locked until the process finishes.

???? Remove Application

  • Click the Bin icon.

  • Confirm by clicking Agree or cancel the prompt.

  • The app will be removed from the list upon confirmation.

✏ Edit Application

  • Click the Pencil icon. This opens a detailed settings panel where you can:

    • Restart the application

    • Stop Node.js

    • Run JavaScript scripts from package.json

    • Delete the application

    • Change Node.js version

    • Toggle between Production and Development modes

    • Set application root directory

    • Set application URL

    • Specify the startup file (e.g., app.js)

    • Run npm install

    • Add environment variables (Name/Value pairs)


Application Error Logs

With alt-mod-passenger version 5.3.7-3, support is added for the PassengerAppLogFile directive:

  • Syntax: PassengerAppLogFile path

  • Default: PassengerAppLogFile path-to-passenger-log-file

  • Context: Can be used in a virtual host or .htaccess file.

Passenger log messages will go to the default log file, while app-specific messages can be routed to another file using this directive.


By following the steps above, you can successfully set up and manage Node.js for your web applications through the end user interface provided by Bytesis Ltd..

Hjälpte svaret dig? 0 användare blev hjälpta av detta svar (0 Antal röster)