Skip to content

Instantly share code, notes, and snippets.

@byurhannurula
Last active May 30, 2020 15:34
Show Gist options
  • Save byurhannurula/ca7ecfb18099fb77dfcfe032b21dff80 to your computer and use it in GitHub Desktop.
Save byurhannurula/ca7ecfb18099fb77dfcfe032b21dff80 to your computer and use it in GitHub Desktop.
Setup Nginx server with Node.js on Ubuntu Server

Node.js Deployment

Steps to deploy a Node.js app to Ubuntu Server VM using PM2, NGINX and an SSL from LetsEncrypt

1. Create VM

2. Install Curl

*Update apt packages*

sudo apt update
sudo apt upgrade

sudo apt install curl

2. Install Node/Npm

curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -

sudo apt-get install -y nodejs

node --version

4. Instal PM2

npm install -g pm2

5. Instal Nginx


5. Clone your project from Git

git clone https://github.com/.../...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment