Cloudflare R2 Storage Integrates with ShareX

ShareX, which is a the most powerful, free and open source application screenshot utility with a lot of features, includes the ability to upload images, videos, and files to not only the many publicly available services, but your own custom ones.

ShareX has provided their own documentation here for configuring ShareX with Cloudflare R2, which is simple to follow. This post is to give a more screenshot guide to show you the steps how to configure ShareX to upload screenshots to Cloudflare R2, this s3 compatible storage.

https://i.itprosec.com/2026/01/integrate%20Cloudflare%20R2%20storage%20with%20ShareX.png

https://i.itprosec.com/2026/01/Photos_zlRapcl5zI.jpg

Free tier of Cloudflare R2

Cloudflare R2 is an object storage provider similar to Amazon S3, which allows for storing large amounts of unstructured data. Cloudflare R2 is S3-compatible, so it is able to utilize some of the already created S3 libraries, extensions, and tools. One of the core benefits of Cloudflare’s offering, is that there are no egress charges, which some other companies charge when data is accessed externally. And depending on volume of requests and how much data is being requested, that can become costly.

More information can be found here.

Cloudflare R2 offers a forever free tier, that includes:

  • 10 GB Storage per month
  • 1,000,000 Class A Operations per month
  • 10,000,000 Class B Operations per month

If you need to go past these limits or your utilization is past these limits, then the following is the current additional costs as of 3/3/2025:

  • $0.015/GB for storage past 10 GB.
  • $4.50 per additional million operations past your monthly free limit of 1,000,000 Class A Operations.
  • $0.36 per additional million operations past your monthly free limit of 10,000,000 Class B Operations.

You can use the following amount of storage and operations each month for free.
Free
Storage 10 GB-month / month
Class A Operations 1 million requests / month
Class B Operations 10 million requests / month
Egress (data transfer to Internet) Free 

The free tier only applies to Standard storage, and does not apply to Infrequent Access storage.

The main different between Class A Operations vs Class B Operations is what they do.

  • Class A Operations tend to mutate the state.
  • Class B Operations tend to read the state.

If you are only hosting images, files, or files that are not changing, you will mainly be using Class B Operations, since that would be people viewing those items stored. And the Class A Operations would you be uploading these items, listing what is inside your bucket, deleting, editing, etc.

Another benefit of utilizing a custom domain with Cloudflare R2, is that it can leverage other features from Cloudflare such as their Content Delivery Network (CDN) for caching these files/images/videos. Which should result in limiting the number of Class B Operations, if the files are already cached by the user’s browser on Cloudflare’s edge network.

Additional information on pricing and the different type of operations can be found here.

Class A operations

Class A Operations include ListBucketsPutBucketListObjectsPutObjectCopyObjectCompleteMultipartUploadCreateMultipartUploadLifecycleStorageTierTransitionListMultipartUploadsUploadPartUploadPartCopyListPartsPutBucketEncryptionPutBucketCors and PutBucketLifecycleConfiguration.

Class B operations

Class B Operations include HeadBucketHeadObjectGetObjectUsageSummaryGetBucketEncryptionGetBucketLocationGetBucketCors and GetBucketLifecycleConfiguration.

Free operations

Free operations include DeleteObjectDeleteBucket and AbortMultipartUpload.

Uploads to Cloudflare R2

1. Dashboard upload limitation
<100 files, < 300MB size
2. https://r2uploader.com/
A lightweight yet powerful desktop application built with Rust and Tauri, enabling lightning-fast file uploads. Optimized for large files and batch uploads, with no 300MB limit!
Your configuration remains local - we never collect or upload your credentials.

Connection Setup

Find your Cloudflare R2 S3 API URL:

Go to your R2 bucket settings page
Look for the "S3 API" section under "Bucket Details"
Copy the S3 API URL in the following format:
https://[accountId].r2.cloudflarestorage.com/[bucketName]
The application will automatically extract the Bucket Name and Account ID from this URL.

Create an API token with the following steps:

Go to Cloudflare R2 API Tokens page: https://dash.cloudflare.com/?to=/:account/r2/api-tokens
Generate a new token with at least read and write permissions for objects
Copy the "Access Key ID" and paste it into the "Access Key" field
Copy the "Secret Access Key" and paste it into the "Secret Key" field
(Optional) Configure a Custom Domain:
If you have a custom domain for your R2 bucket, enter it in the "Custom Domain" field
This domain will be used when generating shareable links for uploaded files
In this example, I did not put my cusome domain in. It will i.51sec.org or i.itprosec.com

Verification and Save

Click the "Check" button to verify your bucket connectivity
If the connection test passes, click "Save" to store your configuration

ShareX Integration

https://getsharex.com/docs/cloudflare-r2

Ensure that your domain is added to Cloudflare and verified with NS (Name Server) records on your domain registrar. Your domain has to be hosted through Cloudflare; otherwise, this won't work, and you will be unable to use R2 / Cloudflare CDN to host your images.

While R2 is not free, it does have a generous free tier. The full pricing is available to see here.

To create a bucket:

  1. Open R2.
  2. Select Create bucket.
  3. Type your bucket name of choice, and click Create Bucket.
  4. Select Settings.
  5. Scroll to Domain Access and select Connect Domain.
  6. Type your domain and select Continue.
  7. Select Connect domain.

This connects your domain to the R2 bucket and allows any objects inside that bucket to be accessible by the selected domain.

Custom Domain for your bucket:

To create an API token:

  1. Open R2.
  2. Select Manage R2 API Tokens on the top-right side of the dashboard.
  3. Select Create API token.
  4. Select the pencil icon or R2 Token text to edit your API token name.
  5. Under Permissions, select Read or Edit for your token.
  6. Select Create API Token.
  7. Save a copy of your Access Key ID and Secret access key for the next step.

Create User API Toker for speciy bucket:

Note: you want to make sure to choose object read&write permissions at this screen. 

To configure uploading with ShareX:

  1. In Destinations, select Destination Settings.
  2. Scroll down to Amazon S3 and select it.
  3. Using the Access Key ID and Secret access key, fill in the two top boxes.
  4. Select Endpoint: and type <ACCOUNT_ID>.r2.cloudflarestorage.com. (You can find your account ID on the right-hand side of your Dashboard.)
  5. Set Region: to auto.
  6. Fill Bucket name: with the bucket name you picked on Cloudflare.
  7. Change Upload path: to your preference.
  8. Update Use custom domain: to the domain that you selected in the first step.
  9. Uncheck Set public-read ACL on file.
  10. Ignore the rest of the settings.
  11. In Destinations, select Image uploader: and change it to File Uploader -> Amazon S3.
  12. Take a screenshot and ensure that it uploads correctly.


ShareX Configuration (uploader to Amazon S3):

Amazon S3 Configuration:

版权声明:
作者:倾城
链接:https://www.techfm.club/p/232754.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>