All posts
comparisonpricingpreview-environments

Railway Preview Environments: The Real Cost per PR

PreviewDrop Team·November 23, 2026·7 min read

A six-person team turns on PR previews in Railway. It's one toggle in project settings. Two weeks later the invoice is triple what it was, and nobody can point to the line item that caused it.

That's not a bug in Railway. It's what consumption billing does to a workload whose size you don't control. Previews are created by engineers, in the middle of the day, at whatever rate the team happens to open pull requests. The cost is a function of human behaviour, and human behaviour is not a budget line you can set in January.

Railway is genuinely good at this. It clones a project environment — services plus databases — for each PR, gives it a unique URL, and tears it down on merge or close. If you want the cleanest per-PR toggle among the managed platforms, that's the one. The question this post answers is narrower: what does that toggle cost, and how do you decide whether it's the right trade for your team?

The Railway preview environment cost formula nobody writes down

A preview's cost is the hourly rate of the resources it holds, multiplied by how long it stays alive. That second term is the one that surprises people.

cost per PR ≈ (hourly resource rate) × (hours alive)
            + (that PR's share of always-on supporting infrastructure)

For a small team, the second line dominates. A preview that runs a web service, a worker, and a Postgres instance is not just paying for itself — it's paying for a slice of everything that has to exist so it can exist. Add four or five concurrent PRs and the supporting share multiplies before any of your own code runs.

Two variables are in your control and one isn't:

  • Hours alive is the biggest lever. A preview that lives until someone remembers to close the PR is a preview that lives for days.
  • Resource shape is the second lever. A database per preview is the expensive part, not the app container.
  • PR rate is not a lever. You don't want engineers opening fewer pull requests to save money on previews. That's a policy that punishes the exact behaviour you hired them for.

If your provider bills per second of resource time, all three variables land on the invoice. That's the structural difference between metered previews and a flat workspace price — not the per-unit rate, but which variables exist at all.

What Railway actually gives you per pull request

To be fair to the tool, the per-PR environment is a real environment, not a build artifact. Railway clones the project environment for the PR, so the preview gets the same services and databases as the parent environment, with its own URL. It tears down on merge or close. Setup is a project-settings toggle, not a pipeline you maintain.

That's a meaningfully better experience than wiring preview deploys into CI by hand. The trade is that "same services and databases as the parent" is also the definition of an expensive preview. Every cloned database is storage and compute you're renting for the life of the PR.

Railway's own pricing is consumption-based: a base subscription with an included usage credit, then usage at cost beyond it, billed per second. That model is honest — you pay for what you use — but it means the ceiling is defined by your team's behaviour rather than by a number you can put in a spreadsheet.

The three ways teams react to a variable preview bill

Every team that hits this lands in one of three places, and only one of them is good.

They turn previews off. The most common outcome. The bill spikes, someone gets nervous, previews get disabled for the repo, and the team goes back to reviewing diffs without running them. This is the worst outcome because it silently removes the thing that was preventing production incidents — and nobody notices until one ships.

They add process. A rule that previews must be closed within 24 hours. A Slack reminder bot. A weekly audit of open PRs. This works, but it converts an infrastructure problem into a discipline problem, and discipline decays.

They cap the blast radius. Fewer concurrent previews, a shared database instead of a per-PR one, shorter lifetimes. This is the reasonable middle path, and it's what most teams converge on. The cost is that you've traded isolation for predictability — the shared database means two PRs running migrations against the same schema, which is the exact problem previews were supposed to solve.

Where flat pricing changes the preview environment arithmetic

PreviewDrop is priced per workspace, not per preview, per container, or per seat. The Pro plan is $79/month for up to 10 team members and 20 concurrent previews. Starter is $19/month for 5 concurrent previews and up to 3 team members. Free is 2 concurrent previews with a 24-hour lifetime.

That's the whole pricing model. There is no usage meter, so there is no invoice surprise, and the preview count is a limit you can read on a pricing page rather than a variable you discover at the end of the month.

The limits are real, though, and worth stating plainly:

PlanConcurrent previewsPreview lifetimeTeam members
Free224 hours1
Starter ($19/mo)524 hoursup to 3
Pro ($79/mo)2072 hoursup to 10
Team ($149/mo)407 daysup to 25

Preview lifetime is a fixed window, not an idle timer — a preview runs until it expires or the PR closes, then it's torn down. If you need a preview alive for a week of stakeholder review, that's the Team plan's 7-day lifetime, not a setting on Starter.

What you don't get is a database provisioned per preview. PreviewDrop doesn't create one. You set DATABASE_URL once on the project and every preview uses it — point it at a shared dev database, or at a branching service like Neon if you need schema isolation. That's a deliberate trade: it's why the price can be flat, and it's the first thing to check against your workflow.

The decision, in one table

Metered per-PR previewsFlat workspace price
What you pay forResource-seconds × hours aliveA plan tier
Bill predictabilityDepends on team behaviourFixed monthly
Database per previewUsually included in the cloneBring your own DATABASE_URL
Scaling with headcountPer-seat base plus usagePer workspace, not per seat
Failure modeInvoice spike, previews get disabledHitting the concurrent-preview cap

Neither column is universally right. If your previews are short-lived, your PR volume is low, and you want a database cloned per PR without thinking about it, metered billing is a fair deal — you're paying for exactly what you use and the isolation is real.

If your preview bill is the thing that keeps getting escalated in planning, the problem isn't the rate. It's that the rate multiplies by a number you don't control. Flat pricing doesn't make previews cheaper in every case; it makes the cost a decision instead of a discovery.

What to do this week

Open your last three invoices and find the preview line. Then answer two questions: how many hours did the average preview live, and how many were alive at the same time on your busiest day. Those two numbers tell you whether you're paying for isolation you need or for previews nobody closed.

If it's the second, the fix is a shorter lifetime and a hard concurrency cap — both of which you can get without changing providers. If it's the first, and the number is still uncomfortable, that's the case for a flat workspace price.

PreviewDrop runs your app in a container per branch, detects the stack from the repo, and posts the URL as a PR comment. No Dockerfile, no YAML, no per-preview meter. Start with 2 free concurrent previews — no card — or read the quickstart first.

Comparing options? See how PreviewDrop compares to Railway and the Render alternative.

Want previews on your own pull requests? Start free — 2 concurrent previews, no credit card.