Skip to content
Malik Hamza Shabbir
Web Developmentvercelself-hostingnextjscoolify

Leaving Vercel in 2026: The Real Self-Hosting Cost Math

HSMalik Hamza Shabbir8 min read

In short

I moved four of my five production Next.js apps off Vercel this spring, and my hosting bill went from roughly $90/mo to about $18/mo. For a typical 100k-visits/month Next.js app, Vercel Pro realistically lands at $40-150/mo with overages, while a Hetzner CPX21 running Coolify lands at $6-17/mo all-in. The catch is a line item most migration posts skip: your own ops hours. I will show you that math too, because it changes the answer for some teams.

Leaving Vercel in 2026: The Real Self-Hosting Cost Math - branded cover card by Hamza Shabbir
On this page

Why are developers reevaluating Vercel in mid-2026?

Two reasons: a security incident and billing complexity. On April 19-20, 2026, Vercel confirmed a breach originating from a Context.ai employee compromised by Lumma Stealer malware, with attackers decrypting customer environment variables; the data was offered for $2M under the ShinyHunters name. That single event moved self-hosting from a cost discussion to a risk discussion.

The attack chain matters because it was not exotic. As of June 2026, the public account is that infostealer malware on one Context.ai employee's machine gave the attacker credentials, they pivoted through OAuth into a Vercel employee's Google Workspace and Vercel account, and from there they enumerated and decrypted environment variables that customers had stored on the platform. A ShinyHunters-branded post on BreachForums offered the data for $2M, and Vercel confirmed customer data was stolen for a subset of customers. To be fair where fairness is due: there is no evidence Next.js or Turbopack were affected. The framework is fine. The lesson is about where your secrets live, not about the code you ship.

The second reason is older and duller: billing. Vercel meters across eight dimensions, and the March 19, 2026 Active CPU pricing reset helped predictability but did not remove the surprise factor. I have audited more than one invoice during app rescue engagements where an unoptimized image route or a chatty ISR setup quietly tripled a client's monthly spend. When the bill is a function of eight meters, nobody on a small team actually knows next month's number.

What changed to make self-hosted Next.js a first-class citizen?

Next.js 16.2 ships a stable public Adapter API, co-developed with the OpenNext maintainers plus engineers from Netlify, Cloudflare, AWS Amplify, and Google Cloud, growing out of the April 2025 Build Adapters RFC. It gives platforms a typed, versioned build output with modifyConfig and onBuildComplete hooks. Self-hosted Next.js is no longer reverse-engineering Vercel's internals.

This is the part that made me comfortable moving production apps. Before the Adapter API, projects like OpenNext had to chase undocumented build output formats every minor release, and self-hosted deployments broke in subtle ways. Now the contract is public: an adapter receives a typed manifest of routes, middleware, ISR configuration, and assets, and decides how to host them. The fact that Vercel built this with its direct competitors is the strongest signal yet that the company treats framework neutrality seriously, and it removes my main long-term fear, which was betting client infrastructure on an unofficial shim.

For a single VPS you do not even need an adapter. output: 'standalone' plus a Dockerfile has been stable since Next.js 12, and 16.2 did not change that. What the Adapter API changed is confidence: the escape hatch is now a documented door.

Cost comparison illustration showing a Vercel Pro invoice next to a Hetzner VPS running Coolify, with monthly totals for a Next.js app
Cost comparison illustration showing a Vercel Pro invoice next to a Hetzner VPS running Coolify, with monthly totals for a Next.js app

What does a 100k-visits/month Next.js app actually cost?

For a 100k-visits/month Next.js app with ISR and image optimization, Vercel Pro realistically costs $40-150/mo ($20/seat plus metered overages), while a Hetzner CPX21 at €5.19/mo plus free open-source Coolify lands at $6-17/mo all-in. The best documented case I know of is a team that dropped from hundreds per month to $17/mo, a 97% reduction.





A one-sentence definition, since Coolify carries this table: Coolify is an open-source, self-hostable platform that turns any VPS into a Heroku-style deploy target with git-push deploys, automatic SSL, PR preview URLs, and one-click Postgres.

