Skip to content
Cloudflare Docs

Workers for Platforms

Build a multi-tenant platform that runs untrusted code in secure, isolated sandboxes.

Workers for Platforms lets you run untrusted code written by your customers, or by AI, in a secure hosted sandbox. Each customer runs code in their own Worker, a secure and isolated environment.

When to use Workers for Platforms

Use Workers for Platforms when you need to:

  • Run untrusted code at scale - Execute code written by your customers or generated by AI in a secure sandbox, with the ability to deploy an unlimited number of applications.
  • Build multi-tenant platforms - Give each customer their own isolated compute environment with complete separation between tenants.
  • Extend Cloudflare's developer platform to your customers - Use bindings to give each customer access to KV stores, D1 databases, R2 storage, and more. Your customers get the same powerful tools, managed through your platform.
  • Give each application its own domain - Host applications under a subdomain of your domain (for example, customer-name.myplatform.com) or integrate with custom hostnames to allow customers to use their own domains.

Features

Workers for Platforms provides tools to manage and control your customers' code:

  • Custom limits - Set per-customer limits on CPU time and subrequests.
  • Observability - Collect logs and metrics across all user Workers in your namespace. Export to third-party platforms like Datadog, Splunk, and Grafana.
  • Tags - Organize, search, and filter user Workers by custom tags like customer ID, plan type, or environment.

Reference architectures

Explore reference architectures that use Workers for Platforms:


Get started

Get started

Set up a dispatch namespace, dynamic dispatch Worker, and user Worker.