What is the Deploy to Cloudflare button?
The Deploy to Cloudflare button is a special link + image badge that lets other developers instantly deploy your public GitHub or GitLab repository as a Cloudflare Worker — without manually cloning, configuring Wrangler, or provisioning resources themselves.
When someone clicks the button, Cloudflare:
Clones the repo
Creates a fresh copy of your repository under the user’s own GitHub or GitLab account.
Configures the project
Lets them customize Worker name, repo name, and any required resource names on a single setup page.
Builds & deploys
Uses Workers Builds to build the app, provision resources (KV, D1, R2, etc.), and deploy it live.
Sets up CI/CD
Configures automatic builds on every push to the production branch + preview URLs on pull requests.
How to use the button (for end users)
If you see a Deploy to Cloudflare button on a README or documentation page, here’s exactly what happens when you click it:
-
Click the button
You are taken to
deploy.workers.cloudflare.comwith the source repository URL pre-filled. - Sign in / connect accounts Authenticate with GitHub (or GitLab) and your Cloudflare account if you aren’t already signed in.
-
Customize project settings
Choose a name for the new repository, the Worker name, and any resource names (KV namespaces, D1 databases, R2 buckets, etc.). Cloudflare reads the
wrangler.toml/wrangler.jsonto know what is required. - Deploy Cloudflare clones the repo into your account, provisions the necessary resources, binds them, builds the project, and deploys the Worker. You get a live URL almost immediately.
- Continue developing The new repository is yours. Future pushes to the main branch automatically rebuild and redeploy via Workers Builds. Pull requests get preview URLs.
Tip: The source repository must be public. Private repos and self-hosted GitHub/GitLab instances are not supported.
How to add the button to your project
To let others deploy your Workers application with one click, add the button to your README, docs, or any webpage.
1. README.md (Markdown) version
This is the most common place. Paste the following into your README.md:
[](https://deploy.workers.cloudflare.com/?url=https://github.com/RegisterMySite-com/chatroom)
Replace the GitHub URL with your own public repository URL. You can also point to a subdirectory if needed:
[](https://deploy.workers.cloudflare.com/?url=https://github.com/YOUR_USER/YOUR_REPO/tree/main/path/to/worker)
2. HTML version (for websites & docs)
Use this when embedding the button on a static HTML page, blog post, or documentation site:
<a href="https://deploy.workers.cloudflare.com/?url=https://github.com/RegisterMySite-com/chatroom">
<img src="https://deploy.workers.cloudflare.com/button" alt="Deploy to Cloudflare" loading="lazy">
</a>
The example above uses the RegisterMySite chatroom template repository. Swap the url parameter for any public Workers project you want to share.
Live example
Best practices & requirements
Repository requirements
- Must be a public GitHub.com or GitLab.com repository
- Must contain a valid Workers application (Pages projects are not supported by this button)
- Should include a
wrangler.tomlorwrangler.jsoncso Cloudflare can detect required bindings - If using a subdirectory, that folder must be a fully isolated application with its own dependencies
Automatic resource provisioning
Cloudflare can automatically create and bind these resources based on your Wrangler config:
- Storage: KV namespaces, D1 databases, R2 buckets, Vectorize indexes, Hyperdrive, Secrets Store
- Compute: Durable Objects, Workers AI, Queues
Make sure your source repo includes sensible default names/IDs so the cloned project is immediately usable.
Helpful package.json hints
You can guide users by adding binding descriptions:
{
"cloudflare": {
"bindings": {
"DB": {
"description": "D1 database used for chat message storage"
},
"AI": {
"description": "Workers AI binding for the chat assistant"
}
}
}
}
Monorepos: Each Worker needs its own Deploy button pointing to its isolated subdirectory. Deploying multiple Workers from one monorepo with a single button is not supported.
Quick reference
Markdown (README)
[](https://deploy.workers.cloudflare.com/?url=https://github.com/RegisterMySite-com/chatroom)
HTML
<a href="https://deploy.workers.cloudflare.com/?url=https://github.com/RegisterMySite-com/chatroom">
<img src="https://deploy.workers.cloudflare.com/button" alt="Deploy to Cloudflare" loading="lazy">
</a>