Deployment Options
- AWS EC2
- DigitalOcean
1
Launch EC2 Instance
Navigate to AWS Console and configure your instance:Instance Configuration:
- AMI: Ubuntu Server 22.04 LTS
- Instance Type: t3.medium or better
- Storage: 50 GB GP2/GP3 SSD minimum
- Security Group: Allow SSH (22), HTTP (80), HTTPS (443)
2
Configure Key Pair
Create or select an existing key pair for SSH access. Download the
.pem file and keep it secure.3
Add User Data Script
In Advanced Details → User Data, paste the appropriate script:
- Development (No Domain)
- Production (Domain Required)
4
Launch Instance
Review your configuration and click Launch Instance. Wait 5-10 minutes for the initialization script to complete.
5
Connect and Deploy
Connect to your instance via SSH:Navigate to the project directory and start the build:
6
Access Application
Development Setup:Production Setup:
For production, ensure your domain’s DNS A record points to your EC2 instance’s public IP address.
SSL Certificate Setup (Production Only)
After your application is running and DNS is properly configured, enable free SSL certificates:Service Architecture
| Service | Port | Internal URL | Description |
|---|---|---|---|
| Frontend (Next.js) | 3000 | http://localhost:3000 | Main web interface |
| Backend (Node.js) | 4050 | http://localhost:4050 | API server |
| MongoDB | 27017 | Internal only | Database |
| Redis | 6379 | Internal only | Cache/sessions |
Troubleshooting
- AWS EC2
- DigitalOcean
Instance Launch Issues
Instance Launch Issues
Common problems:
- Insufficient instance limits in your AWS account
- Security group not properly configured
- Key pair permissions too open
- Request limit increase in AWS Console
- Ensure security group allows SSH (22), HTTP (80), HTTPS (443)
- Set key pair permissions:
chmod 400 your-key.pem
SSH Connection Problems
SSH Connection Problems
Connection failures:
- Wrong key file or path
- Security group doesn’t allow SSH
- Instance not fully initialized
Application Access Issues
Application Access Issues
Cannot reach application:
- Security group doesn’t allow HTTP/HTTPS
- Application not started
- Wrong URL format
- Add inbound rules for ports 80, 443 (and 3000 for development)
- Check application status:
docker ps - Use correct URL format based on setup type
Pull access denied Error
Pull access denied Error
Error
- Error response from daemon:
pull access denied for <image-name>, repository does not exist or may require 'docker login'
- Clear Docker Build Cache and Rebuild
- Remove all Docker build cache and images
- Run the following command to clear all cached layers and build data:
docker builder prune -a -f - This command removes all unused build cache and intermediate images, ensuring a clean environment.
- Rebuild the application from scratch