Two honest notes on the table. First, the Vercel range is wide because the meters are wide; a content site with few images sits near $40, an image-heavy app with frequent revalidation climbs fast. Cutting client-side render cost helps the Active CPU meter too, which is part of why I did the React Compiler migration on my own apps before comparing bills. Second, the CPX21 (3 vCPU, 4 GB RAM) comfortably runs two or three production Next.js apps at this traffic level, so the per-app cost drops further if you consolidate.

What is the hidden line item most migration posts skip?

Your time. Backups, monitoring, OS patching, and framework security updates do not run themselves, and they are worth real money.

Self-hosting is only cheap if your time is free: budget 2-4 ops hours a month at your billing rate before you celebrate the savings.

Here is what those hours actually contain for me: verifying Hetzner snapshot backups restore correctly (monthly), reviewing Uptime Kuma and server metrics (weekly, minutes), applying OS updates Coolify surfaces, and patching Next.js promptly when advisories land. That last one is not theoretical. Self-hosted Next.js Node servers had an SSRF advisory this cycle that Vercel-hosted apps were insulated from by platform mitigations. On a VPS, you are the platform team.

At my freelance rate of $60/hr, 2-4 hours is $120-240/mo of opportunity cost. For a single app saving $83/mo, self-hosting loses on paper. The math flips because ops time amortizes: the same 3 hours covers every app on the box. Across the five apps I run, the per-app ops cost is under $40/mo of my time against roughly $400/mo of avoided platform spend. Solo with one low-traffic app and a high billing rate? Stay on a managed platform.

How do I migrate from Vercel to Coolify on Hetzner, step by step?

The whole migration took me about four hours for the first app and under one hour for each one after. Here is the sequence I now follow:

  1. Switch to standalone output. In next.config.js, set output: 'standalone' and run a local production build to catch anything Vercel-specific.

  2. Write the Dockerfile. Multi-stage, copying the standalone server and static assets:


DOCKERFILE
FROM node:22-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

FROM node:22-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/public ./public
EXPOSE 3000
CMD ["node", "server.js"]

  1. Provision Hetzner and install Coolify. Create a CPX21, point a subdomain at it, run the one-line Coolify install script, and connect your Git provider.

  2. Create the app in Coolify. Point it at the repo, paste environment variables (rotate anything that ever lived on Vercel; after April, treat that as mandatory), and enable PR preview deployments.

  3. Handle ISR. On a single server, the default filesystem cache just works. Only configure a custom cacheHandler (Redis-backed) if you scale to multiple instances.

  4. Handle images. The built-in optimizer runs fine self-hosted with sharp, which Next.js bundles; set minimumCacheTTL sensibly so you are not re-encoding on every request.

  5. Put Cloudflare in front. Free tier, proxied DNS, full-strict TLS. It absorbs bandwidth spikes and gives you a WAF you did not have to build.


If you are jumping Next.js majors at the same time, do that first in isolation; I documented the traps in my Next.js 16 migration guide on silent breakages , and mixing a major upgrade with an infrastructure move makes every bug ambiguous.

When is Vercel still worth paying for?

When the team, not the server, is the bottleneck. Preview deployments that marketers can click without asking anyone, heavy edge middleware and high-volume ISR, compliance checklists that want a vendor's SOC 2 report, and teams with zero ops appetite are all legitimate reasons to stay.








OptionBase priceRealistic monthly totalWhat pushes it up
Vercel Pro$20/seat$40-150/moImage optimization, ISR writes, Active CPU, bandwidth overages
Hetzner CPX21 + Coolify€5.19/mo (~$5.60)$6-17/moBackups (+20%), bigger instance, S3 for offsite snapshots
Railway (mid-path)$5 base + usage$20-40/moMemory-hungry SSR, image processing CPU
SituationWinnerWhy
Marketing team shipping 30+ PR previews/weekVercelPreview ergonomics are still the best in the industry
Heavy edge middleware, global ISRVercelReplicating this on one VPS is real engineering
Compliance and vendor questionnairesVercelA SOC 2 report beats "I patch it myself"
Solo dev, steady traffic, several appsVPSOps hours amortize, costs are fixed
Cost-sensitive client, predictable loadVPS$17/mo is an easy line item to defend
Zero ops appetite, no one on callVercelAn unmonitored VPS is cheaper until the day it is not

