Configuring Rclone to access Cloudflare R2 Bucket(s)
Rclone is a tool that can be used for managing files in cloud storage. The feature-rich program offers support for many of different business & consumer storage services, standard transfer protocols, and S3 object stores. And in a previous post created, I mentioned about utilizing Cloudflare R2, which is S3 compatible, making Cloudflare R2 available to be used within Rclone.
More information on Rclone can be found here.
However, the most important thing to start utilizing Rclone, is to download the application on your machine. Downloads can be found here. Select the appropriate operating system based based on your machine.
After you download it, copy the files into your preferred folder location.
Additionally for this configuration, I will be utilizing Rclone browser, simply because that is what I normally use for this anyway. And I find it most useful for my use case. So if you want to follow along with this post, you will need to download both.
Rclone Browser
I don’t usually only use the Rclone command-line program, I instead prefer using RcloneBrowser. Which is a cross platform GUI for Rclone. You still need to install the Rclone command-line, but this is just an optional addition / alternative way of utilizing Rclone.
Configuring your connection
After you have copied the Rclone installation files to a folder location, and you have downloaded & installed Rclone browser.
You can open Rclone browser, go to File > Preferences > General, and then specify the location of rclone.exe (where you copied the files into)
Exit out of the settings and then press Config. This will open a command-line prompt for configuring a connection for Cloudflare R2.
For this portion, you can follow this Cloudflare Docs for information on configuring the connection to the bucket(s).
Once you have created the intiial configuration, you should then be able to access it using RcloneBrowser. If you do not see the connection, then you might need to go back to File > Preferences > General to specify hte rclone.conf location. Which may be found in C:\Users\user\AppData\Roaming\rclone\rclone.conf
You can also check the config file to see the connection you just created, it will look something like this:
As a reminder, if you are using an API Token with Object-level permissions, you need to add “no_check_bucket = true” in the config file.

Full-width image
If everything is set correctly, then once you double click on the connection, it will start loading the items in your bucket(s). Although this is easier to navigate through, it still does not provide the easiest interface for seeing what actually the files/images/videos are. (at least for me)
Mounting Drive
There is an option within Rclone Browser for mounting the connection so that it becomes a mounted drive within File Explorer for easily adding, copying, editing, or deleting files within the bucket.
For my use case, this is ideal for being able to access and actually see what the items in the bucket is. Within Cloudflare, you would otherwise need to click on each indviidual object / item, to then either get a preview of the image or open the URL to see what it is.
However, with this, I can mount the drive to be able to view everything within File Explorer. Which makes it 100 times easier for me to view what the items are.
Also, I can easily create folders within the bucket to be able to separate the items, and Cloudflare with automatically adjust the custom URL.
For example: After I connect to Cloudflare R2 within RcloneBrowser, I then hit the Mount button:

Full-width image
I specify the Drive Letter I want to use, it defaults to Z: - Be sure to include the : after your Drive letter, and make sure it is not already in use.

Full-width image
It will then start mounting the drive. After it is mounted, you can then use it like a normal drive. With Rclone in the background, any changes will be synced to Cloudflare R2. One thing I noticed so far with using it like this, there may be a delay before items are synced from Cloudflare R2 to locally. I’ve especially noticed this when I uploaded several items to R2 directly.
Once you are done using it, you can unmount the drive and close Rclone.
上一篇
中国区空全局注册方法与订阅完整指南,同时也支持海外区 - 如有乐享
下一篇
How to Play H.264 Files in VLC: Step-by-Step Guide with Videos - Reolink Blog
- Author:NetSec
- URL:https://notes.51sec.org/Collections/2eefc8e8-dcfd-81d0-a874-db4d5fcf9125
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!
