On this page
- Step 1 — Create the account (no card needed)
- Step 2 — Deploy your first Worker
- Step 3 — Add a static frontend with Pages
- Step 4 — Add a database with D1
- Step 5 — Store files with R2
- Step 6 — Use your own domain (free)
- Step 7 — Confirm you’re inside the free limits
- Where AI coding assistants get this wrong
- Checklist
- FAQ
- Related topics
- Sources
How to Deploy Your First App on Cloudflare for Free
Deploy an app on Cloudflare for $0: Workers (100K req/day), Pages static hosting, D1 database, R2 storage — with zero egress fees and no credit card.
Quick answer
- Cloudflare is the only major platform where a real app runs at $0 with no credit card, no expiry date, and no egress fees — Workers gives 100,000 requests/day, and static assets are free and unlimited.
- The free stack is: Pages for the frontend, Workers (or Pages Functions) for the API, D1 for the database, and R2 for files — all inside daily free limits.
- Limits reset daily at midnight UTC, not monthly. Exceed one and requests fail with an error until the reset; nothing is ever billed on the free plan.
- When you outgrow it, the paid plan is $5/month minimum with 10 million included requests — cheaper than the overage on any big-three serverless product.
Step 1 — Create the account (no card needed)
Go to dash.cloudflare.com and sign up with an email address — no credit card. The Workers Free plan is the default on your account.
How to verify it worked: you land in the dashboard, and under Workers & Pages you have the option to Create Worker without any plan prompt.
Step 2 — Deploy your first Worker
The quickest path is the dashboard playground, but for a real project use the CLI:
npm create cloudflare@latest myapp
cd myapp
npx wrangler@latest deployThis scaffolds a Worker, gives you a local dev server (npm run dev), and deploys to a myapp.<subdomain>.workers.dev URL. Edit src/index.ts, then npx wrangler@latest deploy again to push changes.
How to verify it worked: curl https://myapp.<subdomain>.workers.dev/ returns your Worker’s response, and the Workers & Pages dashboard shows the deployment with its last-modified time.
Step 3 — Add a static frontend with Pages
For HTML/CSS/JS, create a Pages project — it connects to a GitHub/GitLab repo and builds on push (500 free builds/month):
- Dashboard → Workers & Pages → Create → Pages → Connect to Git.
- Pick the repo containing your frontend and let it build.
- Your site is live at
<project>.pages.dev.
Static assets are free and unlimited — Pages serves them from Cloudflare’s CDN with no request or bandwidth charges. If you want your Worker to serve HTML directly instead, wrangler supports static assets in a Worker.
How to verify it worked: opening https://<project>.pages.dev/ serves the site, and the Pages dashboard shows a successful build.
Step 4 — Add a database with D1
D1 is Cloudflare’s serverless SQLite database, included on the free plan (5 GB storage, 5 million rows read/day, 100,000 rows written/day):
npx wrangler@latest d1 create myapp-db
npx wrangler@latest d1 execute myapp-db --remote --command "CREATE TABLE visits (id INTEGER PRIMARY KEY, at TEXT)"Then bind it in wrangler.jsonc and query it from your Worker with env.DB.prepare(...). Since September 1, 2026, D1 enforces the free-plan daily limits strictly: exceed the row read or write cap and queries fail with an error until the reset — there’s no soft limit anymore.
How to verify it worked: your API writes a row per request, and the D1 dashboard’s Row Metrics shows reads/writes counted against today’s limit.
Step 5 — Store files with R2
For uploads, images, or anything S3-shaped, use R2 — 10 GB of storage, 1 million Class A operations (writes/lists) and 10 million Class B operations (reads) per month, and crucially $0 egress (the big-three object stores charge per GB of download; R2 doesn’t). Bind it to your Worker:
npx wrangler@latest r2 bucket create myapp-assetsHow to verify it worked: your Worker uploads a file via env.MY_BUCKET.put(...) and the file is readable at its public URL; the R2 dashboard shows usage under 10 GB.
Step 6 — Use your own domain (free)
If you own a domain, add it to Cloudflare (the free plan includes one zone, full DNS + CDN + HTTPS) and attach it to your Worker or Pages project under Custom Domains or Custom domains → Set up a custom domain. A workers.dev subdomain works fine for testing, but a real domain is the difference between a demo and a product.
How to verify it worked: https://yourdomain.com serves your app with a valid certificate and a cf-ray header.
Step 7 — Confirm you’re inside the free limits
Open Workers & Pages → your Worker → Metrics, and check Requests against the 100,000/day limit. Watch the D1 row metrics, KV reads (100K/day), and R2 operations too. All limits reset at 00:00 UTC — a spike that blows through the daily cap costs you downtime, not money.
How to verify it worked: today’s request count is under 100,000, and no invocation shows an exceeded outcome.
Where this bites vibecoders
Cloudflare’s free tier is the one the AI can’t overshoot: there are no SKUs, no instance sizes, no egress line items, and no credit card on file to surprise you. The failure mode is different — the daily limits. A “hello world” Worker that a bot hits 150,000 times in an afternoon goes down at Error 1027 until midnight UTC. The AI will also happily generate a Worker that does heavy work per request (10 ms CPU limit) or loops over 50 subrequests, both of which error out on the free plan. Cloudflare rewards small, cacheable, stateless code — which is exactly what a free-tier app should be anyway.
Where AI coding assistants get this wrong
- Writing CPU-heavy logic into the request path — the free plan allows 10 ms of CPU per invocation, and exceeding it returns Error 1102.
- Forgetting that static assets and Pages Functions both count toward the Worker request budget when served dynamically.
- Using the paid-only APIs (e.g., Durable Objects without checking the plan) and wondering why deployment fails.
- Designing around monthly limits — Cloudflare’s are daily, and they reset at midnight UTC, not on the 1st.
- Adding a big-three cloud in front of Cloudflare for “scale,” paying for egress Cloudflare was already giving away for free.
Checklist
- Create the Cloudflare account with just an email (no card)
- Deploy a Worker with
wranglerto a*.workers.devURL - Connect a Pages project for static assets (free and unlimited)
- Add D1 for the database, staying under 5M rows read / 100K rows written per day
- Use R2 for files (10 GB, $0 egress) instead of S3
- Attach a custom domain on the free plan
- Watch the daily Metrics dashboard, not the monthly bill
- When outgrowing free: paid plan at $5/month with 10M requests included
FAQ
Is Cloudflare Workers really free?
Yes — 100,000 requests per day, no credit card, no egress fees, and no expiry date. You also get free KV (1 GB), D1 (5 GB database), R2 (10 GB storage), Queues, and Cron Triggers within their daily limits. The limits reset every day at midnight UTC; exceed one and requests fail with an error until the reset.
What happens when I exceed 100,000 requests in a day?
Requests start failing with Error 1027 until midnight UTC, when the counter resets. You can configure the Worker to fail open (bypass the Worker and serve as if unconfigured) or fail closed (show an error page). Nothing is billed — Cloudflare’s free plan has no overage charges; you just go down for the rest of the day.
Do I need a credit card to use Cloudflare?
No. A Cloudflare account is free to create with just an email address, and the Workers Free plan is the default. You only add a payment method if you upgrade to the paid plan.
What’s the difference between Workers and Pages?
Pages is static hosting (HTML/CSS/JS with Git integration and free builds) — static assets are served free and unlimited. Workers is serverless code that runs on Cloudflare’s edge network. Pages Functions let you attach serverless endpoints to a Pages site; they’re billed as Workers, so they count against the same 100K requests/day.
Can Cloudflare handle a real app with a database?
Yes — D1 (Cloudflare’s SQLite-based database) gives 5 GB of storage and 5 million rows read / 100,000 rows written per day on the free plan, and R2 gives 10 GB of object storage with free egress. A low-traffic API plus frontend fits comfortably. The catch is daily, not monthly, limits — burst traffic counts against the same 100K requests.
What does the paid plan actually cost?
$5/month minimum, which includes 10 million requests and 30 million CPU-milliseconds per month; beyond that, $0.30 per additional million requests and $0.02 per million CPU-ms. Egress stays free. For a small app, the paid plan is effectively a $5/month ceiling that removes the daily request anxiety.
Related topics
- How to Launch Free Infrastructure on AWS, GCP, or Azure
- How to Deploy Your First App on Oracle Cloud for Free
- How to Set Up Cloudflare for a Small Project
- What Is Serverless Computing?
- How to Deploy Your First Serverless Function on AWS Lambda
- Budget Cloud and PaaS Compared