How to Obtain Cloudflare R2 Credentials and Endpoint
To connect Cloudflare R2 to Rclone or RcloneView, youβll need three key pieces of information:
- β Access Key ID
- β Secret Access Key
- β R2 S3-Compatible Endpoint URL
This guide walks you through how to retrieve these from your Cloudflare dashboard.
π§° Prerequisitesβ
Before you begin:
- You must have a Cloudflare account with R2 Object Storage enabled.
- You need access to the Cloudflare Dashboard.
- Basic understanding of cloud storage concepts is helpful.
π¦ Step 1: Create an R2 Bucket (If You Havenβt Already)β
- Log in to your Cloudflare Dashboard.
- In the left sidebar, go to R2 β Object Storage.
- Click Create bucket.
- Enter a unique name for your bucket.
- Choose a location (e.g., Automatic, or a region like
westerneurope
). - Click Create Bucket.
This bucket will be your storage location for files transferred using RcloneView.
π Step 2: Generate API Credentialsβ
To authenticate with R2, youβll need to create API tokens that provide access permissions.
β How to Create an Access Key and Secret Key:β
- Go to R2 β API in the Cloudflare dashboard.
- Click Manage R2 API Tokens.
- Click Create API Token.
- Give the token a name (e.g.,
Rclone Access
). - Select the permissions:
Admin Read & Write
(full access)
βother permissions may not allow bucket access.
- Choose whether to apply to:
- All buckets
- Specific buckets only
- Optionally, set expiration (or leave as "Forever").
- Click Create API Token.
Once the token is created, Cloudflare will show you:
- Access Key ID
- Secret Access Key
These credentials will be shown only once. Make sure to copy and store them securely.
π Step 3: Get the R2 Endpoint URLβ
- Go to R2 β Object Storage in your Cloudflare dashboard.
- Click your bucket name to open its details.
- Navigate to the Settings tab.
- In the S3 API section, youβll find the endpoint format and account details.
Depending on how your API token was created, you should use one of the following endpoint formats:
π If your API Token has Admin-level access and is allowed to access all buckets:β
Use the base endpoint (without a bucket path):
https://<ACCOUNT_ID>.r2.cloudflarestorage.com
π¦ If your API Token is scoped to a specific bucket only β or if you want to access to a particular bucket:β
Use the bucket-specific endpoint:
https://<ACCOUNT_ID>.r2.cloudflarestorage.com/<BUCKET-NAME>
You can find both your ACCOUNT_ID and bucket name in the S3 API section of the bucketβs Settings tab:

Use this endpoint when setting up your Cloudflare R2 remote in RcloneView or via Rclone CLI.
β Summaryβ
You should now have the following values ready to configure your Cloudflare R2 remote:
Field | Description |
---|---|
Access Key ID | Provided by Cloudflare API token |
Secret Access Key | Provided by Cloudflare API token |
Endpoint URL | Found in R2 bucket settings (S3-compatible URL) |
You can now enter these into RcloneView when setting up a new S3-compatible remote, or use the Rclone CLI.