Home / Articles / Blog

Vercel vs Cloudflare vs Self-Hosted for Next.js: Pricing, Limits and Open-Source Alternatives
VercelCloudflareNext.jsSelf-hostingCoolifyDokployHostingPricing

Vercel vs Cloudflare vs Self-Hosted for Next.js: Pricing, Limits and Open-Source Alternatives

Vercel vs Cloudflare vs self-hosting for a production Next.js app: verified pricing, the limits that bite, cost tables at three traffic levels, open-source tools like Coolify, Dokploy and OpenNext, and what migrating involves.

BackendShrey Vijayvargiya

Prices and limits checked on 22 October 2026 from each vendor's own pricing pages and docs, unless a row says otherwise. These change often, so check the linked pages before you commit.

Every Next.js developer reaches the same fork eventually. The app works, people use it, and the hosting bill starts to matter. Do you stay on Vercel, where Next.js just works? Move to Cloudflare, where traffic is cheap? Or rent a server and run it yourself?

There's no single right answer, because the three options charge for completely different things. Vercel charges for CDN capacity, compute and seats. Cloudflare charges for requests and CPU time, and nothing for bandwidth. Self-hosting charges you a fixed server bill plus your own time. Which one is cheapest depends on the shape of your traffic, not just its size.

This post compares all three for one job, hosting a production Next.js app, with verified prices, the limits that actually bite, cost tables at three traffic levels, the open-source tools that make self-hosting practical, and what migrating between them involves.

The verdict first

  • Stay on Vercel if you want zero hosting work, use the newest Next.js features the day they ship, have a small team, and your traffic fits inside a Flat Rate CDN tier. It's now far more predictable than it was a year ago.
  • Move to Cloudflare Workers if your app is mostly cacheable pages and assets with modest server work, and especially if bandwidth is a big part of your bill. Egress is free, and static assets are free and unlimited.
  • Self-host with Coolify, Dokploy or Kamal if you already run servers, need long-running work or large memory, want fixed costs, or are hosting many small apps on one box.

Most teams that leave Vercel do it for one of two reasons: a bandwidth-heavy site, or a growing seat bill. If neither applies to you, the move may cost more in engineering time than it saves.

At a glance

OptionTypeFree tierPaid starts atBilling unitBest forWatch out for
VercelManagedHobby: personal, non-commercial only$20/mo Pro platform fee (1 seat, $20 usage credit)Seats + CDN tier + compute usageTeams who want Next.js with no opsHobby limits pause features for ~30 days; extra seats $20 each
Cloudflare Workers (via OpenNext)Managed100,000 requests/day, 10 ms CPU per request$5/mo per accountRequests + CPU millisecondsCacheable apps, high-bandwidth sites128 MB memory; 3 MiB (free) / 10 MiB (paid) compressed Worker size
NetlifyManagedFree plan (credit-based)$20/mo Pro, 3,000 credits, unlimited seatsCredits (bandwidth, compute, requests)Teams already on Netlify; unlimited seatsBandwidth costs 20 credits/GB, so 3,000 credits go fast
Self-hosted (Coolify / Dokploy / Kamal on a VPS)Self-hostThe software is freeA VPS, roughly €5–€36/mo for 4–8 GB depending on providerFixed server costFixed bills, long jobs, many apps per boxSecurity patches, backups, uptime are yours
OpenNext on AWS (SST)Self-host on cloudAWS free tier onlyAWS usageAWS services (Lambda, CloudFront, S3)Teams already on AWSYou now own an AWS bill and its complexity

