# Cloudflare Workers

> Serverless platform that serves static assets and Worker code from Cloudflare's global network.

- Category: [Static & frontend hosting](https://freetier.tech/c/static-hosting.md)
- Free tier: Always free. Static asset requests are free and unlimited; Worker script requests are capped at 100,000 per day.
- Commercial use not stated
- No card required
- Pricing: https://developers.cloudflare.com/workers/platform/pricing/
- Last verified: 2026-10-28

## Free tier limits

- Requests that serve static assets are free and unlimited
- 100,000 Worker requests per day (resets at 00:00 UTC)
- 10 ms CPU time per Worker request
- 20,000 static asset files per Worker version
- 25 MiB max per static asset file
- 100 Workers per account
- 3,000 Workers Builds minutes per month, 1 concurrent build, 20-minute build timeout

## Gotchas

- Cloudflare's Pages docs now tell new projects to start on Workers (static assets) instead of Pages.
- Past 100,000 Worker requests in a day the Worker returns Error 1027; paths matched by `run_worker_first` get a 429 instead of falling back to static assets.
- Cloudflare's Self-Serve Subscription Agreement bars collecting or processing credit card information on any web property receiving Free Services.
- workers.dev subdomains are intended for personal or hobby projects that aren't business-critical; Cloudflare recommends a custom domain or route for production.
- Accounts created with Google, Apple or GitHub login have no password until one is set, and creating API tokens requires a password.
- `wrangler deploy <dir>` only works interactively; agents and CI should set `assets.directory` in the Wrangler config file.

## Setup

### What the human does

1. Sign up at https://dash.cloudflare.com/sign-up and verify your email address.
2. Approve the Wrangler OAuth prompt in the browser when the agent runs `npx wrangler login`, or create an API token.

### How the agent gets access

#### CLI login

- Install: `npm i -D wrangler@latest`
- Run: `npx wrangler login`
- Notes: Opens a browser OAuth flow with a localhost:8976 callback; use `npx wrangler login --device` on remote or containerized machines.

#### API key

- Install: `npm i -D wrangler@latest`
- Get it at: https://dash.cloudflare.com/profile/api-tokens
- Env var: `CLOUDFLARE_API_TOKEN`
- Notes: Create it from the "Edit Cloudflare Workers" template; non-interactive Wrangler also needs CLOUDFLARE_ACCOUNT_ID.

### Verify

```sh
npx wrangler whoami
```

### Optional: start without an account

Creates a temporary resource before the human has an account, for trying things out. The steps above are the normal path.

- Run: `npx wrangler deploy --temporary`
- Expires: The human has 60 minutes to claim the deployment.
- To keep it: Open the claim URL Wrangler prints.
- Notes: Needs Wrangler 4.102.0 or later, and fails if Wrangler can already authenticate with OAuth, CLOUDFLARE_API_TOKEN or a global API key.

## Docs

- Quickstart: https://developers.cloudflare.com/workers/static-assets/get-started/
- llms.txt: https://developers.cloudflare.com/workers/llms.txt

## Sources

- https://developers.cloudflare.com/pages/
- https://developers.cloudflare.com/workers/static-assets/
- https://developers.cloudflare.com/workers/static-assets/billing-and-limitations/
- https://developers.cloudflare.com/workers/static-assets/get-started/
- https://developers.cloudflare.com/workers/platform/pricing/
- https://developers.cloudflare.com/workers/platform/limits/
- https://developers.cloudflare.com/workers/ci-cd/builds/limits-and-pricing/
- https://developers.cloudflare.com/workers/configuration/routing/workers-dev/
- https://www.cloudflare.com/terms/
- https://www.cloudflare.com/plans/
- https://developers.cloudflare.com/fundamentals/account/create-account/
- https://developers.cloudflare.com/fundamentals/user-profiles/login/
- https://developers.cloudflare.com/fundamentals/api/get-started/create-token/
- https://developers.cloudflare.com/workers/wrangler/install-and-update/
- https://developers.cloudflare.com/workers/wrangler/commands/general/
- https://developers.cloudflare.com/workers/wrangler/commands/workers/
- https://developers.cloudflare.com/workers/ci-cd/external-cicd/github-actions/
- https://developers.cloudflare.com/workers/llms.txt

JSON: https://freetier.tech/api/v1/services/cloudflare-workers.json
