apps/web/content/docs/s3-config/cloudflare-r2.mdx
Looking to take full control of your data storage within Cap? Integrating your Cloudflare R2 bucket gives you ownership, flexible scalability, and reduced latency, all while keeping your workflow smooth and secure. In this guide, you'll learn how to quickly set up and configure Cloudflare R2 with Cap Desktop—no complicated steps or robotic instructions, just straightforward guidance.
TL;DR:
- Open Cap Desktop → Cap Apps → S3 Config → Configure
- Select Cloudflare R2 → Enter your R2 credentials
- Adjust bucket permissions and test the connection
- Save settings and start using your R2 bucket for seamless content delivery.
Note: While this tutorial focuses on Cloudflare R2, Cap Desktop supports any S3-compatible storage service. If you use another provider, just substitute the endpoint and credentials accordingly.
Before connecting to Cap, ensure you have a Cloudflare R2 bucket ready:
Create or Access Your R2 Bucket:
my-cap-uploads) and select a region (auto or your preferred option).Generate R2 Access Keys:
cap-app-user).Configure Bucket Permissions: By default, Cloudflare R2 keys come with broad permissions. If you need more controlled access:
Set CORS Rules (Optional): If you’re serving content directly from the bucket via a browser (e.g., sharing publicly accessible links):
GET, HEAD, and PUT from domains like https://cap.so, https://www.cap.so, https://cap.link, and https://www.cap.link.https://<accountid>.r2.cloudflarestorage.com. Find the exact endpoint in your R2 bucket details.my-cap-uploads).auto. Check your bucket details to confirm.With these steps completed, Cap Desktop will now use your Cloudflare R2 bucket to store and serve assets, giving you full control over how and where your content is hosted.
After setting up Cloudflare R2 in Cap Desktop, any new shareable links you create will be served from your R2 bucket. This means:
With your Cloudflare R2 integration complete, you can enjoy seamless, secure, and efficient content delivery directly within Cap Desktop—no extra steps, no compromises.