Provider guide

Host Next.js on AWS Lightsail

Deploy Next.js on Amazon Lightsail with a Linux bundle, static IP, firewall, DNS, TLS, cost examples, and rollback plan.

By HostNextJS Editorial TeamReviewed by HostNextJS Technical Review Published Updated
01Typeprovider
02Last reviewed
03Update policyCheck Lightsail bundles and transfer terms every 30 days; review instance, IP, firewall, and DNS steps every 90 days.
Provider-specific scope

What is specific to Amazon Lightsail

This is a Lightsail guide: fixed instance bundles, a Lightsail static IPv4 address, separate IPv4 and IPv6 firewalls, and either Lightsail DNS or Route 53. EC2, ECS, App Runner, Amplify, and Lambda require different architecture and pricing analysis.

Products and locations

Choose the right provider surface

  • 01General purpose Linux bundles combine vCPU, memory, SSD storage, and a transfer allowance; compute-optimized and memory-optimized bundles target different workload shapes.
  • 02Select a Lightsail Region close to users and data, then verify bundle and service availability plus the Region-specific transfer allowance before launch.
Before you start

Prerequisites

  • 01An AWS account with Lightsail access and a billing alert strategy
  • 02A domain and authority to edit its DNS records
  • 03A tested Next.js production or standalone build
  • 04An SSH access, snapshot, data-backup, and rollback plan
Manual path

Deployment sequence

  1. 01Create the Lightsail instance

    Choose a Region, Availability Zone, Linux OS-only blueprint, bundle, SSH key, and resource name. Avoid application blueprints that add an unrelated software stack.

  2. 02Attach a static IPv4 address

    Replace the instance's restart-sensitive dynamic IPv4 address with a same-Region Lightsail static IP before publishing DNS.

  3. 03Configure firewall and runtime

    Restrict SSH where possible, allow HTTP and HTTPS in the applicable IPv4 and IPv6 firewalls, then run Next.js privately behind a supervised reverse proxy.

  4. 04Publish DNS and validate

    Create an A record for the static IP in Lightsail DNS, Route 53, or the existing DNS host; issue TLS, exercise production routes, and keep rollback available.

Network and domain

Firewall, DNS, and TLS

  • 01Attach a static IPv4 address because the default public IPv4 changes after a stop and restart.
  • 02Review IPv4 and IPv6 firewall rules independently when IPv6 is enabled; allowing one protocol family does not configure the other.
  • 03Allow public TCP 80 and 443, restrict TCP 22 by address where possible, and keep the Next.js port private.
  • 04Use an A record for the static IPv4 and treat AAAA carefully because Lightsail does not provide static IPv6 addresses.
Dated examples

Cost reference

01 · Linux 1 GB bundle with IPv4USD 7/month

Micro bundle example with 2 vCPUs, 1 GB memory, 40 GB storage, and 2 TB transfer, checked 2026-07-12; regional transfer terms can vary.

02 · Linux 2 GB bundle with IPv4USD 12/month

Small bundle example with 2 vCPUs, 2 GB memory, 60 GB storage, and 3 TB transfer, checked 2026-07-12.

03 · Linux 2 GB IPv6-only bundleUSD 10/month

IPv6-only example checked 2026-07-12; use only when the complete client, DNS, administration, and dependency path supports IPv6.

HostNextJS is independent and is not affiliated with or endorsed by Amazon Web Services. AWS and Lightsail are trademarks of Amazon.com, Inc. or its affiliates.

Amazon Lightsail is the clearest AWS path for a single self-managed Next.js server. It reduces the number of AWS services required for the first deployment while keeping a path into the wider AWS ecosystem. This simplicity is also the boundary: an EC2, ECS, or serverless design needs a separate guide.

Select an OS-only blueprint

Choose a maintained Linux OS blueprint so the application stack remains explicit. A prepackaged application blueprint can introduce a web server, runtime, directory layout, or update process that conflicts with the intended Next.js deployment. Select a bundle from measured memory and CPU needs; 1 GB is a constrained starting point for builds and image processing, even when it can serve a small prebuilt application.

Bundle transfer allowances vary by Region. Confirm the target Region and current allowance rather than copying a US figure into every estimate. Place databases and storage with the application when latency and transfer costs matter.

Stabilize the address before DNS

Lightsail’s default public IPv4 changes after stopping and restarting the instance. Create a same-Region static IP and attach it before creating the A record. Static IPv6 is not supported, so an AAAA record can require maintenance after resource replacement or IPv6 changes.

Lightsail exposes separate IPv4 and IPv6 firewalls. Review both when dual stack is enabled. Open only HTTP and HTTPS publicly, restrict SSH where feasible, and do not expose the private Next.js listener.

Build recovery beyond snapshots

Use snapshots as one server-recovery input, not the whole backup plan. Databases, object storage, DNS, certificates, and secrets can live outside the instance. Record how each is restored and test that process.

For release validation, create a candidate instance or restore point, test the production hostname and critical routes, then move the static IP or DNS only after health checks pass. Preserve the previous compatible release through the rollback window.

Methodology

How this resource was produced

This guide intentionally uses Amazon Lightsail rather than assembling an EC2 architecture. It maps Lightsail bundles, static IPs, instance firewalls, DNS zones, snapshots, and transfer allowances to the official Next.js Node.js self-hosting model.

Limitations
  • 01

    Lightsail simplifies AWS infrastructure but remains self-managed compute; you own the OS, Node.js, reverse proxy, monitoring, backups, and incidents.

  • 02

    The fixed bundle model and Lightsail networking are less flexible than a deliberate EC2/VPC architecture.

  • 03

    Snapshots, DNS zones beyond included quotas, load balancers, databases, object storage, and transfer beyond allowances can add cost.

FAQ

Questions about host next.js on aws lightsail.

No fog. Just the practical details developers need before moving a production app.

Why use Lightsail instead of EC2 for this guide?

Lightsail packages the server, disk, transfer allowance, firewall, and simple networking into a smaller decision surface. EC2 is appropriate when a team needs deeper VPC, scaling, identity, or instance-family control.

Can I point DNS at the default instance IP?

Do not rely on the default dynamic IPv4 for production DNS because it changes when the instance is stopped and restarted. Attach a static IP first.

Next step

Turn the resource into a deployment decision.

Plan an AWS deployment