Skip to content
Node.js hosting

Deploy any Node.js app straight from your repo

Point DployHub at a repository with a package.json and we work out the rest: the package manager from your lockfile, the build script, the start command and the port. Every deploy lands on a free staging environment first, and one click promotes that exact build to live. No servers to pick, no Dockerfile to write.

Free staging (0.25 vCPU · 256 MB · 1 GB) · Live from ₹118.50/month, billed hourly · No servers to manage

What we detect

Sensible Node.js defaults, no config files.

When you connect the repository we read it and fill in the build settings below. Every value can be changed in the app’s settings — see build settings.

Runtime
Node.js 20 (node:20-alpine, NODE_ENV=production)
Port
From your start script (PORT=4000 or --port 4000), else a literal in your entry file, else 3000
Build command
npm run build (yarn build / pnpm build) — only if a build script exists
Start command
npm start if a start script exists, else node server.js / index.js / app.js
Step by step

Deploy Node.js in minutes.

  1. 1

    Make the app listen on PORT

    Use process.env.PORT and bind to 0.0.0.0. We always set PORT for you, so app.listen(process.env.PORT || 3000, '0.0.0.0') works everywhere.

  2. 2

    Commit your lockfile

    We pick the package manager from it: pnpm-lock.yaml means pnpm, yarn.lock means yarn, otherwise npm (npm ci when package-lock.json exists).

  3. 3

    Create the app

    Open New app, choose GitHub, a public Git URL or a Docker image, and leave How to build it on Figure it out for me. Set Folder with your app if it lives in a monorepo subfolder like apps/api.

  4. 4

    Pick live resources

    Choose vCPU, memory and storage and see the monthly price before you create. The default 0.5 vCPU, 512 MB and 5 GB comes to ₹255 a month, billed hourly.

  5. 5

    Watch the build, then go live

    Build logs stream in the Deployments tab. The first deploy goes live automatically; after that, pushes land on staging and you click Go live when you are happy.

Tips

Running Node.js well in production.

Staging is free

Every app gets a staging copy in a free, lightweight Docker container (0.25 vCPU · 256 MB · 1 GB). It pauses after 7 days without a deploy — one click starts it again.

  • Add a start script to package.json. Without one we fall back to main, then server.js, index.js, app.js, src/index.js or src/server.js; if none exists the build stops with a clear error.
  • TypeScript projects: have build run tsc and start run node dist/index.js. Keep typescript where the build can install it, since the build runs with your normal install step.
  • If you use NestJS, a start:prod script is preferred automatically, so npm run start:prod is what runs in production.
  • Write uploads or SQLite files under /data — it is the persistent storage you chose for live. Anything else in the container is reset on every deploy or restart.
  • Log to stdout and stderr with console.log or a logger like pino. The Logs tab shows the latest lines from staging or live on demand.
  • Staging is a free 0.25 vCPU · 256 MB · 1 GB container. If your app needs more memory than that to boot, trim startup work; live can be sized up to 16 GB.
Which Node.js version do you use?

Auto-detected Node apps build on Node.js 20 (`node:20-alpine`). If you need a different version, add a Dockerfile to the repo and we build with it instead — see [Use your own Dockerfile](/docs/use-your-own-dockerfile).

Why did my deploy fail with 'didn't answer on port'?

Your app has to answer HTTP within 90 seconds on the configured port. Listen on `process.env.PORT` and `0.0.0.0`, or change the port in the app settings. [Port and health checks](/docs/port-and-health-checks) has the details.

Do pushes deploy automatically?

Yes, for apps connected through GitHub: a push to the app's branch builds and deploys to staging. Public Git URL and Docker image apps deploy with the Deploy button.

What does a small Node API cost?

Staging is free. A live app at 0.25 vCPU, 256 MB and 1 GB is ₹118.50 a month; 1 vCPU, 1 GB and 10 GB is ₹510. See [pricing](/pricing).

Ship your Node.js app today.

Create an account, connect your repository and get a free staging copy plus a live HTTPS address in minutes.