Skip to content

Deploying Node.js App on an AWS EC2 Instance

Jason H Ky edited this page Dec 14, 2023 · 17 revisions

Introduction

This guide serves to provide instructions on how one can deploy a NodeJS application on an AWS EC2 Linux instance.

Steps

1. Creating an AWS EC2 Instance

The steps involving creating an AWS EC2 instance are detailed in the following page:

2. SSH into the instance

There are several methods in which you can SSH into your EC2 instance

Using an SSH Client:

EC2 Instance Connect:

image

3. Installing NodeJS

We install nvm (node version manager) by using the following command:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash

Using nvm, we install Node.js with the below command:

nvm install