Node.js + PM2 on VPS: Deploying Applications

VDS / VPS Servers · 10.05.2025
Node.js + PM2 on VPS: Deploying Applications

Install Node.js 20 LTS

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs && sudo npm install -g pm2

Deploy App with PM2

pm2 start npm --name "myapp" -- start
pm2 save && pm2 startup systemd
pm2 list | pm2 logs myapp | pm2 monit
← Back to Knowledge Base Ask Support