Previews
A preview deploys a branch or a pull request of a project as a separate copy on the project's server, with its own HTTPS address. You create, update and remove previews yourself from the project's Previews section. This is different from the project's own preview URL, the depfloy.app address every project gets.
Open the project and pick Previews under Configure in the menu beside the page. Every role can open the section and see the list.
Create a preview #
Create Preview sits at the top of the Previews section, and More → Create preview opens the same dialog from any section of the project. It needs deployment:create (Owner, Admin, Manager and Developer).
The Create preview dialog has:
- Source — Current branch (shown with the project’s branch, for example Current branch (main)) or one of the repository’s open pull requests. Pull request selection is available for GitHub repositories; other providers offer the current branch.
- Environment overrides — optional
KEY=valuelines that apply to this preview only. Leave it empty to use the project’s environment variables. The field shows for roles withpreview:manage(Owner, Admin and Manager).
Create and deploy queues the deployment. The preview is built on the project’s server with the project’s settings, and its HTTPS address is prepared automatically. The row shows Preview URL is not ready. until the address answers, then the link.
What a preview takes from the project #
A preview starts from the project’s branch (or the pull request’s branch), its settings and its environment variables as they are at creation. Later changes to the project’s environment do not reach an existing preview.
Database and service connections in the inherited environment still point at the same databases and services. Depfloy does not create a separate database for a preview: unless you override those variables, the preview reads and writes the project’s database. Use Environment overrides to point it elsewhere.
Some things are not carried over, and the dialog lists them under Preview notes before you create the preview:
- A project with Laravel Octane runs its preview with PHP-FPM.
- Other Laravel plugins on the project (Horizon, Reverb, Nightwatch) are not installed on the preview.
Previews need a project deployed from a Git repository and branch. One-click apps cannot have previews.
The preview list #
Each row shows the source (Current branch or PR #12), a status, the branch, whether auto deploy is on, and the address.
| Status | Meaning |
|---|---|
| Queued, Preparing, Deploying, Verifying | The preview is being set up or deployed |
| Waiting for capacity, At capacity | The server has no room for another preview build right now. Depfloy retries it about every five minutes; Retry deploy tries at once. |
| Ready | The preview is live at its address |
| Failed | Setup or the deployment failed. Retry deploy tries again. |
| Removing | The preview is being removed |
| Cleanup failed, Needs attention | Removal did not finish. Retry cleanup tries again. |
The list refreshes itself while a preview is in a transient state. More → Refresh reloads it at once. Removed previews leave the list.
Row actions #
The … menu on a row holds what your role can do with that preview:
- Deploy latest — deploys the latest commit on the preview’s branch into the same preview and address. Needs
deployment:create. - Turn on auto deploy / Turn off auto deploy — needs
project:update. With auto deploy on, a push to the preview’s branch on GitHub, GitLab.com or Bitbucket deploys the preview. A push that arrives during a build is kept, and the latest commit is deployed when the build finishes. A new preview starts with the project’s auto-deploy setting. - Edit environment — needs
preview:manage. See below. - Retry deploy or Retry cleanup — on a failed preview, one waiting for capacity, or one whose removal did not finish.
- Remove preview — asks first, then removes the preview from the server. Needs
deployment:create.
A preview stays until someone removes it. Opening, updating or closing a pull request does not create or remove a preview, and previews have no default expiry.
Edit a preview’s environment #
Edit environment opens Environment · PR #12 (or Current branch). Each row is a variable name and value; values here apply only to this preview and take precedence over the project’s variables. Deleting a row drops the override and the preview goes back to the project’s value for that name. Variables Depfloy manages for the preview are listed and cannot be changed.
Saving redeploys the preview. If the preview is building when you save, the change is kept and applied once that build finishes. The source project’s environment is not changed.
Preview addresses on a custom preview domain #
When the organization has a custom preview domain managed through Cloudflare, each new preview also gets an address on that domain, in the form pr-<number>-p<project id>-<6 characters>.<your preview domain>, alongside its depfloy.app address. The list shows the custom address once its HTTPS is ready. With Manual DNS, previews get the depfloy.app address only. Removing a preview removes its DNS record and certificate as well.
Plans and permissions #
Previews are included in every plan — Free, Starter, Pro, Business and Scale — and in the trial. On Free, previews do not count toward the two-project limit.
| Action | Permission | Roles |
|---|---|---|
| See the Previews list | project:read | Everyone |
| Create, Deploy latest, Retry, Remove | deployment:create | Owner, Admin, Manager, Developer |
| Turn auto deploy on or off | project:update | Owner, Admin, Manager, Developer |
| Environment overrides and Edit environment | preview:manage | Owner, Admin, Manager |
A preview also shows in the Projects list as a project of its own. Its page shows fewer sections than a regular project, since its configuration comes from the source project.
Assistants connected through MCP can list previews with list_pull_request_previews and manage them with manage_pull_request_preview.