Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Vercel Alternative 2026: Self-Host Next.js on Your Own VPS (Step by Step)

Description and use

Self‑hosting Next.js on a VPS gives infrastructure control, consolidates projects, and supports server‑side features while retaining most Vercel benefits like HTTPS, rollback, and build.

Problem

Users want to run Next.js on their own VPS instead of Vercel to control infrastructure, consolidate projects, or use server‑side features.

Outcome

Self‑hosting Next.js on a VPS replicates most Vercel features—build, URL, HTTPS, rollback—while giving full control over infrastructure and avoiding per‑PR preview URLs.

Workflow

  • Prepare the server: add user, install nginx, git, Node, and PM2
  • Clone the repo, copy .env.example to .env.production, install deps, build the app
  • Start the app with PM2 and save the process list
  • Configure Nginx reverse proxy to forward to the app port
  • Obtain and install an HTTPS certificate with Certbot
  • Plan and implement a safe rollback strategy using release directories

Evidence

Vercel is the smoothest way to ship Next.js. Connect a repo, push, and you have a URL with HTTPS.

Source

This guide shows how to self-host a Next.js app on a Linux VPS, first the manual way, then the shortcut with ShipOwn.

Source

If preview deployments and edge locations are core to your workflow, stay on Vercel. If you mostly need "a fast server running my app on my domain", a VPS is enough.

Source

Build the app: su - deploy git clone https://github.com/you/next-app.git && cd next-app cp .env.example .env.production # fill in real values npm ci && npm run build

Source

pm2 start npm --name next-app -- start -- -p 3000 pm2 save && pm2 startup

Source

sudo apt install -y certbot python3-certbot-nginx sudo certbot --nginx -d app.example.com

Source

ShipOwn is a desktop app (Windows, macOS, Linux) that does the same job over SSH, without installing a deployment agent on your server.

Source

  • Record date: 2026-11-01T14:43:43.962Z