Cloudflare Docs
Cloudflare for Platforms
Cloudflare for Platforms
Edit this page on GitHub
Set theme to dark (⇧+D)

User Workers

User Workers contain code written by your end users (end developers).

​​ Upload User Workers

You can upload user Workers to a namespace via Wrangler or the Cloudflare API. Workers uploaded to a namespace will not appear on the Workers & Pages section of the Cloudflare dashboard. Instead, they will appear in a namespace under the Workers for Platforms tab.

To run Workers uploaded to a namespace, you will need to first create a dispatch Worker with a dispatch namespace binding.

​​ Upload user Workers via Wrangler

Uploading user Workers is supported through wrangler by running the following command:

$ npx wrangler deploy --dispatch-namespace <NAMESPACE_NAME>

For simplicity, start with wrangler when getting started.

​​ Upload user Workers via the API

Since you will be deploying Workers on behalf of your users, you will likely want to use the Workers for Platforms script upload APIs directly instead of Wrangler to have more control over the upload process. The Workers for Platforms script upload API is the same as the Worker upload API, but it will upload the Worker to a dispatch namespace instead of to your account directly.

​​ Bindings

You can use any Workers bindings with the dynamic dispatch Worker or any user Workers.

Bindings for your user Workers can be defined on multipart script uploads in the metadata.json file.