Skip to content
All case studies

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.

Deployment & DevOpsFull-stack

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

  1. 01

    Host on EC2

    Deployed the Next.js apps on AWS EC2 with high availability and performance in mind.

  2. 02

    Nginx at the edge

    Configured Nginx as a reverse proxy for subdomain management, HTTPS (SSL/TLS) enforcement and DNS routing.

  3. 03

    Zero-downtime restarts

    Used PM2 process clustering for zero-downtime restarts and efficient resource use.

  4. 04

    Automate releases

    Automated CI/CD with GitHub Actions and self-hosted runners.

  5. 05

    Harden

    Applied security best practices: firewalls, IAM roles and performance monitoring.

04Architecture

  1. 1Visitors

    • Browsers
  2. 2Routing

    • DNS
    • Nginx · SSL/TLS
    • Subdomains
  3. 3App

    • PM2 cluster
    • Next.js on EC2
  4. 4Delivery

    • GitHub Actions
    • Self-hosted runner

Simplified view of how the pieces connect.

05Stack

Next.jsAWS EC2NginxSSL/TLSPM2GitHub ActionsIAM

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