Deploy Nest JS App using PM2 to Linux Server

$ curl -sL | sudo -E bash -
$ sudo apt-get install -y nodejs
$ sudo npm i -g @nestjs/cli
$ sudo npm install pm2@latest -g
$ git clone
$ cd projectname
$ npm install
$ npm run build
$ pm2 start dist/main.js --name <application_name>
$ pm2 startup systemd
$ pm2 save




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Agile and Lean, what’s the difference?

Major StellarExpert Update

12 Best WordPress Backup Plugins for 2021 (Compared)

WordPress Backup Plugin

Processing high volume of unique messages exactly once while preserving order in a queue

Read [PDF] Books Oracle APEX 18.1

10 Best Facebook Pages Of All Time About Triathlon Coach

Binary Search Tree

Spring Microservices with Kubernetes on Google, Ribbon, Feign and Spring Cloud Gateway

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Daniel Santoso

Daniel Santoso

More from Medium

Reverse Proxy Nginx on Ubuntu 20 — Adonis JS Deployment using PM2

Get Started with RabbitMQ in Node.js

How to implement API Authentication with JSON Web Tokens and Passport

Containerise Nodejs with Docker