SYSTEM Cited by 9 sources
Cloudflare R2¶
R2 is Cloudflare's object-storage tier on the Developer Platform — S3-compatible, with zero egress fees, a generous free tier, and first-class integration with Workers and Sandbox SDK.
Filesystem-mount integration¶
From Sandbox SDK, sandbox.mountBucket()
presents an R2 bucket as a filesystem partition inside a Cloudflare
Container. This is the platform's standard answer to the problem that
Containers are
ephemeral by design
(durable-vs-ephemeral-sandbox) — application code sees a local
directory that survives container replacement, with zero application
changes (mountable-persistent-storage).
Seen in¶
- sources/2026-07-30-cloudflare-dogfooding-at-scale-migrating-cdnjs-to-cloudflares-developer-platform — R2 is the single source of truth for cdnjs file content (9B req/day, 108K req/sec). Replaces previous split-brain KV + GitHub architecture. No size limits — source maps, big bundles, font packs all stored alongside library files. S3 API makes the entire cdnjs catalog accessible to any S3 client. DR-mirrored to DigitalOcean Spaces.
- sources/2026-01-29-cloudflare-moltworker-self-hosted-ai-agent — canonical wiki instance. Moltworker mounts an R2 bucket into the Moltbot Sandbox container to host session memory files, conversations, and other agent state that needs to outlive the container lifecycle.
- sources/2026-04-15-cloudflare-project-think-building-the-next-generation-of-ai-agents
— R2 pairs with DO
SQLite as the Tier 0 substrate of Project Think's
execution ladder — the "durable
virtual filesystem" an agent sees as its workspace: read, write,
edit, search, grep, diff. Powered by
@cloudflare/shell. Tier 0 is the "useful at the bottom" rung — the agent is useful with just the workspace, and every higher tier shares its state with Tier 0. - sources/2026-04-16-cloudflare-ai-search-the-search-primitive-for-your-agents
— R2 as managed storage substrate inside every
AI Search instance. "Each
instance gets its own built-in storage and vector index — powered
by R2 and Vectorize." An R2
bucket can also be attached as an external data source on an
AI Search instance (sync-on-schedule), which is how the
canonical support-agent example backs the shared
product-knowledgeinstance with a customer's product-docs bucket. Same primitive used two ways: bundled-and-invisible (built-in storage) + customer-facing-and-crawled (external source). - sources/2026-04-16-cloudflare-artifacts-versioned-storage-that-speaks-git — R2 as the pack-file snapshot store behind every Artifacts repo. Each repo's hot Git objects live in its Durable Object's embedded SQLite (chunked across rows — 2 MB row limit); R2 holds durable pack-file snapshots for longer-tail blob storage and efficient multi-GB retrieval. Third substrate role on R2 (Tier 0 workspace for Project Think → managed-storage for AI Search instances → pack-file snapshots for Artifacts repos). Part of do-backed-git-server.
- sources/2026-04-16-cloudflare-email-service-public-beta-ready-for-agents — R2 as the attachment store for Agentic Inbox. The open-source reference app stitches Email Routing + Email Sending + Workers AI classification + R2 attachments + Agents SDK. Fourth substrate role on R2 (Tier 0 workspace → AI Search managed-storage → Artifacts pack-files → email attachments).
-
sources/2026-05-28-cloudflare-how-we-built-cloudflares-data-platform-and-an-ai-agent-on-top-of-it — R2 is the cold/warm storage tier of Town Lake, Cloudflare's unified data platform. R2 Data Catalog — Cloudflare's managed Apache Iceberg service — sits on top of R2 to provide schema evolution, time travel, partition evolution, and recency-tiered recompaction (per-minute usage from last week → hourly from last quarter → daily beyond). Parquet files in R2 are "much cheaper compared to keeping the same data in an OLAP database." Fifth substrate role on R2 (Tier 0 workspace → AI Search managed-storage → Artifacts pack-files → email attachments → managed-Iceberg-catalog tier for Town Lake). The pattern — "single primitive (R2) wrapped in domain-specific managed services" — is now the explicit Cloudflare-Developer-Platform-coherence shape.
-
sources/2026-10-01-cloudflare-announcing-cloudflare-k2-serverless-event-streams — R2 is the durable-log substrate behind K2, Cloudflare's serverless event-streaming primitive. K2 "implements a partitioned, durable log on top of R2 object storage" — because the edge "often cannot run traditional distributed systems software like Kafka," K2 offloads replication and consensus to R2 and keeps its own application tier "radically simpler, cheaper, and higher performance." R2's 11-nines durability + strongly-consistent atomic operations give K2 ordering + strictly-incrementing offsets "without needing a separate coordination service." Since R2 has no append, K2 accumulates writes in-memory then writes segment files large enough to amortise object-store I/O. Sixth substrate role on R2 (Tier 0 workspace → AI Search managed-storage → Artifacts pack-files → email attachments → Town Lake managed-Iceberg tier → durable append-log for K2 streams) — and the first where R2 serves as the consensus + ordering layer, not merely durable byte storage.
-
sources/2026-10-01-cloudflare-introducing-cloudflare-basin-an-open-serverless-data-platform — R2 is the storage foundation of Basin, Cloudflare's GA analytics platform: "a serverless data analytics platform built on Apache Iceberg… and R2 Object Storage." Basin Catalog stores Iceberg tables as Parquet on R2; Basin SQL queries them directly; Basin Pipelines writes JSON/Parquet files or Iceberg tables to R2. The load-bearing property is R2's zero egress fees — "data portability is only possible with free egress" — which makes Basin's "use any Iceberg-compatible engine" openness pitch economically real. The analytics-storage substrate role on R2 (distinct from the K2 durable-log role above and the Town Lake managed-Iceberg role), now productized under the Basin brand.
Related¶
- systems/cloudflare-sandbox-sdk — the interface that mounts R2 into containers.
- systems/cloudflare-containers — the ephemeral-by-design compute tier R2 complements.
- systems/cloudflare-workers — the native object-store client tier.
- mountable-persistent-storage — the pattern R2 + Sandbox SDK realise together.
- durable-vs-ephemeral-sandbox — the problem shape.
- systems/cloudflare-artifacts — uses R2 as the pack-file snapshot store behind each per-repo DO.
- do-backed-git-server — the Artifacts substrate pattern.
- systems/cloudflare-r2-data-catalog — Cloudflare's managed Iceberg service on top of R2; the cold/warm tier of Town Lake.
- systems/cloudflare-town-lake — the data platform that consumes R2 as its lakehouse storage substrate.
- systems/cloudflare-k2 — builds a partitioned durable log on R2, offloading replication + consensus + offset-ordering to the object store (sixth substrate role).
- systems/basin — Cloudflare's GA analytics platform; stores Iceberg tables (via Basin Catalog) as Parquet on R2 and leans on R2's zero-egress pricing for engine portability.
- companies/cloudflare — operator.
Local-dev parity¶
R2 is one of the binding types exposed through the
Local Explorer local
mirror of the Cloudflare API at /cdn-cgi/explorer/api,
backed by Miniflare's on-disk object
store. Same API shape local and remote — differs only by the
--local flag on cf /
Wrangler (Source:
sources/2026-04-13-cloudflare-building-a-cli-for-all-of-cloudflare).