The Claude Code + Cloudflare Stack: Build and Host Anything for Basically Free
By Jonah, Founder at FindClout — July 2026
Here's the setup that quietly runs a shocking amount of what my company does: a terminal agent on my laptop, one Cloudflare account, and a single API key connecting them. That's the whole backend. Landing pages, databases, storage, scrapers, cron jobs — all of it lives on infrastructure that costs, in most months, nothing.
This post is the recipe. If you've read why you graduate past Lovable and Replit, this is the "then what" — the stack you build on once you're in the terminal.
TL;DR
- Cloudflare is the perfect backend for an AI agent: Workers (serverless code), Pages (static sites), D1 (a SQLite database), R2 (file storage), and KV (a key-value store) — all with a generous free tier and a command-line tool called
wranglerthat agents drive perfectly. - The one-API-key trick: give Claude Code a single token scoped to create and edit other tokens, and it mints every credential it needs from then on. You never open the dashboard again.
- A typical build: you say "build me a waitlist page with a D1 database and deploy it," the agent scaffolds it,
wranglerdeploys it, and you get a live URL in minutes. - Free-tier limits (as of 2026): ~100k Worker requests/day, D1 up to ~5GB, R2 up to ~10GB. Most projects never pay a cent.
- The complete non-technical walkthrough — install, Cloudflare, and the rest — is the free Guide to the Agentic Future.
Why Cloudflare is the perfect agent backend
There are plenty of places to host things. Cloudflare is special for an agent-driven workflow for a few specific reasons, and once you see them you won't want to build any other way.
Everything is a command-line tool
Cloudflare's CLI, wrangler, can create databases, deploy Workers, upload files to R2, tail logs, and manage secrets — all from the terminal. That matters enormously, because a terminal agent is fantastic at driving command-line tools and clumsy at clicking through web dashboards. The agent types wrangler deploy, reads the output, and reacts to it. The entire Cloudflare surface is available to it as text in, text out. No other major host is this agent-native.
The primitives cover almost everything
| Cloudflare product | What it is | What you use it for |
|---|---|---|
| Workers | Serverless code at the edge | Your app logic, APIs, form handlers, webhooks |
| Pages | Static site hosting | Landing pages, marketing sites, frontends |
| D1 | Serverless SQLite database | Waitlists, users, records, any structured data |
| R2 | Object storage (S3-compatible) | Images, videos, uploads, files |
| KV | Key-value store | Config, sessions, caches, feature flags |
That's the whole shape of most web software. A frontend, some logic, a database, some file storage, a fast little cache. If your idea fits those five boxes — and the overwhelming majority of internal tools and side projects do — Cloudflare hosts the entire thing.
The free tier is genuinely generous
This isn't a fourteen-day trial that turns into a bill. The free tier is a real, permanent tier that runs real products. We'll cover the exact limits below, but the short version is that a waitlist page, an internal dashboard, or a scraper that emails you a daily report will, in practice, cost you nothing to run indefinitely.
The combination is the point: an agent that speaks fluent command-line, pointed at a host whose entire control surface is a command-line tool, running on a free tier that never nags you. That's why this stack feels like cheating.
Get the free one-page course
"Jonah's Guide to the Agentic Future" walks a complete non-developer through installing Claude Code, wiring up this exact Cloudflare stack, and shipping their first live site — zero code, zero engineers, one Celsius. It's the fastest way to go from reading about this to running it.
Get the Free Guide → Book a CallThe one-API-key trick
This is the move that turns Cloudflare from "a thing you manage" into "a thing your agent manages." It's simple and it's the difference between opening the dashboard fifty times a week and never opening it again.
Cloudflare API tokens are scoped — each one is granted permission to do specific things. You could painstakingly create a narrowly-scoped token for every project by hand, going back to the dashboard each time to figure out which permissions a new build needs. That's the tedious way, and it's exactly the kind of clicking a terminal agent is bad at.
Instead, you create one token with permission to create and edit other API tokens, and you hand that single token to Claude Code. Now, whenever a build needs a scoped credential — a token that can write to D1, or manage R2, or deploy Workers — the agent mints it itself. You gave your agent one key once; it manages every credential the account needs from then on. The dashboard becomes a place you visit approximately never.
In practice, the workflow is: open claude.ai in your browser, ask it to walk you through creating the token in the Cloudflare dashboard (it'll tell you exactly which permission to pick), paste that one token into your Claude Code setup, and you're done forever. If you get an error on any step, paste it back into claude.ai and it fixes it — the same brute-force-the-errors approach we describe in how to install Claude Code.
Security note — read this one. A token that can create other tokens is, functionally, a master key to your entire Cloudflare account. Treat it exactly like one. Only ever paste it into your own Claude — never into a shared doc, a screenshot, a public repo, or someone else's session. If it ever leaks, or if you even suspect it did, go into the Cloudflare dashboard and roll (delete and recreate) it immediately. It's on the free tier and it controls hosting, databases, and DNS, so the cost of a leak isn't dollars — it's control. One key, guarded like the master key it is.
What a typical build actually looks like
Enough theory. Here's the real loop, start to finish, for something you'd genuinely want: a waitlist page that stores signups in a database.
- Right-click your
projectsfolder, open a terminal there, type your alias —cc— to launch Claude Code. (If you run it with the permissions flag set, it won't stop to ask before each step; see the dangerously-skip-permissions post.) - Type: "Build me a waitlist page with a D1 database that stores email signups, and deploy it to Cloudflare."
- The agent scaffolds a Worker, writes the HTML for the page, creates a D1 database with a table for the emails, wires the form to write into it, and runs
wrangler deploy. - If
wranglerthrows an error — a missing binding, a config typo — the agent reads it and fixes it, usually without you doing anything. - A couple of minutes later, it hands you a live
.workers.devURL. Your waitlist is online, collecting emails into a real database, on your own account.
Want to see the signups? "Show me everyone who's signed up." The agent queries D1 and prints them. Want a custom domain? "Point waitlist.mydomain.com at this." It configures the DNS — on the same Cloudflare account, with a token it minted itself. Want a daily email of new signups? "Every morning at 9am, email me yesterday's new signups." It sets up a scheduled Worker (a cron trigger) and wires in an email API.
Notice what didn't happen anywhere in there: you never opened a code editor, you never opened the Cloudflare dashboard, and you never learned what a Worker binding is. You described outcomes in English; the agent handled the plumbing. That's the entire pitch of the growth engineer role — the person who ships tools instead of requesting them.
The free-tier limits, described accurately
Let me be honest and specific here, because "basically free" deserves real numbers rather than hand-waving. These are Cloudflare's free-tier figures as of 2026 — always sanity-check the current pricing page, since providers adjust limits over time.
- Workers: around 100,000 requests per day on the free plan, with a per-request CPU-time cap. For most tools and sites, 100k requests a day is a wall you'll never touch.
- Pages: static hosting with unlimited requests and bandwidth, and a monthly cap on the number of builds (roughly 500/month). Frontends are effectively free.
- D1: the SQLite database, free up to about 5GB of storage, plus daily caps on rows read and written that are comfortably large for normal apps. A waitlist or an internal tool won't come close.
- R2: object storage, roughly 10GB free, and — notably — no egress fees, which is the thing that makes traditional cloud storage expensive. Serving files out of R2 doesn't rack up bandwidth charges.
- KV: generous free daily read/write allowances for config and caching.
The practical takeaway: for a landing page, a waitlist, an internal dashboard, a webhook handler, a link shortener, or a scraper that stores results, you will almost certainly run on the free tier forever. The free tier is the product, not a trap.
When you'd outgrow it
I'm not going to tell you Cloudflare's free tier runs a unicorn. Here's honestly where you'd graduate off it:
- Sustained traffic past ~100k Worker requests/day on a single project. When a real audience shows up, you move to the paid Workers plan — which starts around $5/month and raises the ceiling enormously. This is a happy problem and a cheap fix.
- A database bigger than a few gigabytes, or write volume past the daily caps. D1's paid tier extends this; a genuinely large app might also want a heavier database elsewhere.
- More than ~10GB of files in storage. R2 paid pricing is still cheap (and still no egress fees), so this scales gracefully.
- Long-running, heavyweight compute. Workers are built for fast request/response, not for, say, transcoding video for an hour. For that kind of job you'd add a dedicated server — which, incidentally, is exactly what FindClout runs for its heavy media processing while Cloudflare handles everything web-facing.
The point is that outgrowing the free tier is a milestone, not a cliff. You'll know because something you built got popular, and the fix is a few dollars a month.
Wire it into the rest of your stack
Cloudflare is the hosting and data layer, but the terminal-agent workflow gets more powerful the more accounts you hand it. The pattern is identical every time: get an API key, give it to Claude Code once, describe what you want.
- OpenRouter for routing the grunt work — captioning, classification, summarization — to the cheapest capable model instead of paying premium rates for everything. We break this down in OpenRouter for agent workflows.
- A social scraping API (like HikerAPI) so your Cloudflare-hosted tool can pull real social data on a schedule and store it in D1.
- An ads API so the same folder that hosts your landing page can also manage the campaigns driving traffic to it.
All of it lands in the same projects folder, driven by the same agent, most of it hosted for free on Cloudflare. That's the whole operating system. The complete zero-to-shipping version is the vibe coding guide, and the free PDF ties it together in one page.
Build your first Cloudflare-hosted app today
Get a Celsius, don't ask questions, and follow the free one-page course. By the end you'll have Claude Code installed, your Cloudflare account wired up with the one-key trick, and a live site collecting real data — for basically free. This is how marketers become the person who ships.
Get the Free Guide → Book a Call with JonahFrequently asked questions
Can Claude Code deploy to Cloudflare by itself?
Yes. Cloudflare ships a command-line tool called wrangler, and command-line tools are exactly what a terminal agent drives best. Once you've given Claude Code a Cloudflare API token, you can say "build a landing page with a database and deploy it," and the agent scaffolds the project, provisions a D1 database, writes the Worker, runs wrangler deploy, and hands you back a live URL. You never open the Cloudflare dashboard. The whole loop happens in the terminal, and the agent fixes its own errors along the way.
Is Cloudflare really free for hosting a website?
For the vast majority of projects, effectively yes. As of 2026, Cloudflare's free tier includes roughly 100,000 Worker requests per day, Cloudflare Pages with unlimited static requests, a D1 SQLite database with about 5GB of storage, and R2 object storage with around 10GB free. For a waitlist page, an internal tool, a landing page, or a side project, you will almost certainly never pay a cent. Always check Cloudflare's current pricing page since limits shift over time, but the free tier is genuinely generous and not a bait-and-switch trial.
What is the one-API-key trick for Claude Code and Cloudflare?
You create a single Cloudflare API token scoped with permission to create and edit other API tokens, and you hand that one token to Claude Code. From then on, whenever a build needs a narrower, scoped token, the agent mints it itself. You give your agent one key once and it manages every credential the account needs after that, so you never open the dashboard to fumble with token scopes again. The important caveat: a token that can create other tokens is effectively a master key to your Cloudflare account. Treat it like one. Only ever paste it into your own Claude, never share it, and rotate it immediately if it ever leaks.
What can I build with the Claude Code and Cloudflare stack?
Landing pages, waitlists, internal dashboards, admin panels, form collectors, webhook handlers, cron-driven report emailers, small SaaS backends, link shorteners, API proxies, and scrapers that store results in a database. Anything that fits the Workers plus D1 plus R2 shape, which is most web software that isn't a heavyweight compute job. The pattern is always the same: describe it in plain English, the agent builds it, wrangler deploys it, you get a URL.
When would I outgrow the Cloudflare free tier?
You outgrow it when a single project consistently pushes past roughly 100,000 Worker requests a day, needs a database larger than a few gigabytes, stores more than about 10GB of files, or requires long-running heavyweight compute that Workers aren't designed for. At that point you move to Cloudflare's paid Workers plan, which starts around $5/month and raises the limits dramatically, or you add a dedicated server for the heavy jobs. Most people never hit these ceilings on the free tier, and the jump to paid is cheap when they do.
Do I need to know how Cloudflare Workers or D1 work to use this?
No. That's the entire point of driving it through Claude Code. You describe the outcome you want in plain English, and the agent knows that a waitlist needs a form on a Worker and a table in D1, that images belong in R2, and how to wire them together. You're the person who knows what the business needs; the agent is the person who knows that D1 is a SQLite database and how wrangler deploys it. You never have to learn the plumbing — though after a few builds, you'll pick it up whether you meant to or not.
findclout.com