Adding a New Bucket
This guide walks you through adding a new Cloudflare R2 bucket configuration to R2Clone.
Prerequisites
Section titled “Prerequisites”Before you begin, you’ll need:
- A Cloudflare account with R2 enabled
- R2 API credentials (Access Key ID, Secret Access Key and Endpoint URL)
- See the Cloudflare R2 API Authentication Guide for instructions
- The name of the R2 bucket
- You can copy this from your R2 dashboard
- You can also list any buckets on your account using wrangler (the Cloudflare CLI tool) using this command: wrangler r2 bucket list
1. Open the R2 Storage Settings
Section titled “1. Open the R2 Storage Settings”Navigate to the Settings page and select the R2 Storage tab.
2. Click “Add Bucket”
Section titled “2. Click “Add Bucket””Click the Add Bucket button in the top-right corner of the R2 Storage section.
3. Enter Bucket Configuration
Section titled “3. Enter Bucket Configuration”In the bucket configuration dialog, enter the following details:
-
Access Key ID: Your Cloudflare R2 access key ID (exactly 32 characters)
-
Secret Access Key: Your Cloudflare R2 secret access key (exactly 64 characters)
-
R2 Endpoint: Your R2 endpoint URL (found in your Cloudflare R2 dashboard, e.g.,
https://[account-id].r2.cloudflarestorage.com) -
R2 Bucket Name: The exact R2 bucket name as defined in the Cloudflare Dashboard.
-
Region: Set the region for your R2 bucket, or leave it blank for the
autodefault to apply.
4. Test the Connection
Section titled “4. Test the Connection”Click Test Connection to verify that your credentials are correct and R2Clone can successfully connect to your bucket.
If your connection test fails:
- Verify credentials: Double-check your Access Key ID, Secret Access Key and Endpoint URL and ensure they are correct.
- Check permissions: Verify your API token has the necessary permissions to access the bucket