DocsGuides
Node.js apps
Runtimes, start commands, ports and package managers.
Guides 4 min read
DIGITALYCloud supports Node.js 24 LTS and 22 LTS. We recommend 24 LTS for new projects; Node.js 18 and 20 have reached end of life and can no longer be deployed.
Pin your Node version
Add an engines field so every deployment uses the same runtime as your machine.
package.json
{
"engines": { "node": "22.x" },
"scripts": { "start": "node server.js" }
}Listen on the right port
Web apps must listen on the port provided in process.env.PORT. Hard-coding a port is the most common reason for a failed health check.
server.js
import express from 'express';
const app = express();
app.get('/health', (_, res) => res.send('ok'));
app.listen(process.env.PORT ?? 3000);Package managers
We detect your package manager from the lockfile: package-lock.json (npm), pnpm-lock.yaml (pnpm) or yarn.lock (Yarn). Always commit your lockfile for reproducible installs.
Was this article helpful?