Justin McKelvey
Ran snowboard shops. Taught myself to code. Now I build AI that does real work.
Railway vs Vercel 2026: Why I Picked Railway
Quick Answer (The Verdict)
Vercel wins for Next.js frontends, edge performance, and preview deployments. Railway wins for full-stack apps with databases, predictable usage-based pricing, and anything containerized. A 3-person SaaS team typically pays $60–$150/mo on Vercel; the same workload runs $15–$45/mo on Railway. Many teams use both — Vercel for frontend, Railway for backend + database. I deploy this consultancy site (justinmckelvey.com) on Railway because it's a Rails + SQLite app that doesn't fit Vercel's serverless model.
Based on production deployment of justinmckelvey.com on Railway + client advisory work on both platforms · June 2026 · Author: Justin McKelvey, fractional CTO
Key Stats (June 2026)
- Railway Hobby: $5/mo + $5 included credit (usage-based above)
- Vercel Hobby: Free with bandwidth + serverless limits
- Railway Pro: $20/mo minimum usage ($20 included), unlimited seats
- Vercel Pro: $20/mo per member + bandwidth/function overages
- 3-person SaaS team cost: Vercel $60-150/mo vs Railway $15-45/mo (3-5x difference)
- Pricing model — Vercel: Per-request (serverless invocations, bandwidth)
- Pricing model — Railway: Per-resource (CPU, memory, network)
- Search trend: "railway vs vercel" +743% YoY — devs are actively making this comparison
TL;DR: Railway vs Vercel in 2026
Vercel is best-in-class for Next.js frontends, static sites, and any project where edge performance is the differentiator. Their preview deployments per pull request, automatic image optimization, edge middleware, and global CDN are genuinely the best available. The catch: pricing punishes successful apps. Bandwidth overages, serverless function invocations, and Edge Middleware all scale with traffic.
Railway is best for full-stack SaaS apps with databases. You get persistent containerized services, native database provisioning (Postgres, MySQL, Redis, MongoDB), and usage-based pricing that's typically 3-5x cheaper than Vercel for the same workload. The trade-off: you lose Vercel's edge magic.
I'm a fractional CTO who actually uses Railway in production — this site (justinmckelvey.com) is a Rails 8 app on Railway with SQLite via Litestream backup. The honest verdict: pick the right tool for the layer. Many teams in 2026 use both.
The Architectural Difference
Understanding why these two platforms exist requires understanding what they're optimizing for.
Vercel is built around serverless + edge. Your code runs in many short-lived function instances close to users globally. The CDN caches everything cacheable. The edge network handles middleware, redirects, and dynamic rendering at the network edge. This produces incredible frontend performance for sites where the bottleneck is "deliver pre-rendered HTML to a user near them as fast as possible."
Railway is built around containers + persistent services. Your code runs in dedicated environments — more like traditional VPS hosting with managed deployments. You get a Postgres instance, a Redis instance, a worker queue, and your app — all running 24/7 in the same project. This is the model that fits most real backend work: databases need persistent connections, queues need to run constantly, business logic happens between many requests.
Vercel is optimized for the frontend layer of an app. Railway is optimized for the full-stack layer of an app. Neither is "better" — they solve different problems.
The Cost Math (Where the 3-5x Gap Lives)
This is the question most teams care about. The honest answer with specific numbers:
| Workload | Vercel typical | Railway typical |
|---|---|---|
| Solo dev side project | Free (Hobby plan) | $5/mo (with $5 credit) |
| Small SaaS, low traffic | $20-40/mo Pro | $10-25/mo |
| 3-person team, moderate SaaS traffic | $60-150/mo | $15-45/mo |
| Growing app, high traffic + functions | $200-800/mo | $40-150/mo |
| Database costs (Postgres) | External (Supabase $25+/mo) | Included as Railway service |
| Redis / Queue costs | External (Upstash $10+/mo) | Included as Railway service |
The gap looks wider when you remember that Vercel doesn't include a database. By the time you wire up Vercel + Supabase + Upstash for a typical SaaS, you're comparing 3-4 invoices vs Railway's single bill. And if you're still picking that database layer, my Supabase vs Firebase breakdown is the same honest math for the backend side of this decision.
Why This Site Runs on Railway
justinmckelvey.com is a Rails 8 monolith with SQLite as the production database, backed up continuously to Cloudflare R2 via Litestream. Solid Queue runs background jobs, Solid Cache handles caching, Solid Cable handles WebSockets — all SQLite-backed. Total monthly cost: under $10.
This stack doesn't fit Vercel at all. Vercel's serverless model assumes stateless functions and external databases. SQLite needs a persistent file system. Solid Queue needs a process running 24/7. Litestream needs to stream WAL changes continuously to S3-compatible storage.
On Railway, the entire stack runs as one Docker container with a persistent volume. Deploy from GitHub, mount the volume at /app/storage, Litestream backs up to R2, done. The whole architecture would be impossible on Vercel without splitting it into 4-5 separate services.
For Rails apps, Django apps, FastAPI apps, Express apps with persistent state, or anything containerized — Railway is the natural fit. Vercel works for these (with adapter packages), but you fight the platform the whole way.
Where Vercel Wins Decisively
Vercel is the right answer for:
Next.js apps with heavy frontend rendering. Next.js was built by Vercel. The integration is so tight that some features (Image Optimization edge caching, Incremental Static Regeneration at the CDN, edge middleware) just work better on Vercel than anywhere else.
Marketing sites with global reach. A static or near-static site that needs to load fast for users in 50 countries — Vercel's edge network is genuinely the best at this. Sub-100ms TTFB worldwide is normal.
Preview deployments per pull request. Vercel's PR preview workflow is the best in the industry. Every PR gets a unique URL automatically; reviewing UI changes is incredibly smooth. Railway has previews too but they're not as polished.
Teams already deep in the Vercel ecosystem. If your team knows Vercel inside out, the switching cost matters. Sometimes the right answer is "use what your team is fast at."
Where Railway Wins Decisively
Railway is the right answer for:
Full-stack apps with persistent databases. Native Postgres, MySQL, Redis, MongoDB provisioning in seconds. No external services to wire up. One bill.
Containerized workloads. Docker-based apps deploy natively. Want a Node service, a Rails monolith, a Python worker queue, and a Postgres instance all in the same project? Railway, in 10 minutes.
Cost-conscious SaaS at scale. The 3-5x cost gap matters once you're past the Hobby tier. For an app at moderate traffic, you're saving $50-500/month vs Vercel for equivalent functionality.
Long-running processes. Background workers, message consumers, scheduled jobs, persistent WebSocket servers — all natural on Railway, all hostile on Vercel's serverless model.
Apps that need a real file system. SQLite-backed apps (like this one), file processing pipelines, any workload that mounts a persistent volume.
The Hybrid Pattern (Increasingly Common)
By mid-2026, the most common high-end pattern for new SaaS startups is Vercel for frontend, Railway for backend. Your Next.js or React frontend lives on Vercel's edge network for best perceived performance. Your Node.js/Rails/Python API + database + workers run on Railway for cost control and persistent service flexibility.
This is "use both tools for what they're best at." Slight operational overhead — two platforms, two billing accounts, two deploy flows. But you get world-class frontend performance and full-stack flexibility, often at a lower total cost than running everything on Vercel.
One question that arrives right behind this comparison, usually from a founder who just wired up Stripe: is Vercel actually free? The Hobby plan is, and generously — but it is restricted to non-commercial use, and that clause, not any bandwidth cap, is what ends it. Railway's $5 has no such clause, which is a bigger part of the decision than the sticker prices suggest.
Two neighbours of this comparison, if you're still choosing: Render's free tier is the other permanent $0 in this category, with no commercial clause but a 15-minute sleep and a 30-day database; and if the frontend half of the hybrid is the open question, Vercel vs Netlify is decided by seats versus traffic.
How Railway and Vercel Actually Bill You: The Math Neither Pricing Page Does
Railway bills a running machine by the second. Vercel bills a developer seat plus the work your code does. Rates from railway.com/pricing and vercel.com/pricing, both read September 18, 2026.
Railway charges $0.00000772 per vCPU per second and $0.00000386 per GB of RAM per second: about $20 a month for one vCPU and $10 for one GB left running all month. Volumes are about $0.16 per GB-month, egress $0.05 per GB. The plan price is a minimum, not a fee on top: Hobby is a $5 minimum with $5 of usage included, Pro a $20 minimum with $20 included, and Pro includes unlimited workspace seats. A service pinned at 1 vCPU and 1 GB costs about $30 a month whether anyone visits or not.
Vercel Pro is $20 a month per developer seat (viewer seats are free) with $20 of usage credit. Past that it meters activity: Active CPU from $0.128 an hour, memory from $0.0106 per GB-hour, invocations from $0.60 per million. Idle time costs nothing. Hobby is free but "for personal, non-commercial use," and a Hobby account can't buy extra usage.
So three developers start at $60 a month on Vercel Pro and $20 on Railway Pro. But an app that sleeps most of the day can be cheaper on Vercel's meter than on a container billing every second it's up.
Vercel's bill changed shape in 2026: seats, a flat CDN tier from $0 to $300 a month, then metered compute. A three-person team with a growing app works out to about $106 a month in my Vercel pricing breakdown.
The Honest Bottom Line
For a typical 2026 SaaS startup:
- Pure frontend or marketing site: Vercel.
- Next.js SaaS with light backend: Vercel + Supabase, unless cost matters.
- Full-stack monolith (Rails, Django, Express): Railway.
- SaaS with serious backend complexity (queues, workers, databases): Railway.
- High-traffic with global users: Vercel for frontend, Railway for backend.
- Anything containerized: Railway.
If you're deploying a Rails app, a Django app, or anything with a real database — Railway will save you money and headaches. If you're deploying a Next.js app and don't mind paying for the edge experience — Vercel is genuinely the best.
Need help picking for your specific stack? Book a free strategy call — I'll give you a specific recommendation in 10 minutes. Or for the broader picture: how I replaced $2,200/yr in SaaS with a single Rails app covers the stack I actually use to run this consultancy.
Next step Get the free repo audit →
What your AI stack actually costs
Prices changed 3x this year. The always-current cost sheet: sticker price vs what heavy use actually costs for Cursor, Claude, Replit, Lovable, Bolt & more.
Frequently Asked Questions
- Is Railway cheaper than Vercel?
- For full-stack apps with a database: significantly. A 3-person SaaS team with moderate traffic typically pays $60-150/month on Vercel; the same workload runs $15-45/month on Railway depending on resource consumption. The cost gap widens as your usage grows. Vercel's serverless function pricing and bandwidth overages punish successful apps; Railway's resource-based pricing scales more predictably.
- Is Vercel better than Railway?
- Vercel is better for: Next.js frontends, static sites, edge computing, preview deployments per pull request, and any project where best-in-class frontend performance matters more than cost. Railway is better for: full-stack apps with persistent databases, backend services, containerized workloads, and SaaS where total cost matters more than edge performance. Many teams use both.
- What's the main difference between Railway and Vercel?
- Architecture. Vercel is built around serverless functions and edge computing — your code runs in many short-lived instances near users worldwide. Railway is built around always-on containers — your code runs in dedicated environments more like traditional servers. Vercel optimizes for frontend performance; Railway optimizes for full-stack flexibility and predictable cost.
- Can Railway host Next.js?
- Yes. Railway can deploy any Node.js app including Next.js, and it works well for most use cases. The trade-off vs Vercel: you lose some Next.js-specific optimizations (Image Optimization edge caching, edge middleware, automatic ISR at the CDN layer). For most Next.js apps under heavy traffic, Vercel's edge advantages justify the cost gap. For Next.js apps with modest traffic and database dependencies, Railway is often the better total package.
- Why would a developer pick Railway over Vercel?
- Three reasons in order: (1) you need a database alongside your app (Vercel makes you bring your own; Railway provisions Postgres/Redis/MySQL in seconds), (2) you want predictable usage-based billing instead of per-request pricing that can spike, (3) you're shipping a containerized backend or full-stack monolith that doesn't fit Vercel's serverless model. Justin's consultancy site (justinmckelvey.com) runs on Railway specifically for reasons (1) and (3) — Rails + SQLite + Solid Queue.
- Is Vercel only for frontends?
- Mostly. Vercel supports serverless functions for API routes and backend logic, but its sweet spot is frontend rendering (React, Next.js, SvelteKit, Astro) with light backend work. For heavy backend services, persistent connections, long-running processes, or anything needing a real database — Vercel forces you to wire up external services. Railway handles all of that natively in one platform.
- Can I use Railway and Vercel together?
- Yes, and many teams do — it's becoming the most common pattern in 2026. Frontend on Vercel (best edge performance for users), backend services + database on Railway (best cost and developer experience for full-stack work). The two platforms work fine alongside each other; you just point your Vercel frontend at your Railway API URL.
- How much does Railway cost in 2026?
- Railway's Hobby plan is $5/month with a $5 monthly credit included; you pay for compute, bandwidth, and storage usage above that. Most solo developers run small projects for $5-15/month total. The Pro plan is a $20 monthly minimum that includes $20 of usage, with unlimited workspace seats (railway.com/pricing, September 18, 2026). A SaaS with app + Postgres + Redis typically runs $15-45/month depending on traffic. Self-hosted databases push costs higher only if you're managing significant data.
- How much does Vercel cost in 2026?
- Vercel's Hobby plan is free (with bandwidth and serverless function limits). Pro is $20/month per team member. The real costs come from overages: $0.15/GB beyond included bandwidth, additional serverless function execution time, Edge Middleware invocations, and Image Optimization beyond limits. A 3-person SaaS team with moderate traffic typically pays $60-150/month effective; growing apps regularly hit $500+/month.
- Which platform is better for AI apps?
- Depends on the architecture. AI apps with long-running model calls, streaming responses, persistent agent state, or vector databases: Railway, because Vercel's serverless function timeouts and cold starts hurt LLM use cases. AI apps that are mostly frontend with thin API routes calling external LLM APIs: Vercel, because the edge advantage helps perceived latency. For most AI SaaS in 2026 — Railway for backend + database, Vercel for frontend.
- Is Railway free?
- Not for a real app. Railway gives a new account a one-time $5 trial credit that expires after 30 days. After the trial, its pricing page (read September 18, 2026) lists a $0 Free plan ("then $1 per month") capped at 1 vCPU and 0.5 GB of RAM per service, one project and no custom domain, which is a sandbox, not hosting. The Hobby plan is a $5 monthly minimum with $5 of usage included, so a tiny app effectively runs on the subscription alone. Pro is a $20 monthly minimum with $20 of usage included and unlimited workspace seats. The trade against Vercel's free Hobby plan is that Railway has no non-commercial clause: the same $5 hosts a paid product with a database next to it.
- Why does Railway charge me when nobody is using my app?
- Because Railway bills a running service by the second, not by traffic. As of September 18, 2026, railway.com/pricing lists $0.00000772 per vCPU per second and $0.00000386 per GB of RAM per second, about $20 a month per vCPU and $10 per GB kept running all month. Your plan's $5 (Hobby) or $20 (Pro) minimum covers that much usage first. Vercel works the other way: it meters Active CPU and invocations, so idle time is free, but Pro charges $20 per developer seat.
- Railway vs Render: which is better?
- They are the two closest rivals in the 'deploy a full-stack app from a repo' category. Render's draw is a genuinely free tier for small web services, with the well-known catch that free instances sleep after a period of inactivity and wake slowly on the next request; its paid instances start in the single-digit dollars a month. Railway has no permanent free tier but no sleeping either, usage-based pricing from $5, and a smoother experience for apps with a database attached. For a hobby project that can tolerate cold starts, Render's free tier wins; for anything a customer will hit, Railway's $5 is the better default.
- Railway vs Fly.io?
- Fly.io is the more infrastructure-shaped option: you run Firecracker VMs close to users in many regions, with more control and more configuration, and Fly retired its free allowance for new accounts in 2024, so both are pay-as-you-go now. Railway is the simpler product — deploy from Git, add Postgres with a click, watch one usage meter. If you need multi-region placement or want to tune the machines, Fly; if you want the least ops for a standard web app plus database, Railway.
More on Vibe Code Rescue
Claude Code Tutorial (2026): What to Learn, in What Order, and the Free Courses Worth Your Time
Anthropic's own free courses teach Claude Code in about 5 hours and 15 minutes across five of them. The courses are free, the tool isn't: you need Claude Pro or higher. Here's the order to take them in, the week of real work that goes in the middle, and the tutorial advice Anthropic now says to stop following.
What Is Prompt Injection? How It Hits the AI Feature You Added to Your Lovable or Cursor App
Prompt injection is when text your AI feature reads carries instructions the model follows instead of yours. OWASP ranks it the #1 risk for AI apps, and there's no full fix. Here's what it looks like in a founder's app, three real cases, and the fixes that limit the damage.
Is Supabase Secure? Yes, If RLS Is On: How to Check Yours in 5 Minutes (2026)
Supabase the platform is secure: SOC 2 Type 2, encrypted data, regular pen tests. Your app on Supabase is only as secure as its Row Level Security rules, and those are yours to set. Here's what Supabase covers, what you own, how RLS works in plain English, and a 5-minute check for a Lovable or Bolt app.
Supabase Anon Key vs Service Role Key (Now Publishable vs Secret): Which One Is Safe in Your Frontend?
The anon key (now called the publishable key) is meant to sit in your frontend. The service role key (now the secret key) bypasses every security rule in your database and must never leave your server. Here's the old-name to new-name map, where to find each one, and what to do if the wrong one leaked.
Written by
Justin McKelvey
I spent 12 years running snowboard and mountain-bike shops in Colorado, then taught myself to code. Since then: 50+ products shipped, Head of Product at a national sports platform, CTO at an AI startup. Now I put AI to work in real businesses in Austin, TX and remote, and write down what actually works.
Work with meWant more help? Get a free 20-min repo audit · Grab the real AI stack cost sheet