Cloudflare R2

To create Cloudflare R2 credentials (Access Key & Secret Key) for programmatic access (e.g., via S3-compatible APIs), follow these steps:


✅ Step-by-Step: Create Cloudflare R2 Credentials

1. Sign in to Cloudflare Dashboard


2. Go to R2 Storage

  • In the left sidebar, click “R2” (under “Storage”).
  • If this is your first time, you’ll need to enable R2.

3. Create an R2 Bucket

  • Click “Create bucket”.
  • Name your bucket (e.g., my-bucket) and create it.
  • After creation, click into the bucket to manage it.

4. Create R2 S3-Compatible Access Key

  • Go to https://dash.cloudflare.com
  • Navigate to your R2 bucket
  • Click “Manage R2 API Tokens”
  • Under “R2 API Keys”, click “Create Access Key.”
  • You will get:
    • Access Key ID
    • Secret Access Key

🔐 Copy both and store securely. You won’t see the secret key again!


5. Get Your R2 Endpoint (S3-Compatible)

  • Format:
https://<ACCOUNT_ID>.r2.cloudflarestorage.com
  • Or region-style:
https://<BUCKET>.<ACCOUNT_ID>.r2.cloudflarestorage.com

6. Enable Public Development URL

  • Go to https://dash.cloudflare.com
  • Navigate to your R2 bucket
  • Click “Your Bucket”
  • Then open the “Settings” Tab
  • Now, Open “Public Development URL” and Enable the option
  • Copy, Public URL, and set to Plugin Delivery Settings

✅ Summary of What You Need

ItemExample
Access Key IDABCDEF1234567890
Secret Access Key1234abcd5678efgh...
R2 Endpoint URLhttps://<account_id>.r2.cloudflarestorage.com
Bucket Namemy-bucket


Next

Leave a Reply