#!/bin/bash # shell script for deploy node.js app (express.js app) curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - sudo apt install -y nodejs nodejs --version # need version 8.11.1 lts, includes npm 5.6.0 npm --version # need version >= 5.6.0 sudo apt install git cd /var/www/ git clone git@github.com:user-account/repo-name.git cd repo-name/server npm install nohup node server.js & # also use systemd or upstart # proccess run on 3002 port or this which is specified in the file server.js, you can change port