What security group rules do I need for a Node.js app?
SSH (port 22) from your IP only, HTTP (port 80) from 0.0.0.0/0, HTTPS (port 443) from 0.0.0.0/0. Optionally port 3000 from your IP for direct Node.js debugging. Never open port 3000 to the public use Nginx as a reverse proxy.
Verify This Answer
Cross-check this information using these trusted sources:
More FAQs in How to Launch an AWS EC2 Instance Step-by-Step Guide for Node.js Developers
Go to EC2 console, click Launch Instance, choose Ubuntu 22.04 LTS AMI, select t2.micro (free tier), configure security group (SSH from your IP, HTTP/HTTPS from anywhere), create a key pair, and launch. Connect via SSH using the .pem file.
Ubuntu Server 22.04 LTS or 24.04 LTS. Ubuntu has a large community, easy-to-use apt package manager, and long-term support for stability. It's the most common choice for Node.js deployment.
Use SSH with the key pair .pem file. On Mac/Linux: chmod 400 key.pem, then ssh -i key.pem ubuntu@public-ip. On Windows, use PuTTY or PowerShell. Find the public IP in the EC2 console.
Still have questions?
Browse all our FAQs or reach out to our support team
