Connect Opndrive to Cloudflare R2

R2 speaks the S3 API, so Opndrive works with it directly. You will need your account ID for the endpoint, since R2 addresses buckets per account rather than per region.

Step 1, complete

Provider

Selected
Cloudflare R2S3 API with no egress feesChange
2, current step

Add credentials

secret access key is hidden

Add the endpoint URL above

3, not started

Open your drive

Setting up Cloudflare R2Optional

1. Allow this site in CORS

Open the Cloudflare dashboard, go to R2 Object Storage, choose your bucket, then Settings, then CORS Policy.

2. Paste this policy

{
    "AllowedMethods": [
        "GET",
        "PUT",
        "POST",
        "DELETE",
        "HEAD"
    ],
    "AllowedOrigins": [
        "https://your-domain.com"
    ],
    "ExposeHeaders": [
        "ETag"
    ],
    "MaxAgeSeconds": 3000
}

Replace https://your-domain.com with the address you use Opndrive from.

3. Permissions the key needs

  • Read
  • Write
  • Delete
  • List

Worth knowing

The region is almost always "auto". The endpoint contains your account ID, not a region, so copy it from the R2 bucket settings page.

Cloudflare R2 S3 API documentation
Cloudflare R2 Web Client and Bucket Browser