Setting Up Cloudflare R2 Storage

This guide will help you create a free Cloudflare account and configure the storage needed for the slideshow app. You will need a credit card for identity verification, but the free tier includes 10GB of storage which is free forever.

What you will get by the end of this guide:
1. Account ID
2. Access Key ID
3. Secret Access Key
4. Public Bucket URL

1Create Account & Enable R2

1. Go to dash.cloudflare.com/sign-up and create an account.

2. Once logged in, look at the sidebar on the left. Locate and click R2.

3. You will see a prompt to enable R2. Click "Enable R2" (or "Purchase R2 Plan").

Note: You will be asked to enter payment information. This is required by Cloudflare to prevent abuse. You will not be charged unless you exceed the free 10GB limit (which is very difficult to do with personal use).

2Create Your Storage Bucket

1. After enabling R2, click the button that says Create bucket.

2. Bucket Name: Enter a unique name (e.g., my-slideshow-videos). It must be all lowercase.

3. Location: Leave this as "Automatic".

4. Click Create Bucket.

3Allow Public Access

1. You should now be looking at your new bucket's settings. Click the Settings tab near the top.

2. Scroll down to the Public Access section.

3. Find the area labeled R2.dev subdomain and click "Allow Access".

4. Type "allow" in the confirmation box and confirm.

5. Copy the URL that appears (e.g., https://pub-12345.r2.dev). This is your Public Bucket URL.

4Generate Credentials

1. Click "R2" in the far left sidebar to go back to the main R2 overview.

2. On the right side of the screen, look for a link that says Manage R2 API Tokens. Click it.

3. Click the blue Create API Token button.

4. Token Name: Enter "Slideshow App".

5. Permissions: Select Object Read & Write.

6. Click Create API Token.

5Copy Your Keys

Warning: This screen will only appear once! Do not close it until you have copied these values.
Account ID: This is the long alphanumeric string at the very top of the list (e.g., 83002...).
Access Key ID: Copy the long string of text.
Secret Access Key: Copy the very long string.

Enter these three values, plus the Public Bucket URL from Step 3, into the Slideshow application.