Asumptions:

Initial Setup: Cloudflare

We’re going to utilize Cloudflare’s basically file hosting service, R2.

In your Cloudflare account navigate to R2 Object Storage in the left panel:

image.png

And tap on Create Bucket:

image.png

You can name this whatever you want, mine is called dev-bucket.

Navigate to the Settings tab, and at this point you have two options:

image.png

If you have a domain setup on Cloudflare, use the “custom domains” functionality which will be a one-click setup for making something like, in my case:

image.png

If you don’t have a custom domain setup, you can hit the “Allow Access” button under R2.dev subdomain, but that’s not recommended for a lot of reasons (including that it looks weird!)

At this point we are almost complete with the Cloudflare setup, we now need to generate R2 API keys.

Creating API keys

On the top right of the screen, hover over Profile and tap the Profile link:

image.png

On the left side of the Profile page, tap API Tokens:

image.png