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
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.
| 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 1 |
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 include ListBuckets, PutBucket, ListObjects, PutObject, CopyObject, CompleteMultipartUpload, CreateMultipartUpload, LifecycleStorageTierTransition, ListMultipartUploads, UploadPart, UploadPartCopy, ListParts, PutBucketEncryption, PutBucketCors and PutBucketLifecycleConfiguration.
Class B Operations include HeadBucket, HeadObject, GetObject, UsageSummary, GetBucketEncryption, GetBucketLocation, GetBucketCors and GetBucketLifecycleConfiguration.
Free operations include DeleteObject, DeleteBucket and AbortMultipartUpload.
Uploads to Cloudflare R2
Connection Setup
Find your Cloudflare R2 S3 API URL:
Create an API token with the following steps:
Verification and Save
ShareX Integration
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:
- Open R2.
- Select Create bucket.
- Type your bucket name of choice, and click Create Bucket.
- Select Settings.
- Scroll to Domain Access and select Connect Domain.
- Type your domain and select Continue.
- 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.
To create an API token:
- Open R2.
- Select Manage R2 API Tokens on the top-right side of the dashboard.
- Select Create API token.
- Select the pencil icon or R2 Token text to edit your API token name.
- Under Permissions, select Read or Edit for your token.
- Select Create API Token.
- Save a copy of your Access Key ID and Secret access key for the next step.
To configure uploading with ShareX:
- In Destinations, select Destination Settings.
- Scroll down to Amazon S3 and select it.
- Using the Access Key ID and Secret access key, fill in the two top boxes.
- Select Endpoint: and type <ACCOUNT_ID>.r2.cloudflarestorage.com. (You can find your account ID on the right-hand side of your Dashboard.)
- Set Region: to auto.
- Fill Bucket name: with the bucket name you picked on Cloudflare.
- Change Upload path: to your preference.
- Update Use custom domain: to the domain that you selected in the first step.
- Uncheck Set public-read ACL on file.
- Ignore the rest of the settings.
- In Destinations, select Image uploader: and change it to File Uploader -> Amazon S3.
- Take a screenshot and ensure that it uploads correctly.
ShareX Configuration (uploader to Amazon S3):
Amazon S3 Configuration:


共有 0 条评论