Get a free website with any plan

See how
APPLICATIONS

Node.js apps in cPanel

Last updated

IN SHORT

Flashcloud runs Node.js applications on shared and WordPress hosting using cPanel's Setup Node.js App tool. The tool creates an isolated environment pinned to your chosen Node version, runs your startup file, and supervises the process so it restarts automatically if it crashes. You do not need to configure your own process manager.

Node.js apps run on Flashcloud shared and WordPress hosting through cPanel's Setup Node.js App tool. You don't provision a process manager, reverse proxy, or systemd service yourself. Pick a Node version, tell cPanel where your code lives and what file starts it, and cPanel keeps the process running.

See Deploying a Node.js app for the full walkthrough; this article covers the parts people get stuck on.

Creating the application

Open cPanel from your hosting service (see Accessing cPanel if you need the one-click login), then find Setup Node.js App under Software. Click Create Application and set:

  • A Node.js version from the dropdown.
  • The Application root, the folder your code lives in relative to your home directory.
  • The Application URL, the domain or subdomain the app answers on.
  • The Application startup file, the entry point that boots your server, typically app.js, server.js, or index.js.

Saving creates an isolated environment for the app pinned to the Node version you chose. That pin is per-application: if you add a second app on a newer Node version later, it won't disturb this one.

Installing dependencies

Get your files onto the server before installing anything, either through the portal's file manager, an FTP/SFTP client, or by pulling from a repository with Git Version Control in cPanel. Once your package.json is in the application root, open Setup Node.js App, find your application in the list, and use its detail page to run npm install with the app's pinned Node version rather than whatever Node happens to be on the system path.

Starting and restarting the app

Once dependencies are installed, go back to Setup Node.js App and start the application. cPanel keeps the process running and restarts it if it crashes. After you deploy new code or change environment variables, use the restart option on the same screen. Don't rely on the process picking up changes on its own.

If your app reads configuration from environment variables, set them in Setup Node.js App rather than a local .env file the process might not load.

Scheduled and background work

If part of your app is a scheduled task rather than the long-running server itself, such as a nightly cleanup script or a periodic queue drain, don't try to run it as a second Node process inside the same app. Drive it from Cron Jobs instead, using the app's own Node environment to invoke the command.

Why not run node directly over SSH

You can start a Node process manually over SSH, but it dies when your shell session ends unless you wrap it in something like screen, tmux, or a process manager you maintain yourself. Setup Node.js App exists so you don't have to build that yourself. cPanel supervises the process and restarts it on crash. Use the tool rather than a bare node app.js &.

When Node.js on shared hosting isn't enough

Setup Node.js App handles typical apps well: web servers, APIs, small background workers driven by cron. If your app needs high concurrency, WebSocket connections held open for long periods, custom native dependencies, or a build toolchain heavier than npm install, a VPS gives you dedicated resources and full control instead of a shared slot. Tell our team what the app needs.

If the app won't start

  • Wrong startup file: confirm the entry point in Setup Node.js App matches the file that actually calls listen() or otherwise boots your server.
  • Missing modules: make sure you ran npm install using this application's own Node version, not a system-wide npm.
  • Port conflicts: let cPanel assign the port through the environment variable it provides rather than hardcoding a port number in your app.
  • Application root mismatch: the root must point at the folder containing package.json, not a parent or subfolder.

If you've checked all of that and the app still won't come up, open a ticket from the portal's Support section. It's a real person on the other end, not a bot, and they'll help you troubleshoot the app.

Common questions

Why did my code changes not show up?

Restart the application in Setup Node.js App. The process does not pick up file edits or environment variable updates on its own.

Can I start my app directly over SSH?

Do not run it directly over SSH. A process started in a shell session dies as soon as you disconnect. Setup Node.js App keeps the server alive and restarts it if it crashes.

Why won't my Node app start?

Startup failures usually come from incorrect startup files, missing modules, hardcoded port numbers, or an incorrect application root folder. Make sure your startup file boots the server and that you installed modules using the app's tool in cPanel.

How do I run a scheduled background script?

Use Cron Jobs in cPanel rather than running a second background process in your app. Call your script through cron using the application's assigned Node environment.

CAN'T FIND IT?

Real humans answer fast.

Hosting with us? Open a ticket and a real person replies - no scripts, no upsells. Still choosing a host? The same team is included with every plan, from day one.