VPS range: Hetzner repriced its cloud plans in June 2026 and some cheaper plans show limited availability (Findstack's write-up, third-party). Check your provider's live price page.

Head to head: the limits that decide it

These are the limits that most often force a decision for a Next.js app.

Feature or limitVercel HobbyVercel ProCloudflare Workers FreeCloudflare Workers PaidSelf-hosted
Commercial use✗ (personal only)✓✓✓✓
Max function duration300 s300 s default, up to 800 sNo wall-clock limit while client is connectedSameUnlimited
CPU time per requestMetered (4 CPU-hrs/month included)Metered10 ms30 s default, up to 5 minYour hardware
MemoryConfigurableConfigurable128 MB per isolate128 MB per isolateYour hardware
App bundle sizeLargeLarge3 MiB compressed (OpenNext)10 MiB compressedUnlimited
Bandwidth100 GB/monthFlat Rate CDN tier (1 TB included)FreeNo egress chargesYour VPS allowance
What happens at the limitFeature paused, usually ~30 daysMoves to a higher tier next cycle, or on-demandError 1027 after 100,000 requests/dayBilled overageSlows down or falls over
Newest Next.js features on day one✓✓Via adapter (see below)Via adapter✓ with next start
Preview deployments✓✓✓ (Wrangler versions)✓Coolify/Dokploy support them
Image optimization5,000 transformations/month$0.05 per 1KVia Cloudflare ImagesVia Cloudflare Imagessharp on your server

Sources: Vercel Hobby plan, Vercel Pro plan, Cloudflare Workers limits, OpenNext for Cloudflare.

Three of these surprise people most:

  • Vercel Hobby is not for commercial projects. If your side project takes payments, the docs say you're on the wrong plan. Hitting a Hobby limit usually pauses that feature for about 30 days. There's no "just bill me" option.
  • Cloudflare's 10 ms free CPU limit is per request. A server-rendered Next.js page can easily take longer than that. The $5 Paid plan raises it to 30 seconds by default.
  • The bundle size limit is the real Cloudflare blocker. Your whole server bundle has to fit in 10 MiB compressed on the Paid plan. Heavy dependencies (big SDKs, PDF libraries, ORMs with binaries) can push you over. This is exactly the problem from why websites are slow, except on Workers it breaks the deploy instead of slowing the page.

Pricing breakdown

Vercel Pro (iad1 region rates)

Vercel's Pro plan has three parts: a platform fee, a CDN tier, and usage-based compute.

ItemPriceNotes
Platform fee$20/monthIncludes 1 deploying seat and $20 of usage credit
Extra deploying seats$20/month eachViewer seats are free
Flat Rate CDN, included tier$01M CDN requests + 1 TB data transfer
Flat Rate CDN tiers$20 / $100 / $300 per month10M / 50M / 150M requests, each with 50 TB transfer
Fluid Active CPU$0.128 per hourOnly while your code is running
Fluid Provisioned Memory$0.0106 per GB-hour
Fast Origin Transfer$0.06 per GBFunction and ISR responses into the CDN
CDN requests (on-demand, without Flat Rate)$2.00 per million
Fast Data Transfer (on-demand)$0.15 per GB
ISR writes / reads$4.00 / $0.40 per million units
Image transformations$0.05 per 1K

Sources: Pro plan docs, Flat Rate CDN, iad1 regional pricing. Rates vary by region.

The big change: Flat Rate CDN. In September 2026 Vercel introduced Flat Rate CDN for Pro teams. New Pro teams get it by default, and existing teams can opt in from Billing. Instead of paying per GB and per request, you pay for a capacity tier, and a one-day spike doesn't change the bill. If your monthly usage goes over your tier, Vercel moves you up a tier at the start of the next cycle. Above the $300 tier, you go back to on-demand pricing.

There's a fair-use catch: Flat Rate CDN is meant for web apps. Bulk file downloads, media delivery that dominates your bandwidth, and using the CDN as file hosting are out of scope.

Cloudflare Workers

ItemFreePaid
Monthly minimum$0$5 per account
Requests100,000 per day10M per month included, then $0.30 per million
CPU time10 ms per request30M CPU-ms per month included, then $0.02 per million CPU-ms
Static asset requestsFree, unlimitedFree, unlimited
Egress / bandwidth—No charge

Source: Workers pricing.

The key detail: requests for static assets are free and don't count towards your request quota. You only pay for requests that run your Worker code, meaning server-rendered pages, route handlers and middleware. For a typical Next.js site, most requests are JavaScript, CSS, fonts and images, so they cost nothing.

Netlify (for reference)

Netlify moved to credit-based plans. Pro is $20/month for 3,000 credits with unlimited seats. Since April 2026, bandwidth costs 20 credits per GB, compute 10 credits per GB-hour, and web requests 2 credits per 10,000 (Netlify changelog). At those rates, 3,000 credits cover about 150 GB of bandwidth if you spend them on nothing else.

Self-hosted

The software is free. You pay for:

  • A VPS: roughly €5–€36/month for 2–4 vCPU and 4–8 GB RAM, depending on provider and current availability.
  • Optional CDN in front: Cloudflare's free plan is the usual choice.
  • Backups and monitoring: often a few dollars a month in object storage.
  • Your time: patching, upgrades and incidents. This is the cost people forget.

Cost scenarios at three traffic levels

Assumptions: a Next.js app where most pages are cached and some are server-rendered. Average page weight is 1.2 MB. Each page view makes about 20 requests, mostly static assets. Each server-rendered request uses about 20 ms of CPU, holds 1 GB of memory for about 200 ms, and returns about 100 KB. One deploying seat. US East pricing.

WorkloadPage views/monthTotal requestsData transferServer-rendered requests
Launch50,0001M60 GB100,000
Growing1,000,00020M1.2 TB2M
Scale10,000,000200M12 TB20M
OptionLaunchGrowingScale
Vercel Pro$20~$120~$460 if caching keeps you ≤150M requests, otherwise ~$2,360
Cloudflare Workers Paid$5~$5.20~$15.40
Netlify Pro$20 (≈1,400 credits)? (needs ~28,000+ credits, vs 3,000 included)?
Self-hosted~€5–€20 (one small VPS)~€10–€36 (one larger VPS + free CDN)~€60–€150 (2–3 servers + load balancer) + your time

How the numbers work:

  • Vercel, Launch:
    • The included Flat Rate tier (1M requests, 1 TB) covers the CDN.
    • Compute is 100k × 20 ms = 0.56 CPU-hours ($0.07), plus 5.6 GB-hours of memory ($0.06), plus a little origin transfer. All of it fits inside the $20 credit.
    • Total: the $20 platform fee.
  • Vercel, Growing:
    • 20M requests need the $100 tier (50M requests, 50 TB).
    • Compute is 11.1 CPU-hours ($1.42) and 111 GB-hours ($1.18).
    • Origin transfer is 200 GB × $0.06 = $12. Invocations cost about $1.20, at $0.60/M per Makerkit's breakdown (third-party).
    • That's about $16 of usage, covered by the credit.
    • Total: $20 + $100 = ~$120.
  • Vercel, Scale:
    • 200M requests is above the top $300 tier (150M), so CDN goes on-demand: 200M × $2/M = $400, plus 12,000 GB × $0.15 = $1,800.
    • Compute plus origin transfer is about $158, minus the $20 credit.
    • Total: ~$2,360.
    • If better caching cut requests to 150M or fewer, you'd stay on the $300 tier: about $20 + $300 + $138 = ~$460. At this size, caching is worth more than any platform switch.
  • Cloudflare:
    • Only Worker requests count, and static assets are free. Growing has 2M Worker requests (within 10M) and 40M CPU-ms, so 10M CPU-ms over the allowance × $0.02/M = $0.20.
    • Scale: 10M extra requests × $0.30/M = $3, plus 370M extra CPU-ms × $0.02/M = $7.40.
    • Bandwidth: $0 at every level.
  • Netlify: at Growing, bandwidth alone is 1,200 GB × 20 = 24,000 credits, and requests add about 4,000 more. The cost of extra credits wasn't on the changelog page I checked, so those cells stay as "?".
  • Self-hosted: server prices only. Your traffic allowance, backups and engineering time are extra.

Read this with care: Cloudflare's numbers assume your app fits its limits (128 MB memory, 10 MiB bundle, the adapter's feature support). Server-rendered pages that are CPU-heavy cost more there. The comparison also leaves out databases, auth and AI APIs, which often cost more than hosting. For the full picture, scan your actual repo (see the end of the post).

