Floxify (freelance) · Jan 2025 – Feb 2025
Zero-downtime Next.js hosting on AWS
Deployed Next.js apps on AWS EC2 with Nginx, HTTPS, PM2 clustering and GitHub Actions for high availability and zero-downtime restarts.
01Context
A freelance engagement to take Floxify's Next.js applications to production on AWS.
02Challenge
The apps needed to be highly available, served securely across subdomains, and updated without taking the site down on every release.
03Approach
- 01
Host on EC2
Deployed the Next.js apps on AWS EC2 with high availability and performance in mind.
- 02
Nginx at the edge
Configured Nginx as a reverse proxy for subdomain management, HTTPS (SSL/TLS) enforcement and DNS routing.
- 03
Zero-downtime restarts
Used PM2 process clustering for zero-downtime restarts and efficient resource use.
- 04
Automate releases
Automated CI/CD with GitHub Actions and self-hosted runners.
- 05
Harden
Applied security best practices: firewalls, IAM roles and performance monitoring.
04Architecture
1Visitors
- Browsers
2Routing
- DNS
- Nginx · SSL/TLS
- Subdomains
3App
- PM2 cluster
- Next.js on EC2
4Delivery
- GitHub Actions
- Self-hosted runner
Simplified view of how the pieces connect.
05Stack
06Outcomes
- Zero-downtime restarts with PM2 clustering
- HTTPS enforced across subdomains via Nginx
- Automated deploys through GitHub Actions
Details are generalised to respect employer and client confidentiality. Numbers shown are the ones I can share.
Building something similar?
Tell me about it. I'm happy to talk architecture, trade-offs and timelines.
Start a conversation