All posts
Product

What is a preview environment?

A preview environment is a temporary, running copy of your app for one branch or ticket, at its own URL. A full-stack preview includes the backend services and a database with seed data, not just the front end. Teams use previews to try a change before it merges. In Ensemble, previews sleep when idle and sit behind a login by default.

5 min read
Updated Oct 13, 2026

The definition

A preview environment is a temporary, running copy of an application for a single branch or change, deployed at its own URL.

You'll see the same idea under several names: ephemeral environment, per-branch environment, review app, deploy preview, PR environment. The details differ between platforms, but three things make something a preview environment:

  • One per change. Every branch or ticket gets its own copy. Nobody shares.
  • Isolated. One preview's data and configuration can't affect another's.
  • Disposable. It exists for as long as the change is in progress, then goes away when the branch merges.

That last point is what separates a preview from the environments most teams already have.

Preview vs staging vs production

Production is what customers use, staging is one shared pre-release copy, and a preview is one copy per change.

Production Staging Preview environment
How many One Usually one One per branch or ticket
Who uses it Customers The whole team, in turn Whoever is working on or reviewing that change
Data Real Shared test data Its own seed data
Lifetime Permanent Permanent Until the branch merges

Staging works well when a few changes move through it at a time. It struggles when many people are producing branches at once, because one environment can only run one version of the app. Previews remove the queue: every change is runnable on its own, at the same time as every other change.

That doesn't make staging useless. Plenty of teams keep staging for integration testing and release candidates, and use previews for individual changes. We cover the trade-offs in preview environments vs staging.

Front-end previews vs full-stack previews

A front-end preview shows the UI for a commit. A full-stack preview also runs the API, the database and the other services the change touches.

Front-end previews are common and useful: many hosting platforms build one for every push. They're enough for a copy change or a layout tweak. They fall short when the change depends on the backend. Picture a new "annual billing" toggle on a team plan. To review it properly, someone needs to:

  • sign in as an admin on a team plan,
  • see the current plan and prices loaded from the database,
  • flip the toggle and watch the API return the discounted price.

None of that works without the API, a database and data in it. A full-stack preview brings all three, so the reviewer clicks through the real flow instead of imagining it.

Data is the part teams most often skip. An empty database makes a preview useless to anyone but its author. Good seed data (an empty account, a busy account, an admin, a user on each plan) is what makes a preview worth opening. See how to set up preview environments with a seeded database.

Why PMs and designers need preview environments

Engineers can run a branch on localhost, but PMs and designers can't. Without a preview, they can't see a change until it reaches staging.

For an engineer, "try this branch" means a few terminal commands. For everyone else, it means one of three workarounds:

  1. Ask an engineer to pull the branch and share their screen. It works, but it costs the engineer's focus, and the reviewer can't click around themselves.
  2. Wait for staging. The change sits in a queue behind other changes, and by the time it's deployed, the context is gone.
  3. Review screenshots. Fine for static UI, useless for flows, states and data.

A preview replaces all three with a link. The PM opens it, clicks through the change, and leaves feedback while the work is still fresh.

This matters more now that PMs and designers are making changes themselves with AI tools. A PM who asks an AI agent to change the billing page needs to see the result running. Without a preview, they've written code they can't look at.

It matters for engineers too. An engineer with agents working on three branches can't run all three on one localhost at once. A preview per branch gives each change its own running copy, so the review starts from a link, not just a diff.

What's inside an Ensemble preview

An Ensemble preview runs the whole stack you declared, at its own URL, behind a login.

  • Your app's services: web, API and workers, from a monorepo or several repos.
  • Datastores: Postgres, Redis and the other dependencies you declare.
  • Seed data: loaded into every preview, so reviewers see realistic accounts.
  • Its own domain: an Ensemble preview domain by default, or your own domain on Team and Pro.

Each preview moves through a simple lifecycle:

State What it means
Building Starting up for a new branch
Running Serving requests
Hibernated Paused while nobody is using it. Resumes when someone with access opens it.
Stopped Stopped by a user or the plan's limit. Can be restarted.

Previews are removed when their branch merges. Only awake previews count toward your plan's limit: 1 on Pay as you go, 2 per builder seat on Team and 5 per builder seat on Pro, pooled across the workspace. Hibernated previews are free, which is what makes a preview for every branch affordable. More on that in how to reduce preview environment costs.

A preview link is for anyone who needs to try the change: the person who made it, a reviewer, a stakeholder, or an eng lead before approval.

Access should match the audience. In Ensemble:

  • Workspace members open previews directly. This is the default.
  • Anyone else gets an expiring share link: a client, a customer success rep, an exec.
  • Public mode is off unless someone turns it on for one preview, usually for a demo.

Previews are private by default because they contain unreleased features and test data. Why preview environments shouldn't be public explains the risks.

FAQ

What is the difference between a preview environment and a deploy preview?

"Deploy preview" usually means a hosting platform's preview of one commit, often just the front end. A preview environment can be the full stack: backend services, a database and seed data. Ensemble previews are full-stack.

Is a preview environment the same as staging?

No. Staging is one shared environment that changes wait their turn for. A preview environment exists per branch, so every change can be tried at the same time, in isolation.

How long does a preview environment stay up?

In Ensemble, a preview stays until its branch merges. It hibernates when nobody is using it and wakes when someone with access opens it. A stopped preview can be restarted.

Can customers see a preview environment?

Not by default. Ensemble previews are open to workspace members, or to anyone you send an expiring share link. Public mode is a per-preview switch for demos.

Do I need Docker or Kubernetes knowledge to use previews?

No. An engineer declares the environment once. After that, every branch gets a preview without anyone touching infrastructure.


Ensemble turns every change into a running copy of your real app, with its services and data, at a private link anyone on the team can open. What is Ensemble?

Stop shipping the hard way

Agents write the code. Ensemble runs it. Everyone clicks it: product people in the browser, agents in parallel, engineers deciding what merges.

Start free