VPS1Euro Dashboard Wiki

Complete client guide: infrastructure, services, account and support.

FR EN

Install Node.js and PM2 (JavaScript applications)

Host Node.js applications (API, bots, web applications) in a stable manner.

What this tutorial does

The tutorial "Install Node.js and PM2 (JavaScript applications)" helps you achieve this goal:

Host Node.js applications (API, bots, web applications) in a stable manner.

← Back to tutorials
1 profiles 16 steps 14 commands ~20 min

Debian/Ubuntu

  1. Install Node.js LTS via NodeSource:
  2. curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
  3. apt install -y nodejs
  4. Check versions: node -v && npm -v
  5. --- Install PM2 (process manager) ---
  6. npm install -g pm2
  7. --- Start an application ---
  8. pm2 start app.js --name "mon-app"
  9. --- Useful PM2 commands ---
  10. List processes: pm2 list
  11. View logs: pm2 logs mon-app
  12. Restart: pm2 restart mon-app
  13. Stop: pm2 stop mon-app
  14. --- Automatic start at boot ---
  15. pm2 startup (copy and run the generated command)
  16. pm2 save (save the list of active processes)