Deploy to Cloudflare with pushd
Cloudflare’s free plan has no bandwidth cap - the best home for a page that might get properly shared.
What you need
- A free Cloudflare account
- An API token with Workers permission (below)
Your workers.dev subdomain
Every Cloudflare account gets a free subdomain like yourname.workers.dev - your sites live under it. Most accounts already have one (Cloudflare assigns it when you first use Workers), so this usually needs nothing from you.
If a deploy fails with “Your account has no workers.dev subdomain yet - open the Workers dashboard once to claim one.”, your account never picked one: open Workers & Pages and it prompts you to choose it (also changeable there later, under Your subdomain). One time, then re-push.
Create the token
- In pushd, select Cloudflare and click Get token ↗ - it opens Cloudflare’s API tokens page.
- Click Create Token, then use the “Edit Cloudflare Workers” template - it grants what pushd needs (“Workers Scripts: Edit”). You can also create a custom token and assign these permissions yourself.
- Under Account Resources, pick Include → your account (if you only have one account it’s usually pre-selected). This is the account pushd deploys to.
- Under Zone Resources, the template defaults to All zones - fine to leave as is. pushd never uses zone permissions, so you can also set it to Specific zone or remove the zone permission entirely on a custom token.
- Continue → Create Token, and copy it.
Because it’s a scoped token, it can deploy sites but can’t touch your DNS records, account settings or billing. (The template includes Workers KV/R2 storage permissions pushd never uses - custom token allows fine grain control for this if you like.)
Connect it
Paste it into pushd - ✓ and “Connected as {your name}” when valid. pushd auto-discovers your account ID from the token, so there’s nothing else to find or paste. The token stays in your browser’s local extension storage, sent only to Cloudflare’s API.
Where your site lives
https://your-site.your-subdomain.workers.dev - your pushd site name plus your account’s workers.dev subdomain. Names are made URL-safe automatically (up to 54 characters). Sites stay online permanently, and bandwidth is unlimited on the free plan.
Custom domains work too, managed in Cloudflare’s dashboard - simplest if your domain’s DNS is already on Cloudflare.
Updating
Same site name = same URL, updated in place. pushd shows “Update site on Cloudflare” with the existing link before you click. New name = new site.
Limits worth knowing
No bandwidth metering on static files. The free-tier limits are shaped differently: 25MB per file and a generous daily request allowance - a simple page never notices either.
Errors you might see
- “Token looks wrong - make sure it has “Workers Scripts: Edit” permission.“ The token is invalid, or was created without the Workers template. Re-create it using Edit Cloudflare Workers.
- “Your account has no workers.dev subdomain yet - open the Workers dashboard once to claim one.” The one-time step above.
More fixes: Troubleshooting.