Guide

Deploy Next.js on a $6 VPS (Full Guide)

Deploying Next.js on a VPS means provisioning a Linux machine, installing Node, building your app, running it behind a process manager, and putting a reverse proxy in front for HTTPS. A DigitalOcean $6/mo Droplet (1 GiB RAM) is the realistic floor for a real Next.js build; Hostinger's KVM 1 at $6.49/mo offers more RAM but requires a 2-year commitment.

What you need first

You need a VPS with at least 1 GiB of RAM, SSH access, and a domain if you want HTTPS on a real URL rather than a bare IP address. DigitalOcean's $6/mo Basic Droplet gives you 1 vCPU, 1 GiB RAM, 25 GiB SSD, and 1,000 GiB of transfer — the realistic floor for a Next.js build, since the $4/mo tier's 512 MiB RAM is too small for most Node or Docker workloads. Hostinger's KVM 1 is a comparable starting point at $6.49/mo, offering 1 vCPU, 4 GB RAM, 50 GB NVMe storage, and 4 TB bandwidth, though that price is promotional on a 2-year commitment and renews at $11.99/mo.

You'll also want Node.js installed on the server, a process manager to keep your app running and restart it on crashes, and a reverse proxy for TLS termination and routing traffic to your Next.js process on a non-privileged port.

Step-by-step

Deploying Next.js on a VPS is a sequence of six steps, from provisioning the server through setting up a repeatable deployment workflow, and none of them are specific to either DigitalOcean or Hostinger beyond the initial provisioning step.

  1. Provision your VPS — a $6/mo DigitalOcean Droplet or a Hostinger KVM 1 instance — and connect over SSH, then update the system packages and install Node.js.
  2. Clone your Next.js project onto the server, or set up a deployment pipeline that pushes a build to it, and run your install and build commands to produce a production build.
  3. Install a process manager to run your Next.js app persistently, keep it alive across reboots, and restart it automatically if it crashes.
  4. Install and configure a reverse proxy in front of your Next.js process, pointing your domain at the server and handling HTTPS certificate issuance and renewal.
  5. Test the deployment end to end — load the site over HTTPS, confirm server-rendered routes work correctly, and check that static assets are served properly through the proxy.
  6. Set up a basic deployment workflow so future updates don't require manually repeating every step — even a simple script that pulls the latest code, rebuilds, and restarts the process manager saves real time on every future deploy.

Because DigitalOcean bills hourly with a monthly cap, you can test this whole process on a fresh Droplet and destroy it without further cost if something goes wrong early on — a useful way to practice the setup before committing to a longer-running instance. Hostinger's pricing works differently, since the advertised rate assumes the 2-year term up front, so there's less room to experiment cheaply before committing.

Common problems

The most common problem is running out of memory during the build step, especially on a 512 MiB instance — this is exactly why $6/mo with 1 GiB RAM on DigitalOcean, or Hostinger's considerably larger 4 GB on KVM 1, is the more realistic starting point than the cheapest possible tier. If your build process runs out of memory, the fix is usually more RAM, not a different Next.js configuration.

The second common problem is forgetting the reverse proxy and trying to run Next.js directly on a standard web port, which either requires running the process as root — a security risk — or fails outright for a non-root user. Configure the reverse proxy from the start rather than treating it as an afterthought once the app is already running on a non-standard port.

The third is skipping the process manager and running Next.js in a plain terminal session, which means the app stops the moment you disconnect from SSH. A proper process manager keeps the app running persistently and restarts it automatically, which matters a lot the first time your app crashes at 2am with nobody watching.

Bandwidth is a less common but real concern: DigitalOcean's $6/mo Droplet includes 1,000 GiB of transfer, and Hostinger's KVM 1 includes 4 TB — both generous, but worth monitoring if your app serves a lot of media or has unexpectedly high traffic, since exceeding included transfer adds cost on either platform.

A less obvious problem is CPU throttling on shared-CPU tiers, since DigitalOcean's Basic Droplets are described as suited to bursty workloads rather than sustained heavy load — a Next.js app doing a lot of server-side rendering under sustained traffic can hit that throttle sooner than a mostly-static site would. If your app leans heavily on server rendering rather than static generation, budget for a bigger instance than the bare minimum, and watch CPU usage under real load rather than assuming the entry tier will hold up indefinitely.

What to do next

Once your Next.js app is live and stable, set up basic monitoring so you notice downtime or resource exhaustion before your users do — neither DigitalOcean nor Hostinger monitors your application for you, since patching, backups, and monitoring are entirely on you as the customer on a self-managed VPS. Automate backups of anything stateful your app depends on, since a server failure without a backup plan can mean real data loss.

If you find yourself wanting more RAM or CPU as traffic grows, both providers offer higher tiers you can move to — DigitalOcean's Droplets scale up incrementally, and Hostinger's KVM plans go up to KVM 8 at $25.99/mo for 8 vCPU and 32 GB RAM. If you're deciding between these two providers more broadly rather than just for this one deployment, our DigitalOcean vs Vultr and DigitalOcean vs Hetzner comparisons cover other VPS options, and our Hostinger vs SiteGround comparison is worth a look if you're specifically weighing Hostinger's renewal pricing against another budget host.

Frequently asked questions

How much RAM does a VPS need to run Next.js?

512 MiB is too small for most Node or Docker workloads, so $6/mo for 1 GiB RAM on DigitalOcean is the realistic floor. Hostinger's KVM 1 at $6.49/mo gives considerably more headroom at 4 GB RAM, on a 2-year commitment.

Is a $4/mo Droplet enough to run Next.js?

Not reliably. DigitalOcean's $4/mo Basic Droplet has only 512 MiB RAM, which is too small for most Node or Docker workloads — the build step alone can exceed that. The $6/mo tier with 1 GiB RAM is the practical starting point.

Why does Hostinger's VPS price double after the first term?

Hostinger's advertised VPS rates are promotional and apply to an initial 2-year commitment; renewal prices are roughly double on every tier. KVM 1 goes from $6.49/mo to $11.99/mo at renewal, for example.

Do I need a reverse proxy to deploy Next.js on a VPS?

Yes, if you want HTTPS on a real domain and want to run the app on standard web ports without running Node as root. A reverse proxy sits in front of your Next.js process and handles TLS termination and routing.

Who manages patching and backups on a VPS?

You do. Both DigitalOcean and Hostinger VPS plans put patching, backups, and monitoring on the customer — that's the trade-off for the flat, predictable pricing compared with a managed platform that handles it for you.