Preview environments

A running environment for every pull request

Wodby copies your base environment, builds the pull request branch, and posts the address back to the pull request. When the pull request closes, the preview is deleted.

  • Create a preview automatically when a pull request opens
  • Rebuild on every push and delete when the pull request closes
  • Works with GitHub, GitLab, and Bitbucket

From pull request to preview, without setting anything up

Previews follow the pull request, from the moment it opens until it closes.

Choose an environment as the base for your app. When a pull request targets the branch that environment follows, Wodby creates a preview and builds the pull request branch. New commits rebuild it, and it is removed when the pull request is closed or merged.

  • Create a preview when a pull request is opened, reopened, or marked ready for review.
  • Rebuild on every push. A commit that arrives during a deployment is built when that deployment ends.
  • Delete the preview when the pull request closes, or after the number of idle days you choose.
  • Limit how many previews an app keeps at once, and choose whether draft pull requests get one.

Pull requests from forks never get a preview, because they could run untrusted code with your app's configuration.

See the result on the pull request

Reviewers get the preview address and its state where they are already working.

Wodby reports each deployment as a wodby/preview status on the commit it built, and keeps one comment on the pull request up to date. The comment gives the address when the preview is ready and the reason when a preview cannot be created.

  • Works with GitHub, GitLab merge requests, and Bitbucket pull requests.
  • Editing one comment keeps the conversation free of repeated bot messages.
  • If selected services could not be seeded, a separate status names them. The preview still works.

A copy of your environment, sized for review

A preview runs your real stack and configuration without the cost of a full production copy.

Each preview copies the base environment's services, settings, variables, secrets, and links, and follows the pull request branch. Container databases are separate for each preview, so a preview never shares a database with its base environment.

  • Run one replica of every service, with autoscaling off.
  • Keep cron jobs off unless you choose to run them, so previews do not send duplicate emails.
  • Make no scheduled backups.
  • Seed only the services you select, from a fresh backup of the base environment.

Preview environments are available on paid plans. Previews run on the base environment's cluster and count toward plan usage like any other environment while they exist. They use generated technical domains rather than your custom domains.

Keep previews behind a password

A pull request should not put unreleased work on a public address.

Basic Auth is on by default for new preview settings. Every preview of an app shares one generated password, so reviewers only need to learn it once. The pull request comment links to the sign-in details in Wodby and never contains the password.

Previews copy the base environment's variables and secrets, and seeded services get its data. Choosing a production environment as the base shows a warning, so a staging environment is usually the better base.

Create previews on request

Automatic previews are the default, and you can also ask for one yourself.

Create a preview for any open pull request from the app's environments list, including a draft. People with write access can also comment on the pull request:

  • /wodby preview creates a preview for the pull request.
  • /wodby reseed deletes the preview and creates it again with fresh seed data.

Agents can use previews too. Through the Wodby MCP server, a connected agent can read and change preview settings, list pull requests, and create a preview, with your confirmation for changes.

The base environment must use public app access, and its databases must run as containers in the environment. See the prerequisites for the full list.

Next step

Review changes in a running application

Choose a base environment, turn on previews for your app, and open a pull request.