---
title: "How to use Cloudflare R2 from a Mac"
description: "Connect your Mac to Cloudflare R2: create an R2 API token, enter your account ID and keys in AnyBucket, then upload, download and copy buckets with F5."
url: https://anybucket.app/guides/cloudflare-r2-mac
lang: en
---

# Cloudflare R2, right on your Mac

R2 speaks the S3 API, so a Mac app that knows S3 can browse it. AnyBucket has a tile for it that needs only your account ID and a key pair.

## The short answer

In the Cloudflare dashboard, create an **R2 API token** with read and write access and copy its **access key ID** and **secret access key**, plus your **account ID**. In AnyBucket, press **⇧⌘K**, pick **Cloudflare R2**, paste the account ID and both keys, and connect. AnyBucket builds the endpoint, `https://<account>.r2.cloudflarestorage.com`, and opens the bucket like a folder.

## Before you start
You need three things from Cloudflare:

- Your **account ID**. It's shown in the R2 section of the Cloudflare dashboard and in the S3 endpoint Cloudflare gives you.
- An **access key ID** and a **secret access key**, from an R2 API token.
- At least one bucket. You can make it in the dashboard first.

## Create an R2 API token
1. In the Cloudflare dashboard, open **R2**.
2. Open the page for managing R2 API tokens and create a new token.
3. Give it **read and write** access. To keep it tight, limit it to the buckets you'll use.
4. Create it and copy the **access key ID** and **secret access key** it shows. Cloudflare shows the secret only once, so keep the page open until AnyBucket has it.

## Connect in AnyBucket
1. Press **⇧⌘K** (**File → Connect to Server…**).
2. Under **Cloud Storage**, pick **Cloudflare R2**.
3. Paste your **Account ID**. AnyBucket shows the endpoint it builds from it, `https://<account>.r2.cloudflarestorage.com`.
4. Paste the **Access Key ID** and **Secret Access Key**. With **Save Secret in Keychain** on, the secret goes to your login keychain.
5. Optionally type a bucket name and a nickname, such as *Media*, then press **Connect**.

The tab shows an R2 badge, and the bookmark is a few letters away in the ⌘K palette from now on.

## Upload, download, copy
- **Upload a folder:** put This Mac in the other pane (⌘\ opens a second pane), mark files with Space and press **F5**. Large files go up in parts.
- **Download:** mark files in the R2 pane and press F5, or **⇧⌘D** to pick a folder.
- **Move from Amazon S3 to R2:** open the S3 bucket in one pane and R2 in the other, mark and press F5. Files stream through a small spool on your Mac, with nothing for you to clean up. See [copy files between servers](https://anybucket.app/guides/copy-files-between-servers-mac).
- **Copy inside R2:** between folders on the same server, the copy runs server-side.

## Back up to R2
R2 makes a good off-site copy of a folder. Put the folder in one pane and the R2 bucket in the other, press **⌥F5**, and Compare & Sync lists what's new or changed. Choose **mirror** to make the bucket match the folder. See [sync a folder with a server](https://anybucket.app/guides/sync-folder-with-server).

## If it doesn't connect
- **Access denied:** the token may lack write access, or be limited to other buckets. Create a token with read and write access to this bucket.
- **Nothing listed:** check that the account ID is the one the bucket belongs to.
- **A transfer stopped:** it retries by itself; anything still failing waits under **Needs attention** in the Transfers window (⌥⌘T). See [troubleshooting](https://anybucket.app/support/troubleshooting#stopped-transfers).

## Questions, answered

### Can I use Cloudflare R2 from a Mac without the command line?

Yes. AnyBucket has a Cloudflare R2 tile: paste your account ID and an R2 API token's keys, and the bucket opens like a folder. Copy with F5 or drag files in from Finder.

### Where do I find my R2 account ID?

In the R2 section of the Cloudflare dashboard. It's also the first part of the S3 endpoint Cloudflare shows, before `.r2.cloudflarestorage.com`.

### Can I move my files from Amazon S3 to R2?

Yes. Open the S3 bucket in one pane and R2 in the other, mark the files and press F5, or F6 to move them. Nothing needs to be downloaded by hand first.

### Is my R2 secret key safe?

It's stored in your login keychain, one item per bookmark. AnyBucket has no account or cloud of its own, so the key is only used to sign requests to Cloudflare.

## Read next

- [Amazon S3 and compatible](https://anybucket.app/features/s3)
- [S3 client for Mac](https://anybucket.app/guides/s3-client-mac)
- [Backblaze B2 on a Mac](https://anybucket.app/guides/backblaze-b2-mac)
- [Copy files between servers](https://anybucket.app/guides/copy-files-between-servers-mac)

**Buy for $9.99:** https://buy.polar.sh/polar_cl_pCF9yOjezTUaUqMPyUsxEho1EjcOvo6Bk49Q929LQCQ

---

AnyBucket is independent software by [Clever Mechanisms](https://clevermechanisms.dev). It is not affiliated with, endorsed by or sponsored by Apple Inc. or any storage provider. Independent software in the spirit of Cyberduck and the classic two-pane commanders. Not affiliated with iterate GmbH (Cyberduck). Apple, Mac, macOS, Finder and Quick Look are trademarks of Apple Inc., registered in the U.S. and other countries and regions. Amazon S3 is a trademark of Amazon.com, Inc. Other product names are trademarks of their owners. Email support: support@clevermechanisms.dev
