Oct 26, 20266 min read

The Best Preview Environment Platforms in 2026

Comparing per-pull-request environments on Vercel, Render, Railway, Heroku, Qovery, Northflank and a do-it-yourself GitHub Actions and Kubernetes setup, plus Encore's per-pull-request backend environments.

A preview environment is a temporary deployment of a pull request, with its own URL, that reviewers and tests use before merging. Frontend previews are close to free in 2026, while a backend preview needs its own database, queues and secrets, which is where platforms differ.

This guide compares seven ways to get preview environments by what each recreates per pull request and where it runs. It also includes Encore, which builds previews from infrastructure declared in code.

What you need to decide:

  • Whether previews include the backend and its database, or only the frontend.
  • How each preview gets data, from empty migrations, a seed script or a copy.
  • Where previews run, and whether that matches production.
  • How long previews live and what they cost while idle.

Preview environment platforms at a glance

PlatformWhat a preview containsDatabase per previewConfigurationBest for
VercelFrontend and serverless functionsThrough integrationsNone for most frameworksFrontend teams
RenderServices and databases in a BlueprintYesrender.yamlApps already on Render
RailwayServices in a project environmentYesProject settingsApps already on Railway
Heroku review appsApps in a pipelineThrough add-onsapp.jsonExisting Heroku apps
QoveryEnvironments in your cloud accountYesConsole or Terraform providerTeams on their own Kubernetes
NorthflankTemplates of services and addonsYesTemplatesTeams wanting a hosted or BYOC platform
EncoreEvery service, database, Pub/Sub topic and cron job in the appYesmigrations appliedNone beyond the app codeBackends declared with Encore
GitHub Actions and KubernetesWhatever your manifests deployIf you script itWorkflows and Helm chartsTeams with platform engineers

Vercel

Vercel

Vercel creates a preview deployment for every push to a branch, with a unique URL and comments on the pull request, and needs no configuration for Next.js and most frontend frameworks. Serverless functions deploy with the preview. Databases come through marketplace integrations, some of which create a branch per preview, and long-running backends, queues and workers sit outside Vercel's model.

Render

Render

Render preview environments copy every service and database defined in a Blueprint for each pull request. Enabling them is one block in render.yaml:

previews: generation: automatic expireAfterDays: 3 services: - type: web name: api runtime: node buildCommand: npm ci && npm run build startCommand: npm start envVars: - key: DATABASE_URL fromDatabase: name: orders-db property: connectionString databases: - name: orders-db

Previews use the same instance types as the Blueprint unless you override them, so a large production database is copied as a large preview database. Everything runs in Render's cloud.

Railway

Railway

Railway PR environments clone a project environment for each pull request, including its services and databases, and delete it on merge or close. Setup is a toggle in project settings, and variables can reference the preview's own database. It fits apps already on Railway and runs in Railway's cloud.

Heroku review apps

Heroku

Review apps are part of Heroku Pipelines and build an app per pull request from app.json, which lists add-ons, environment variables and a postdeploy script for seeding. They are mature and simple. Heroku moved to a sustaining engineering model in February 2026, so few teams start new projects on it, and review apps are mostly relevant to existing Heroku pipelines.

Qovery

Qovery

Qovery deploys to Kubernetes clusters in your own AWS, GCP or Azure account and can clone an environment for each pull request, including managed or container databases. You keep the cloud account, and Qovery operates the cluster. It suits teams that want previews on their own infrastructure without writing the pipeline.

Northflank

Northflank

Northflank preview environments are built from templates that describe services, jobs and addons such as Postgres and Redis, triggered by pull requests. They run on Northflank's cloud or on clusters in your own account. Templates are flexible, and someone has to write and maintain them.

Encore

Encore

Encore builds previews from the infrastructure declared in backend code, so a database or Pub/Sub topic in the app appears in each preview without a separate config file:

import { SQLDatabase } from "encore.dev/storage/sqldb"; const db = new SQLDatabase("orders", { migrations: "./migrations" });

With the GitHub repository connected, each pull request gets a preview environment in Encore's hosting, such as pr:72, with migrations applied or a Neon branch of another environment's database. Cron jobs do not run in previews, so scheduled work is triggered by calling its endpoint. Previews run in Encore's hosting rather than your cloud account, while environments such as production can run in your AWS or GCP account. It only applies to apps built with Encore.

GitHub Actions and Kubernetes

GitHub Actions

The do-it-yourself version deploys each pull request into its own Kubernetes namespace with Helm, triggered by the pull_request event:

name: preview on: pull_request: types: [opened, synchronize, reopened, closed] jobs: deploy: if: github.event.action != 'closed' runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Deploy preview run: | helm upgrade --install pr-${{ github.event.number }} ./chart \ --namespace pr-${{ github.event.number }} --create-namespace \ --set image.tag=${{ github.sha }} \ --set ingress.host=pr-${{ github.event.number }}.preview.example.com teardown: if: github.event.action == 'closed' runs-on: ubuntu-latest steps: - name: Delete preview run: kubectl delete namespace pr-${{ github.event.number }}

The workflow omits the hard parts: cluster credentials, image builds, wildcard DNS and certificates, a database per namespace and secrets for each preview. It gives full control and matches production closely when production is also Kubernetes, but it is a platform project to build and keep running.

Data in previews

Most platforms start a preview database empty and run migrations, which keeps previews fast and free of production data. Seed data then comes from a migration, a seed script or a fixture endpoint. Copying production data into previews needs masking for personal data, and branching databases make copies cheap without making them safe to share.

How to choose

  • Vercel for frontend previews.
  • Render or Railway if the app already runs there.
  • Heroku review apps for existing Heroku pipelines.
  • Qovery or Northflank for previews on Kubernetes in your own cloud account.
  • Encore if the backend is built with Encore and previews should follow its code.
  • GitHub Actions and Kubernetes if a platform team wants full control.

Frequently asked questions

What is a preview environment?

A preview environment is a temporary copy of your application created for a pull request, with its own URL, so reviewers and tests can use the change before it is merged. It is deleted when the pull request closes.

What is the best preview environment platform in 2026?

For frontends, Vercel and similar hosts give previews with almost no setup. For full backends with databases and queues, the choice is between platforms that recreate the whole stack per pull request, such as Render, Railway, Qovery, Northflank and Encore, and a do-it-yourself setup on Kubernetes.

How do I get a preview environment with its own database for each pull request?

With Encore, declare the database in code with new SQLDatabase("orders", { migrations: "./migrations" }) and connect the GitHub repository to your Encore app. Each pull request then gets a preview environment named after it, such as pr:72, with its own database and migrations applied, and it is destroyed when the pull request is merged or closed.

Do preview environments need separate databases?

Sharing one staging database between previews means one pull request's migration or test data can break another's. A database per preview, created from migrations and optionally seeded, keeps each review isolated at the cost of a little more compute.

Deploy to your cloud on AWS and Google Cloud
without managing infrastructure

Encore lets developers and agents define application infrastructure directly in code, then automatically provisions it from local development to production in your AWS or GCP account.

~/orders — claude
Claude Code
Claude Code v2.1.180Opus 5.5~/orders