Private bucket origin · Cloudflare R2
Use a private Cloudflare R2 bucket as your image CDN origin. Edge nodes sign fetches with R2's S3-compatible API (SigV4, region auto) and serve resized AVIF or WebP.
Cloudflare R2 speaks the S3 API on https://<account id>.r2.cloudflarestorage.com/<bucket>/ and charges no egress fees. Keeping the bucket private and giving the console an Object Read Only API token lets edge nodes fetch originals directly from R2, resize and re-encode them to AVIF or WebP, and cache them at the edge.
Signing: AWS Signature Version 4 (HMAC-SHA256) for service s3 with region auto, against the account's r2.cloudflarestorage.com endpoint.
| Field | What to give |
|---|---|
| Bucket | The R2 bucket name, such as my-images. |
| Account | Your 32-character hexadecimal Cloudflare account id, as shown in the R2 S3 endpoint URL. |
| Folder (optional) | A key prefix inside the bucket, such as images/originals. |
| Access key id and secret | An R2 API token with Object Read Only permission, scoped to the one bucket. |
The secret is sealed at rest with the Data Protection key ring and never shown back in the console. Rotating credentials means entering a new key on the bucket row; edge nodes pick it up within a minute.
An account can configure up to 10 private buckets and point the account origin or individual custom hostnames at them.
Other private bucket origins: Amazon S3 & S3-compatible , Google Cloud Storage , Azure Blob Storage .