Cloudflare Docs
Workers
Visit Workers on GitHub
Set theme to dark (⇧+D)

Deployments

Deployments are a log of static historical versions of your Worker. They track changes to the bundled code, bindings, compatibility date, and usage model associated with a Worker over time. They also keep metadata associated with the deployment including the user, deploy source, timestamp, and other useful information to understand and audit who or what is making changes to your Worker.

The latest deployment for a Worker is considered the active deployment. You can view your latest 10 deployments via the Cloudflare dashboard or the wrangler deployments list command.

​​ Creating a new deployment

New deployments are created whenever an upload, binding change (including environment variables and secrets), usage model change, or rollback is made. Create a new deployment via the Cloudflare dashboard, Workers API, or Wrangler (with wrangler publish command or wrangler rollback command) .

Notably, this does not include changes to bound resources. For example, if two Workers (Worker A and Worker B) are bound via a service binding, changing the code of a Worker B will not trigger a new deployment on Worker A. Changes to the service binding on Worker A will also not trigger a new deployment for Worker B.

​​ Interacting with deployments

​​ via Wrangler

Wrangler allows you to view the 10 most recent deployments as well as bindings and metadata for a specific deployment.

For more information on the wrangler deployments list and wrangler deployments view commands, refer to the commands documentation.

​​ via the Cloudflare Dashboard

Access deployments by logging into the Cloudflare dashboard > Account Home > Workers > selecting your Worker project > Deployments. Deployments includes information about previous deployments, and your Worker’s detail page displays information about the most recently deployed and currently active deployment.

​​ via the API

To learn more about accessing deployment information via Cloudflare’s REST API, refer to the API documentation.

​​ Rollbacks

Rollbacks are a way to quickly deploy an older deployment to the Cloudflare global network. This could be useful if a breaking change or unintended publish is made to a production Worker.

Perform a rollback via Wrangler or the Cloudflare dashboard.

​​ via Wrangler

To perform a rollback via Wrangler, use the wrangler rollback command. Refer to Wrangler rollback command documentation for more information.

​​ via the Cloudflare Dashboard

To perform a rollback via the Cloudflare dashboard:

  1. Log in to the Cloudflare dashboard and select your account.
  2. Go to Workers > select your Worker > Deployments.
  3. Find the deployment you would like to rollback to.
  4. Select the three dot icon on the right of the deployment and select Rollback to this deployment.

​​ Limitations

Rollbacks are only valid to the latest 10 deployments.

Rollbacks will not be allowed if external resources have been deleted or modified between the target deployment and the active deployment. Specifically, rollbacks will not be allowed if:

  • A Durable Object migration has occurred between the active deployment and target deployment.
  • If the target deployment has a binding to an R2 bucket, KV namespace, or queue that no longer exists.
  • If the target deployment has a binding to a D1 database (this limitation will be removed in the future).

Bound resources will not be changed during a rollback. This means if the structure of data has changed between the active deployment and target deployment, errors could occur using older bundled code with changed data.