Cloudflare R2
APIS3-compatible object storage with no egress fees
- Price
- Free tier, then paid
- Access
- API token
About
Cloudflare's S3-compatible object storage for files, media and backups, reachable through the S3 API, Wrangler or Workers bindings. Egress to the internet is free; you pay for storage and operations above the monthly free tier.
What you can do with it
- Store user uploads, media and backups in buckets
- Move existing S3 code to R2 by changing the endpoint URL
- Share private files with presigned URLs or serve them from a public bucket
Get started
- Log in to Cloudflare with npx wrangler login
- Create a bucket with Wrangler or the dashboard
- For S3 clients, create an R2 API token to get an access key pair
Example
npx wrangler login
npx wrangler r2 bucket create my-bucket
npx wrangler r2 object put my-bucket/myfile.txt --file ./myfile.txt --remoteDetails
- Hosting
- Hosted service
- Available in
- Worldwide
- Official SDKs
- JavaScript/TypeScript, Python, Go
- MCP server
- Remote
- Works with
- Cloudflare, S3