How to setup nodejs app in the cpanel Print

  • 1

Getting your Node.js app live on cPanel takes just a few minutes with the built-in Node.js selector. Here’s the complete step-by-step process:

  1. Log in to cPanel.
  2. Under the “Software” section, click Setup Node.js App.
  3. Click the Create Application button.
  4. Fill in the details:
  • Choose the required Node.js version (16, 18, 20, 22, etc.)
  • Select Application mode (Production or Development)
  • Set Application root (the folder that will contain your app files, e.g., nodeapp or public_html/myapp)
  • Choose the domain or subdomain where the app will run
  • Enter the Application startup file (usually app.js, server.js or index.js)
Add any required environment variables (DB credentials, API keys, etc.) in the fields below. Click Create. cPanel will automatically set up the virtual environment. Upload your project files (including package.json) to the Application root folder using File Manager or FTP. Return to the Setup Node.js App page, locate your new application, and click Run NPM Install to install all dependencies. After the installation completes, click Restart. Visit your domain/subdomain — your Node.js app is now running!

If the app doesn’t start, click View Log to check for errors, or look inside the .logs directory in your application root.

That’s all — your Node.js application is successfully deployed!


Was this answer helpful?

« Back