Before You Start
- Your Node.js app files must already be on the server — upload them via FTP, SSH, or the File Manager
- Your app must listen on a port (use
process.env.PORT— the panel passes it automatically) - Run
npm installinside your app directory before deploying
Step 1 — Prepare Your App
Make sure your app reads the port from the environment:
// server.js
const express = require('express');
const app = express();
const PORT = process.env.PORT || 3000;
app.get('/', (req, res) => res.send('Hello from Opterius!'));
app.listen(PORT, () => console.log(`Listening on port ${PORT}`));
Step 2 — Install Dependencies
SSH into your server (or use the Web Terminal) and run:
cd /home/myuser/mydomain.com
npm install --production
Step 3 — Deploy in the Panel
- Go to Node.js in the sidebar
- Click Deploy App
- Fill in the form:
- Domain — the domain Nginx should proxy to your app
- App Name — a short identifier (e.g.
apiormyapp). Used as the PM2 process name. - Startup Command — the command to start your app (e.g.
node server.jsornpm start) - Port — the port your app listens on (e.g.
3000)
- Click Deploy App
The panel will:
- Start your app with PM2 under your account user
- Configure Nginx to proxy your domain to the specified port
- Redirect all HTTP traffic to HTTPS
Startup Commands
| App type | Startup command |
|---|---|
| Plain Node.js | node server.js |
| npm start script | npm start |
| Express (direct) | node index.js |
| Next.js | npm run start |
| Fastify | node app.js |
Checking the App Is Running
After deploying, visit your domain. If the page doesn't load:
- Go to Node.js → your app → Logs — check for startup errors
- Verify
npm installwas run in the working directory - Make sure your app actually listens on the port it was given
Re-deploying After Code Changes
The panel does not auto-deploy on file changes. After updating your app files:
- Go to Node.js → your app
- Click Restart
Or via SSH:
pm2 restart myuser_myapp