SakuraHost's shared and reseller hosting (including the Alpha platform) runs Node.js apps through cPanel's "Setup Node.js App" tool, which uses Apache + Passenger behind the scenes — not PM2 and not a systemd service. That's a VPS-only workflow; see How to Deploy a Node.js Application on Your VPS with PM2 if you have a VPS instead. This guide covers shared/reseller (cPanel) hosting specifically.
1. Register your app in cPanel
- Node.js version — pick the version your app was built against.
- Application mode — Production.
- Application root — the folder (relative to your home directory) your code will live in, e.g.
appormyapp. Write this down — you'll need the identical path in Step 2. - Application URL — the domain/subdomain this app should answer on.
- Application startup file — your entry point, e.g.
app.js,server.js, orindex.js.
2. Get your code into the Application Root
Option A: Git™ Version Control (recommended)
Open Git™ Version Control in cPanel and click Create (or Clone a Repository if you're pulling from GitHub/GitLab).
app but your repository path is repositories/myapp, your site will keep showing an empty folder no matter how many times you deploy — the code is landing somewhere Apache/Passenger isn't looking.
Add a .cpanel.yml file to the root of your repository to automate the deploy. DEPLOYPATH must also match your Application Root:
Replace USERNAME with your cPanel username and ea-nodejs20 with the Node version you selected in Step 1 (check ls /opt/cpanel/ | grep nodejs if unsure, or ask support). Then use "Pull or Deploy" in Git Version Control to push a new update whenever you commit changes.
Option B: Manual upload
If you're not using Git, upload your files directly into the Application Root folder via File Manager or SFTP. Your package.json, source files, and (if you're not letting cPanel install them) node_modules all need to live inside that exact folder.
3. Install dependencies
Go back to Setup Node.js App, click your application, and press Run NPM Install. This runs npm install inside the correct virtual environment for you — use this instead of a bare npm install from a generic terminal, since shared hosting accounts don't always have Terminal access enabled, and even when they do, you need the app's specific Node virtualenv activated first.
4. Start (or restart) the app
Passenger watches for a specific file to know when to reload your app. Either:
…or click the Restart button in Setup Node.js App. Your .cpanel.yml above already does this automatically on every Git deploy.
5. Verify it's actually live
Visit your domain. If you see your application, you're done. If you see a raw "Index of /" directory listing instead, work through this checklist:
- Is the app Enabled? Open Setup Node.js App and confirm the toggle is on. Accounts that have been migrated between servers sometimes come back with the app registered but disabled — this alone will produce exactly this symptom even when everything else is correct.
- Does the Application Root actually contain your files? Check via File Manager that
package.jsonand your entry file are really inside the folder you registered in Step 1 — not a sibling folder, not one level up or down. - Did NPM Install actually succeed? Re-run it from Setup Node.js App and read the output for errors.
- Did you touch restart.txt after the last deploy? Passenger caches the running process until it sees a newer restart.txt.