Pick Vercel when the team is small, nobody wants to be on call for a server, and traffic is spiky or unknown. Pick Coolify on a VPS when traffic is steady, the app is mostly server-rendered pages and API routes, and someone on the team is comfortable reading a Docker log at 11 p.m. Most client projects I see start on Vercel and should stay there. A smaller group (agencies hosting many low-traffic sites, or apps with heavy steady bandwidth) saves real money by moving to a box they own.
The question comes up on almost every Next.js project once the first real invoice arrives, so here is how I make the call.
What changed in 2026
Coolify is finally stable. Coolify v4.0.0 shipped as a stable release on April 27, 2026, after a long beta that many teams already ran in production. The v4 line has moved fast since then; the changelog lists v4.7.5 on November 10, 2026. A "beta" label is no longer a fair reason to rule it out.
Vercel bills compute by active CPU. The Pro plan is $20 a month and includes 1 TB of Fast Data Transfer, 10 million CDN requests, 4 hours of Fluid Active CPU, 360 GB-hours of provisioned memory, and 1 million function invocations. Past that you pay per unit (Active CPU starts at $0.128 per hour, transfer at $0.15 per GB). New teams get a default on-demand budget of $200, and you can set a hard limit that pauses projects instead of billing more.
Next.js documents self-hosting properly. The official self-hosting guide now covers reverse proxies, image optimization, cache handlers, multi-server encryption keys, and version skew. Most of the old "Next.js only works well on Vercel" complaints have a documented answer, though you still have to do the work yourself.
The short comparison
- Setup time: Vercel takes minutes with Git import. Coolify takes an hour or two the first time: buy a VPS, install Coolify, connect GitHub, set the build pack, point DNS.
- Cost shape: Vercel is low at small scale and grows with usage. A VPS is a fixed monthly price whether you serve ten visitors or a hundred thousand.
- Preview deployments: Vercel gives every pull request a URL by default. Coolify can do preview deployments through its GitHub App integration, but you configure it.
- Global edge: Vercel serves static assets and cached pages from its network. A single VPS serves from one region unless you put a CDN in front.
- Operations: On Vercel, patching, TLS, scaling, and failover are not your problem. On a VPS, OS updates, disk space, backups, and Coolify upgrades are.
- Lock-in: A Coolify app is a Docker container you can move anywhere. Vercel-specific features (Firewall rules, BotID, Vercel Blob, cron config) need replacements if you leave.
Where the Vercel bill actually grows
People expect the function bill to hurt. In the projects I have audited, the surprises usually come from three other lines:
- Bandwidth on media-heavy pages. Large images and video served from
public/count against Fast Data Transfer. Move big media to object storage or a dedicated CDN before blaming Vercel. - Image transformations. Pro includes 5,000 transformations a month, then charges from $0.05 per 1,000. A catalog with many product photos at many sizes burns through that quickly. Fixing
sizesonnext/imageand cutting the number of widths you allow cuts this line hard. - Uncached dynamic routes. A page that could be static but reads cookies or headers renders on every request. Each one costs CPU time and an invocation.
Fix those three before deciding to migrate. Often the bill drops enough that the move is no longer worth it. If you are still choosing a database for the same app, the hosting choice and the database choice interact; I covered that in Neon vs Supabase for Next.js 16.
What Coolify on a VPS really costs you
The server price is the small part. The real cost is attention:
- Build memory. Next.js production builds can peak at 1.5 to 3 GB of RAM. A 2 GB VPS will crash with heap errors on anything non-trivial. Plan for 4 GB as a floor if Postgres runs on the same box, and 8 GB if you also run Redis or several apps.
- Backups. Coolify can back up databases to S3-compatible storage, but someone has to set it up and test a restore. An untested backup is a hope, not a plan.
- Security updates. Coolify's own changelog tells users to move to patched versions because some security fixes are not backported. Treat Coolify upgrades like OS patches: on a schedule, not when you remember.
- One region. If your users are spread across continents, put Cloudflare or another CDN in front, or accept higher latency for distant users.
A production-ready Next.js 16 setup on Coolify
Use output: "standalone" so the container ships only what the server needs:
1// next.config.ts2import type { NextConfig } from "next";34const nextConfig: NextConfig = {5 output: "standalone",6 deploymentId: process.env.DEPLOYMENT_VERSION,7};89export default nextConfig;
Then pick the Dockerfile build pack in Coolify, expose port 3000, and add environment variables in the Coolify UI rather than committing a .env file. Nixpacks also works for most apps and needs no Dockerfile, but a Dockerfile gives you control over the Node version and the final image size.
Three settings from the Next.js self-hosting guide matter more than people expect:
- Streaming through the proxy. If a proxy buffers responses,
loading.tsxand Suspense boundaries arrive all at once. The guide shows settingX-Accel-Buffering: nofor nginx. - More than one instance. If you scale to two containers, set the same
NEXT_SERVER_ACTIONS_ENCRYPTION_KEYfor both builds, or Server Actions fail with "Failed to find Server Action". Also use a shared cache handler (Redis is the usual choice), because the default cache lives in each process's memory. - Images.
next/imageworks withnext startand no extra setup, but on glibc-based Linux images the docs warn that sharp may need allocator tuning to avoid high memory use.
1# one-time: generate a stable Server Actions key for all instances2openssl rand -base64 32
If build times on a small VPS are painful, see Turbopack as the default in Next.js 16. Building in GitHub Actions and pushing an image to a registry is another way to keep the VPS out of the build path.
When I recommend each one
Stay on Vercel if:
- The team has no one who wants to run servers.
- Traffic is spiky: launches, campaigns, seasonal sales.
- You rely on preview URLs for client review on every branch.
- The monthly bill is still under what an hour of your engineering time costs.
Move to Coolify on a VPS if:
- You host many small client sites with low, steady traffic.
- Bandwidth is the largest line on the invoice and a CDN alone did not fix it.
- Data has to stay in a specific country or on hardware you control.
- Someone owns updates, backups, and monitoring as a real task, not a side job.
A middle path: keep the marketing site and preview flow on Vercel, and run the heavy background workers, queues, or the database on a VPS. Many teams get most of the savings this way without giving up the deploy experience.
The checklist before you migrate
- Pull three months of Vercel usage and find the top cost line.
- Try the cheap fixes first: cache static routes, fix image sizes, move big media off
public/. - Replace Vercel-only features (cron, Blob, Firewall rules, analytics) with equivalents and list them.
- Load-test the VPS with production-like traffic before you change DNS.
- Set up uptime alerts and a tested database restore.
- Lower DNS TTL a day early so you can roll back quickly.
Slow queries do not care which host you pick, so check the query-shape problem in Postgres with Next.js before you blame either platform for a slow page.