Open-source alternatives for self-hosting Next.js

All of these were checked on GitHub this week.

ProjectLicenseLast commitWhat it isReplacesSelf-host effortTypical cost
Next.js output: "standalone"MIT2026-10-22Next.js itself, built into a minimal Node serverThe hosting layerMediumOne VPS
CoolifyApache-2.02026-10-22Self-hosted PaaS with a dashboard, Git deploys, databases and backupsVercel/Netlify/Heroku UILow–mediumVPS; idles around 0.5–1.2 GB RAM
DokployApache-2.0 core (/proprietary folders separate)2026-10-16Lighter PaaS with Docker Swarm multi-server supportVercel/Netlify UILow–mediumVPS; idles around 350 MB RAM
CapRoverApache-2.02026-10-21Long-running Docker-Swarm PaaS with one-click appsHeroku-style hostingMediumVPS
KamalMIT2026-10-21CLI that deploys Docker containers to any server with zero downtimeDeploy pipelineMediumAny servers
OpenNext for CloudflareMIT2026-10-21Adapter that runs Next.js on Cloudflare WorkersVercel's Next.js runtimeLowWorkers pricing
OpenNext for AWSMIT2026-10-22Adapter that runs Next.js on Lambda, CloudFront and S3Vercel's Next.js runtimeMedium–highAWS usage
SSTMIT2026-10-08Infrastructure-as-code framework that deploys Next.js to AWS via OpenNextVercel + manual AWS setupMedium–highAWS usage

