Terminal access
You need shell access to install packages and build your app. Open Terminal in cPanel, or ask us to enable SSH on your account. It is free — just email support.
Apps run under the Phusion Passenger application server, managed from the Application Manager icon in cPanel. There is no extra charge and no separate control panel to learn.
v22.23.210.9.8Phusion Passenger 6.1.8/opt/cpanel/ea-nodejs22/bin/node4 (more on request)SupportedYou need shell access to install packages and build your app. Open Terminal in cPanel, or ask us to enable SSH on your account. It is free — just email support.
A Node project with a package.json. You can pull it from GitHub using cPanel's Git Version Control, or upload a zip through File Manager.
Each app is served by one domain or subdomain. We recommend a dedicated subdomain such as app.yourdomain.com — it keeps the app clear of your main site's rules.
The example below deploys an app called myapp for the account myuser on app.yourdomain.com. Substitute your own names throughout.
In cPanel go to Domains → Create A New Domain. Enter app.yourdomain.com, untick Share document root, and set the document root to:
/home/myuser/myapp/public
This matters: Passenger expects your application folder to be /home/myuser/myapp and it serves static files out of a public sub-folder inside it. The public folder must exist, even if it stays empty — the app will not start without it.
Your project files go in /home/myuser/myapp — one level above the document root. The easiest route is cPanel's Git Version Control: click Create, tick Clone a Repository, paste your repo URL and set the path to /home/myuser/myapp.
Or from Terminal:
cd ~ git clone https://github.com/you/myapp.git myapp mkdir -p myapp/public
app.jsPassenger starts your application by loading app.js in the application folder. Your app must listen on the port Passenger provides in process.env.PORT.
A plain Node or Express app:
// app.js
const express = require('express');
const app = express();
app.get('/', (req, res) => res.send('Hello from RTL'));
app.listen(process.env.PORT || 3000);
A Next.js app needs a small custom server. Create this as app.js next to your package.json:
// app.js
const { createServer } = require('http');
const next = require('next');
const app = next({ dev: false, dir: __dirname });
const handle = app.getRequestHandler();
app.prepare().then(() => {
createServer((req, res) => handle(req, res))
.listen(process.env.PORT || 3000);
});
Open Terminal in cPanel. Put the server's Node on your path first — the system node is not the one your app will run under:
export PATH=/opt/cpanel/ea-nodejs22/bin:$PATH cd ~/myapp npm ci npm run build # Next.js and other build steps
Add that export line to your ~/.bashrc so you do not have to repeat it each session.
In cPanel open Application Manager (under Software) and click Register Application. Fill in:
myapp/home/myuser/myappapp.yourdomain.com/ProductionAdd any environment variables your app needs (database URLs, API keys, NODE_ENV) under Add Environment Variable. Tick Enabled and save. Your app is now live.
Passenger keeps your app running between requests, so new code is not picked up until you restart it. Either hit Restart in Application Manager, or from Terminal:
cd ~/myapp mkdir -p tmp touch tmp/restart.txt
The next request will start a fresh process.
If you cloned with Git Version Control, add a .cpanel.yml file to the root of your repository so a push rebuilds and restarts the app automatically:
---
deployment:
tasks:
- export PATH=/opt/cpanel/ea-nodejs22/bin:$PATH
- cd /home/myuser/myapp
- /opt/cpanel/ea-nodejs22/bin/npm ci
- /opt/cpanel/ea-nodejs22/bin/npm run build
- mkdir -p /home/myuser/myapp/tmp
- touch /home/myuser/myapp/tmp/restart.txt
Then push your changes and click Deploy HEAD Commit in Git Version Control.
Almost always a missing public folder inside the application path, or a document root that does not end in /public. Check both, then restart the app.
That is Passenger reporting a crash on startup. Set the Deployment Environment to Development in Application Manager to see the stack trace in your browser, fix it, then switch back to Production.
Running node -v in Terminal shows the system Node, not the app's. Always export PATH=/opt/cpanel/ea-nodejs22/bin:$PATH before npm commands.
The old process is still serving requests. Restart the app from Application Manager or touch tmp/restart.txt.
Stuck, or want us to do the first deployment for you? We are happy to help.