Setup
1
Create a Cloudflare account
If you don’t have one already, create an account at cloudflare.com.
2
Create an R2 bucket
- Navigate to R2 Object Storage in the Cloudflare dashboard
- Click Create bucket
- Give it a name (e.g.,
ringee-storage) - Select a location (or leave as automatic)
3
Generate API credentials
- Go to R2 → Manage R2 API Tokens
- Click Create API token
- Grant Object Read & Write permissions
- Copy the Access Key ID and Secret Access Key
4
Set up public access (optional)
If you need public URLs for stored files:
- Go to your bucket → Settings → Public Access
- Enable public access and note the public bucket URL
5
Configure environment variables
Add the following to your
.env file:
