Products
Cloudflare Containers
Cloudflare Containers is an environment for running applications and isolated containers within the Cloudflare platform. The source describes it as a component for running long-lived tasks. It supports Worker Previews with independent instances for each preview and is used with Durable Objects to coordinate container state and lifecycle.
Cloudflare Containers is a container runtime environment within the Cloudflare platform, providing runtime resources for applications that need an isolated Linux environment or long-running processing.
Uses mentioned in the sources
- Running media engines for extended periods within the Streamline project to process streams and video.
- Running an independent container for each code branch in Worker Previews, with state isolated from production and other branches.
- Providing Linux environments for AI agents and tasks that need to retain files or dependencies.
Relationship with Durable Objects
The sources describe using Durable Objects to coordinate sessions and container lifecycles, and to connect containers with identity, state, and policies. In the newer design, application logic can choose the container image and instance type at runtime, while the container provides a stoppable and restorable Linux workspace when needed.
Containers in Worker Previews
Worker Previews creates an independent Containers application for each preview, helping isolate state changes, sessions, and migrations from production and other previews. However, the sources note that complete isolation does not currently cover every request chain in multi-Worker applications, and that some paths, such as Queues consumption and Workflows execution, require separate configuration.
Environments and snapshots
The sources mention a prebuilt image named cloudflare/debian-trixie, which includes Debian Trixie Slim and Node.js 24.20.0 LTS. Filesystem snapshots are also available in public beta, allowing the workspace to be saved and restored in a later session.
Security and isolation
Cloudflare disclosed a previous vulnerability involving the reuse of storage blocks within Containers and Cloudflare Sandboxes, and said it fixed the configuration that caused it and cleaned up old temporary disks and snapshots. According to the source, the company found no evidence of malicious exploitation, and the fix requires no action from customers.
Upgrade path
Cloudflare announced that Container class and Legacy Sandbox class will not receive updates after December 31, 2026, while current deployments will continue as stated in the source. The company recommends moving to Durable Object and using this.ctx.container directly.