ShareX/Guides/Como configurar Cloudflare R2

guide

Como configurar Cloudflare R2

Como configurar Cloudflare R2 explica um fluxo pratico do ShareX focado em r2, object storage, upload.

Overview

Cloudflare R2 is an S3-compatible object storage service with no egress fees, making it an excellent choice for hosting ShareX uploads. It combines affordable storage with Cloudflare's global CDN for fast delivery.

Prerequisites

  • A Cloudflare account
  • R2 enabled in your Cloudflare dashboard
  • A bucket created for ShareX uploads
  • API tokens with R2 read/write permissions

Setting Up R2 in ShareX

Step 1: Create R2 Credentials

  1. Go to Cloudflare Dashboard > R2
  2. Click Manage R2 API Tokens
  3. Create a new API token with Object Read & Write permissions
  4. Save the Access Key ID and Secret Access Key

Step 2: Get Your Endpoint

  1. In the R2 dashboard, note your Account ID
  2. Your S3 endpoint will be: https://<account-id>.r2.cloudflarestorage.com

Step 3: Configure ShareX

  1. Open ShareX
  2. Go to Destinations > File uploaders > Amazon S3
  3. Fill in:
    • Access Key ID: Your R2 Access Key ID
    • Secret Access Key: Your R2 Secret Access Key
    • Endpoint: https://<account-id>.r2.cloudflarestorage.com
    • Region: auto
    • Bucket name: Your R2 bucket name
    • Upload path: e.g., sharex/%y/%mo/
    • URL: Your public bucket URL (or custom domain)

Step 4: Set Up Public Access

To make files publicly accessible:

  1. In Cloudflare R2 dashboard, select your bucket
  2. Go to Settings > Public access
  3. Enable public access and note the public URL
  4. (Optional) Connect a custom domain for shorter, branded URLs

Uploading to R2

  1. Set Amazon S3 as your default file uploader in ShareX
  2. Take a screenshot — it uploads to R2 automatically
  3. The URL is copied to your clipboard

Benefits of R2 Over Other Storage

  • No egress fees: Download as much as you want at no cost
  • S3-compatible API: Works with all S3 tools and libraries
  • Global CDN: Fast content delivery worldwide
  • Generous free tier: 10 GB storage free per month

Official References

Official project links

If you need the original docs, release files or project source code, go directly to the official ShareX resources.