I kept one client on Vercel deliberately. Their content team pushes constant copy changes through PR previews, reviewed by non-technical stakeholders, and their edge middleware does geo-based pricing. Their $60/mo bill is less than one hour of my time. Migrating them would save money on paper and cost money in practice. That is the test I now apply to every new web development engagement : who looks at preview URLs, and who answers the pager?

What does my actual hosting bill look like?

As of June 2026: €18.41/mo, about $20, for five production apps. One CPX21 (€5.19 plus €1.04 backups) runs this portfolio and two small client sites. One CPX31 (€10.49 plus backups) runs my reputation SaaS, the one with AI auto-replies, plus its Postgres and a Redis queue. Coolify costs nothing on either box.

Traffic-wise this setup is boring in the best way. A growing share of my visits now arrives from AI engines rather than spiky social referrals, a pattern I covered in my piece on getting cited by ChatGPT and Perplexity , and steady predictable traffic is exactly the profile a fixed-cost VPS rewards. The same portfolio on Vercel Pro, with image optimization and ISR metered, was tracking toward $90/mo before I moved. I spend about three hours a month on ops across both servers. At my rate that is the real total: roughly $200/mo of money plus time, versus $300+ of money alone. The margin is smaller than the headline 97% case, and it is still clearly worth it for me.

Key takeaways

  • The April 19-20, 2026 breach (Lumma Stealer on a Context.ai employee, OAuth pivot, decrypted customer env vars, a $2M ShinyHunters sale post) made platform-stored secrets a risk question, though Next.js itself was not affected.

  • Next.js 16.2's stable Adapter API, built with OpenNext, Netlify, Cloudflare, and AWS, means self-hosted Next.js is no longer second-class.

  • For a 100k-visits/month app, expect $40-150/mo on Vercel Pro versus $6-17/mo on Hetzner CPX21 plus Coolify; one documented team cut hundreds to $17, a 97% drop.

  • Budget 2-4 ops hours a month at your billing rate; self-hosting only wins clearly once that time amortizes across multiple apps.

  • Vercel still wins for team preview workflows, heavy edge/ISR, and zero ops appetite; the VPS wins for solo devs, steady traffic, and cost-sensitive clients.

FAQ

Is it cheaper to self-host Next.js than to use Vercel in 2026?

Usually yes on raw dollars: $6-17/mo on a Hetzner CPX21 with Coolify versus a realistic $40-150/mo on Vercel Pro for a 100k-visits/month app. But add 2-4 ops hours monthly at your billing rate. Self-hosting wins clearly when several apps share one server; for a single small app it can be a wash.

Did the April 2026 Vercel breach affect Next.js itself?

No. The April 19-20, 2026 incident involved a Context.ai employee compromised by Lumma Stealer malware and an OAuth pivot into Vercel systems, exposing decrypted customer environment variables for a subset of customers. There is no evidence Next.js or Turbopack code was affected. The risk was platform-stored secrets, not the framework you deploy.

What is the Next.js Adapter API and why does it matter for self-hosting?

It is a stable public interface in Next.js 16.2 that exposes a typed, versioned build output with `modifyConfig` and `onBuildComplete` hooks, co-developed with the OpenNext maintainers, Netlify, Cloudflare, and AWS. Hosting platforms no longer reverse-engineer Vercel's build internals, so self-hosted and alternative-cloud Next.js deployments stay reliable across releases.

Working on something like this?

I build web apps, AI features, and mobile products for clients. If this article matches a problem you have, tell me about it.

Start a conversation
HS

Malik Hamza Shabbir · Full-Stack & AI Engineer

I build full-stack and AI products solo: a reputation SaaS in production, RAG pipelines, and React Native apps. I write from what I ship, not from documentation summaries.

Related articles