Dokploy

Preview Deployments

Preview deployments allow you to test and review your application changes in an isolated environment before merging to production.

Preview deployments are a powerful feature specifically designed for applications with GitHub integration. This feature is disabled by default but can be easily enabled to enhance your development workflow.

Preview deployments

Configuration

By default, Dokploy generates dynamic domains using traefik.me domains, which are free and require no additional configuration. The default port is 3000, but you can adjust this based on your application's requirements. You can also limit the number of preview deployments per application (default is 3).

Custom Domains

If you prefer using a custom domain, you can configure it like this:

*.mydomain.com

Dokploy will generate domains following this pattern:

preview-${appName}-${uniqueId}.traefik.me

To make this work, you need to point your wildcard DNS record (*) to your server's IP address.

How It Works

Once enabled, preview deployments are automatically created whenever a pull request is opened against your target branch (configured in your provider settings).

For example:

  • If your provider is configured to use the main branch
  • And you create a pull request from feature/new-feature to main
  • A preview deployment will be automatically created for the feature/new-feature branch

Note: Pull requests to branches other than your configured target branch will not trigger preview deployments.

Monitoring Deployments

When you open a pull request, you can monitor the deployment progress in the preview deployments section:

Preview deployments build

In this section, you can:

  • View the deployment status
  • Access the preview URL once deployed
  • Check build and deployment logs
  • Monitor deployment updates
  • Update domain configuration

Automatic Updates

The preview deployment will automatically:

  • Update with each new commit to the pull request
  • Create a new build and deployment
  • Clean up when the pull request is closed or merged

This continuous preview system allows teams to review and test changes in isolation before merging to production.

If you have security or redirects created in your application, it will inherit the same configuration for the preview deployment.

On this page