RAM figures for Coolify and Dokploy come from Virtua Cloud's comparison (third-party). On a 4 GB server they leave roughly 2.8–3.2 GB (Coolify) and 3.6 GB (Dokploy) for your apps.

Coolify or Dokploy? Choose Dokploy on a small server, or if you want several servers to act as one cluster. Choose Coolify on 8 GB or bigger, or if you want the whole codebase under Apache-2.0 plus its large one-click app catalogue. Both deploy a Next.js app from a Git repo in a few clicks.

What each option looks like in practice

Vercel: nothing to configure

Connect the repo and push. A vercel.json is optional. You only need one to change defaults, such as giving a slow route more time on Pro:

json
{
  "functions": {
    "app/api/report/route.ts": { "maxDuration": 120 }
  }
}

Who it suits: a two-person SaaS team that ships daily, relies on preview links for every pull request, and doesn't want anyone on call for servers.

Cloudflare Workers: one adapter, one config file

Install the adapter and Wrangler:

bash
npm i @opennextjs/cloudflare
npm i -D wrangler

Add an open-next.config.ts:

ts
import { defineCloudflareConfig } from "@opennextjs/cloudflare";

export default defineCloudflareConfig();

And a wrangler.jsonc (this matches the adapter's own example):

jsonc
{
  "$schema": "node_modules/wrangler/config-schema.json",
  "main": ".open-next/worker.js",
  "name": "my-next-app",
  "compatibility_date": "2026-08-01",
  "compatibility_flags": ["nodejs_compat", "global_fetch_strictly_public"],
  "assets": {
    "directory": ".open-next/assets",
    "binding": "ASSETS"
  }
}

Then build, preview locally and deploy:

bash
npx opennextjs-cloudflare build
npx opennextjs-cloudflare preview   # runs the Worker locally
npx opennextjs-cloudflare deploy

According to the OpenNext docs, the adapter uses Next.js's Node.js runtime and supports:

  • App Router, Pages Router and Route Handlers
  • SSR, SSG and ISR
  • Middleware
  • Partial Prerendering
  • 'use cache'
  • Image optimization through Cloudflare Images

It supports all of Next.js 16 and the latest 14 and 15 minors, with 14 support being dropped. Node Middleware (added in Next.js 15.2) isn't supported yet. Windows works but isn't fully supported, so build on Linux, macOS or WSL.

Who it suits: a content-heavy site or marketing app with a lot of traffic and light server logic, where bandwidth would dominate any per-GB bill.

Self-hosted: standalone build plus a PaaS

Tell Next.js to produce a self-contained server:

js
// next.config.js
module.exports = { output: "standalone" };

A minimal Dockerfile:

dockerfile
FROM node:22-alpine AS build
WORKDIR /app
COPY . .
RUN npm ci && npm run build

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

Point Coolify or Dokploy at the repo and it builds and runs this for you. Or use Kamal to push it to any server with zero-downtime deploys. Put Cloudflare's free CDN in front so static files don't hit your server.

Who it suits: an indie hacker running five small apps, a cron worker and a Postgres database on one €10–€20 server, who wants a bill that never changes.

Migration paths: what actually breaks

Vercel → Cloudflare Workers

  1. Check the bundle first. Build with OpenNext and check the compressed Worker size. If it's over 10 MiB, trim dependencies before going any further.
  2. Replace Vercel-only services:
    • Vercel KV/Blob/Edge Config → Cloudflare KV, R2 or D1
    • Vercel Cron → Workers Cron Triggers
    • @vercel/og → check it works, or use an alternative
  3. Swap image optimization to Cloudflare Images, or serve pre-sized images.
  4. Move environment variables into Wrangler secrets.
  5. Test middleware. Edge middleware works; Node Middleware doesn't yet.
  6. Watch CPU time in the Workers dashboard for a week. Heavy server-rendered pages are where the surprises are.
  7. Switch DNS once preview traffic looks clean.

What breaks most often: native Node modules, large SDKs, and code that assumes a long-lived server with in-memory state.

Vercel → self-hosted

  1. Add output: "standalone" and the Dockerfile above.
  2. Pick Coolify or Dokploy and connect your Git repo.
  3. ISR and caching: a single server caches to disk by default. With several servers, add a shared cache handler (Redis) or the pages will differ between instances.
  4. Images: install sharp so next/image works.
  5. Add backups, uptime monitoring and automatic OS security updates on day one.
  6. Put a CDN in front and set long cache headers on static assets.

What breaks most often: ISR across several instances, preview deployments (set them up in your PaaS), and the team's habit of never thinking about servers.

Cloudflare or self-hosted → Vercel

This is usually the easiest direction: Next.js runs on Vercel without an adapter. Move storage and cron jobs to Vercel equivalents or keep them external.

Decision checklist

Answer these in order. Your first clear "yes" usually decides it.

  1. Is the project commercial and still tiny? Vercel Pro ($20) or Cloudflare ($5). Not Vercel Hobby.
  2. Does bandwidth dominate your traffic (images, downloads, a popular content site)? Cloudflare, or self-host behind a free CDN.
  3. Does your server bundle exceed 10 MiB compressed, or need more than 128 MB of memory? Vercel or self-hosted.
  4. Do you have long-running jobs, websockets or heavy background work? Self-hosted, or keep that part off your web host.
  5. Is your team bigger than three people who all deploy? Do the seat maths: $20 per extra Vercel seat adds up, while Netlify Pro and self-hosting have no seat cost.
  6. Is nobody available to look after servers? Vercel or Cloudflare.
  7. Will traffic spike unpredictably? Vercel's Flat Rate CDN or Cloudflare's free bandwidth. Both handle spikes without surprise bills.
  8. Do you run many small apps? One self-hosted server running Coolify or Dokploy.

FAQ

Is Cloudflare cheaper than Vercel for Next.js? Usually, for traffic-heavy apps, because Cloudflare doesn't charge for bandwidth or static asset requests. In our scenarios it's about $5–$15 a month against $20–$460+ on Vercel. Vercel can still win on total cost of ownership once you count the engineering time saved and features that work without an adapter.

Can I host a commercial Next.js app on Vercel's free plan? No. Vercel's Hobby plan is limited to personal, non-commercial use. Commercial projects need Pro, which starts at $20 a month.

Does Next.js work fully on Cloudflare Workers? Most of it does, through the OpenNext adapter: App Router, SSR, ISR, middleware, PPR and image optimization. Node Middleware isn't supported yet, and your app must fit the Worker size and memory limits.

What happens when I go over Vercel's Flat Rate CDN tier? Your site keeps serving. If you go over your tier's capacity in a billing cycle, Vercel moves you to a higher tier from the next cycle. Above the top tier ($300/month), CDN usage is billed on demand.

Is self-hosting Next.js hard? Not anymore. With output: "standalone" and Coolify or Dokploy, a basic deploy takes an afternoon. The ongoing work (security updates, backups, scaling, multi-instance caching) is the real cost.

Coolify or Dokploy? Dokploy is lighter (about 350 MB idle RAM) and has native multi-server clustering. Coolify is heavier but fully Apache-2.0 and has a bigger app catalogue. On small servers, pick Dokploy. On 8 GB or more, either works.

Find out what your repo would cost

The scenarios above use made-up traffic. Your real bill depends on what your code actually uses: which database, which AI API, which storage, how many seats.

StackBudget is an open-source Claude Code skill that scans a repository and builds an interactive cost calculator for it. It detects your services from package.json, configs and env key names, prices them at launch, growth and scale traffic, and has a Migrate to picker. Switch Vercel to Cloudflare or self-hosted Postgres and watch the total change. Run it before you migrate anything:

text
/stack-budget owner/your-repo

If you want the background on why hosting costs matter so much for a content site, I wrote about keeping ihatereading under $100 a month at 10k visitors. And if you're about to launch whatever you're hosting, the SaaS directories list is a good next stop.

More comparisons like this go out in the monthly ihatereading magazine.

External Links (21)

Explore topics

More in

Weekly letter

Subscribe to iHateReading

Our once-a-week newsletter on programming, jobs, AI, and building products online.

Our once a week newsletter on Programming, Jobs, AI, and Business