Disclosure: we may earn a commission or referral reward from CloudCone, Contabo, DigitalOcean (account credit, not cash), Hostwinds, InterServer, RackNerd, VPSDime and Vultr if you sign up through our links. It does not change the price you pay. Every other provider pays us nothing. Prices in this guide are as of the date shown and may have changed; see the comparison pages for the latest checked prices.

Guides · BLOG

Railway vs VPS in 2026: honest comparison for indie developers

Some prices quoted in this guide are out of date. It is being rebuilt on our price index; for current prices use the comparison pages, which show when each price was checked.

Railway (railway.app) is a modern PaaS that ships git-push deploys, instant managed database provisioning, and a genuinely nice developer experience. This guide compares it honestly to a plain cloud VPS: when Railway is the answer, when the price gap makes a $5 Hetzner CX22 a straight upgrade.

Prices as of 2026-09-22.

The one-paragraph verdict

Railway is the best DX in the PaaS category — deploy your app, provision a Postgres and Redis with one click, and iterate. For a small production app, expect to pay $10-30/mo on Railway; a comparable Hetzner CX22 costs $4.60. Railway's cost advantage shows up in the "your first 10 hours of setup are free" sense — you don't need to install Nginx, configure PHP-FPM, or write systemd services. Pick Railway when your time is worth more than the price gap; pick VPS when it isn't.

Cost comparison at three scales

Railway prices per resource unit (~$0.000463/GB-minute + $0.000058/vCPU-minute), which translates roughly to:

Workload Railway (est.) Hetzner VPS
Small hobby project, 512 MB / 0.5 vCPU average $5-10/mo $4.60 (CX22)
Growing SaaS, 1 GB / 1 vCPU + Postgres $15-30/mo $4.60-7.60
Real production, 2 GB / 2 vCPU + Postgres + Redis $30-70/mo $7.60-15.60
Multi-service architecture at scale $80+ $28+ (Hetzner CX52)

Railway's Postgres starts around $5/mo for a small instance, scaling with usage.

What Railway is genuinely great at

Deploy experience. Connect your GitHub repo, Railway detects the framework, deploys automatically. Zero configuration for most stacks (Node, Python, Ruby, Go, Rust, PHP).

Instant managed database. Click a button, get a Postgres URL. Same for Redis, MongoDB, MySQL. No configuration.

Environment management. Separate development, staging, production environments with proper secrets management. Not something you get free on a VPS.

Automatic HTTPS. Every project gets *.up.railway.app domain with SSL included. Custom domain setup is one click.

Preview environments per PR. Every pull request gets its own environment. Real workflow value.

Metrics and logs built in. No need to set up Prometheus, Grafana, or an external log service for a small project.

Templates. One-click deploys for popular open-source stacks (Ghost, Umami, Directus, NocoDB, etc.).

Reasonable free tier. $5/month usage credit on the free plan, enough for hobby projects.

What a plain VPS is great at

Cost at scale. $4.60/mo Hetzner CX22 runs any small SaaS. Fixed cost. No per-service line items.

No usage-based surprises. Traffic spike doesn't blow up your bill.

Full control. Custom Nginx modules, custom cron precision, unusual system libraries.

Multi-service on one box. Your app, Postgres, Redis, background workers all on the same VPS.

No cold starts. Always warm.

Where Railway's pricing bites

Per-service resource units. Each container you run bills separately. A stack with your app + Postgres + Redis + a worker = 4 services, each with its own resource line.

Bandwidth beyond included allowance. Bandwidth pricing kicks in on higher usage; check the current calculator.

Team seats. Priced per developer on the team.

Sustained CPU workloads. Priced per vCPU-minute — a workload that pins CPU 24/7 gets expensive fast compared to a fixed-cost VPS.

When Railway is right

  • Prototyping and side projects where your time is the limiting resource.
  • Small teams that value DX.
  • You want managed database without setting one up.
  • Preview environments per PR are worth real money to your workflow.
  • You're comfortable with the platform's opinions (Docker-based, HTTP-service-focused).

When a VPS is right

  • Cost matters more than DX.
  • Sustained CPU workloads where per-minute pricing hurts.
  • Non-HTTP workloads (game servers, mail servers, MQTT brokers) that don't fit Railway's model.
  • You want to run your database on the same host as your app (cost savings, latency).
  • You've done VPS setup before and it's not a bottleneck.

The specific migration

From Railway to a Hetzner VPS:

1. Provision Hetzner CX32 (4 vCPU / 8 GB) at $7.60/mo.

2. Install Docker + docker-compose.

3. Take your Railway Dockerfile (or write one if you were using Nixpacks defaults) and add to docker-compose.yml.

4. Add Postgres and Redis containers to the same compose file.

5. Add Caddy as a reverse proxy — handles Let's Encrypt automatically.

6. Copy environment variables from Railway to .env on the VPS.

7. pg_dump from Railway Postgres, restore to local Postgres.

8. docker-compose up -d. Done.

Total migration time: 2-4 hours for a typical single-app-plus-DB setup.

Related guides

Prices as of 2026-09-22.