Deploy a NestJS app on OrbixPanel
NestJS deploys as a Node server app: OrbixPanel builds it and runs it behind a reverse proxy.
Scripts in your repo
{ "scripts": { "build": "nest build", "start:prod": "node dist/main.js", "start": "node dist/main.js" }}OrbixPanel runs npm ci → npm run build → npm start. Make sure a start
script runs the compiled output (dist/main.js) — not nest start (that’s for
development).
The $PORT rule
OrbixPanel sets a PORT env var and proxies to it. In main.ts:
await app.listen(process.env.PORT ?? 3000, '0.0.0.0');Binding process.env.PORT on 0.0.0.0 is what lets the reverse proxy reach your
app and the health check pass. See how deploys work.
Database & config
- Create a database and connect on
localhost(TypeORM/Prisma/Mongoose all fine). - Keep secrets in environment variables
and read them via
@nestjs/config. - Run migrations after the first deploy — update & maintain apps.
Deploy
Apps → Deploy from Git → repo + branch → Deploy → add domain + SSL.
Troubleshooting
- 502 after deploy → not listening on
process.env.PORT, or a crash on boot (check the deploy log). → Fix 502 - Build fails → run
npm run buildlocally first; the log shows the TS error.
Running OrbixPanel? NestJS deploys from Git with a managed database alongside. OrbixPanel.com → — the free, self-hosted, AI-powered hosting control panel.