Get started

Set Up Node.js and PM2 on Your AtoZNode VPS

Node.js (LTS) and PM2 come installed. Run your app, keep it alive after reboots and put Nginx in front of it.

Order Node.js + PM2 from the Marketplace App tab as shown in how to order a VPS with a one-click app. When the install card on your server page shows the finished result, follow the steps below.

What you get

The current LTS release of Node.js, npm and PM2, a process manager that keeps apps running. It needs 1 GB of memory and takes 2 to 5 minutes. The server page shows the versions.

1. Check it

Connect with SSH:

node -v
npm -v
pm2 -v

2. Run your app

Upload your project, install what it needs and start it with PM2:

cd ~/myapp
npm install
pm2 start server.js --name myapp
pm2 save
pm2 startup

pm2 startup prints one more command; run that, and your app starts again after a reboot.

3. Put it on a domain

The full walk-through is in host a Node.js app on a VPS, which covers Nginx as a reverse proxy. Add HTTPS with Certbot.

Next steps

Still stuck? Contact our team or open a support ticket.

Need a server to try this on?

Cloud VPS plans start at ₹899 a month, with full root access.