Logo Node.js Stack

Development

Node.js Stack

Node.js, PM2, Nginx and a database — a production environment for your JavaScript APIs and apps.

About Node.js Stack

The Node.js Stack template provides a production-ready environment for your JavaScript and TypeScript applications: Node.js LTS, PM2 as the process manager, Nginx as a reverse proxy, and PostgreSQL or MongoDB depending on your needs. PM2 handles clustering, automatic restarts and monitoring of your Node processes.

Whether you deploy an Express/Fastify API, a NestJS application or a WebSocket server, this template configures the essential components — log management, multi-core clustering, secure environment variables — so you can focus on your code.

What gets installed

Ready when the VPS starts

Compatible OS
Ubuntu 24.04
Application
Node.js Stack
Tech stack
Node.js LTSPM2NginxNVMPostgreSQL
Minimum RAM
2 GB
Minimum CPU
1 vCPU
Access
root over SSH

Key features

  • Node.js LTS (recommended stable version)
  • PM2 for clustering, monitoring and automatic restart
  • Nginx reverse proxy with header management
  • PostgreSQL and secure environment variables
  • NVM installed to switch Node versions easily
  • PM2 and Nginx logs configured with rotation

When to use this solution?

Node.js REST API

Deploy an Express, Fastify or NestJS API in production with PM2 cluster mode to use every CPU core.

Real-time application

Host a WebSocket server or a Socket.io application with PM2 handling restarts automatically.

Full-stack JavaScript backend

A server for a Next.js, Nuxt (SSR) or Remix application in production mode.

Guide

Deploy Node.js Stack on your VPS

  1. Create the VPS

    Select the "Node.js Stack" template when ordering. Minimum 2 GB RAM.

  2. Deploy your application

    Clone your repository, install the dependencies with npm ci --production, and build if needed.

  3. Start with PM2

    Launch with pm2 start app.js --name "mon-api" -i max for cluster mode. Save with pm2 save and pm2 startup.

  4. Configure Nginx

    Edit the Nginx virtualhost to point to your Node application's port. SSL with Certbot.

Frequently asked questions

Questions about Node.js Stack

← Back to DevelopmentAll applications
The latest stable LTS version. NVM is available to switch versions easily depending on your project's needs.

Embed the deploy button

Maintaining a project that uses Node.js Stack? This button lets your readers deploy it on a VPS in one click, without reading Docker documentation.

Deploy Node.js Stack on ServOrbit
Markdown
[![Deploy Node.js Stack on ServOrbit](https://servorbit.com/brand/deploy/button.svg)](https://servorbit.com/vps-cloud?template=nodejs-stack&utm_source=deploy-badge&utm_medium=referral&utm_campaign=nodejs-stack)
HTML
<a href="https://servorbit.com/vps-cloud?template=nodejs-stack&utm_source=deploy-badge&utm_medium=referral&utm_campaign=nodejs-stack"><img src="https://servorbit.com/brand/deploy/button.svg" alt="Deploy Node.js Stack on ServOrbit" height="40"></a>

The button points to a VPS order with the template preselected. The image is served from servorbit.com — nothing to host on your side.

Need help?

Browse our help center and FAQ, or reach our team — callback, WhatsApp or email.

Message us on WhatsAppopens in a new tab