ShareX

Cloudflare R2 Configuration Guide

Setting up Cloudflare R2 for Use with ShareX

Begin by creating a Cloudflare account atCloudflare.

Your domain must beaddedproperly connected to Cloudflare and its nameserver records confirmed with your domain registrar. For R2 and the Cloudflare CDN to host your images, your domain must be managed through Cloudflare.

While Cloudflare R2 is not entirely free, it includes a generous free usage tier. For more information, refer to theCloudflare R2 pricingpage.

Establishing a New Bucket

  1. Open R2.
  2. Select Create bucket.
  3. Input a bucket name, then click theCreate Bucket.
  4. Select Settings.
  5. Scroll to Domain Access and select Connect Domain.
  6. Enter your domain name, then chooseContinue.
  7. Select Connect domain.

This action links your domain to the R2 bucket, making all objects within that bucket accessible via your chosen domain.

Generating an API Token

  1. Open R2.
  2. Select Manage R2 API Tokensfound in the dashboard's upper-right corner.
  3. Select Create API token.
  4. Choose the pencil icon or theR2 TokenProvide a name for your API token.
  5. Under Permissions, select Read or EditLocate your token.
  6. Select Create API Token.
  7. Keep a record of yourAccess Key ID and Secret Access Keyfor the subsequent step.

Setting Up Uploads in ShareX

  1. In Destinations, select Destination settings.
  2. FindAmazon S3and select this option.
  3. Enter the Access Key ID and Secret Access Keyinto the initial two fields.
  4. In Endpoint:, enter <ACCOUNT_ID>.r2.cloudflarestorage.com. Your account ID is available on the right side of yourDashboard.
  5. Set Region: to auto.
  6. In the field labeled, enter the bucket name you previously selected on Cloudflare.Bucket name:.
  7. Set Upload path:to your desired path.
  8. Set Use custom domain:to the domain chosen during bucket creation.
  9. Uncheck Set public-read ACL on file.
  10. All other settings can be disregarded.
  11. In Destinations, select Image uploader:and modify it toFile uploader -> Amazon S3.
  12. Capture a screenshot and confirm it uploads correctly.

You are now prepared to utilizeCloudflare R2 in ShareX!