---
title: Connect Cloudflare R2 for sharing
description: Make an R2 bucket that viewers can reach, connect it in illuminate, and check it with a real share.
section: Sharing
order: 5
updated: 2026-11-05
applies_to: 0.1
related: [share-a-recording, connect-vimeo]
---
# Connect Cloudflare R2 for sharing

With R2, your shared videos, reports and agent packages are uploaded to a Cloudflare bucket you own, and your link plays the video from there. R2 has a free allowance that covers most people's sharing.

## In Cloudflare

1. **Make a bucket.** In the [Cloudflare dashboard](https://dash.cloudflare.com), open **R2 Object Storage** and choose **Create bucket**. Any name works, such as `illuminate-shares`.
2. **Let viewers reach it.** Open the bucket's **Settings**. Under **Custom Domains**, connect a domain you have on Cloudflare (for example `share.example.com`). For a quick test you can instead turn on the **Public Development URL** (an `r2.dev` address), but Cloudflare limits its traffic, so use your own domain for real sharing. The address you end up with is your **public base URL**.
3. **Make an API token.** Open [API Tokens](https://dash.cloudflare.com/profile/api-tokens) and choose **Create Token**, then **Create Custom Token**. Give it the account permission **Workers R2 Storage: Edit**, for your account. Copy the token when it's shown: Cloudflare shows it only once.
4. **Note your Account ID.** It's on the R2 overview page (and in the dashboard's address).

Treat the token like a password. Don't paste it into a report, a chat or a support message.

## In illuminate

1. Open **Settings → Share Settings**.
2. In **Publishing · Cloudflare R2**, choose **Set Up…**.
3. Fill in **Account ID**, **Bucket**, **Public base URL** and **API token**.
4. **For recordings over 300 MB**, also add S3 keys: in R2, choose **Manage API tokens**, create a token with **Object Read & Write** for your bucket, and copy its **Access Key ID** and **Secret Access Key** into **S3 access key ID** and **S3 secret**. Skip this if your recordings are short.
5. Choose **Save and Test**.

The test checks that illuminate can reach your bucket with that token. It doesn't open the public address, so do one real share before you rely on it.

## Check it with a real share

Share a short recording, then open your link in a private browser window. If the page loads but the video doesn't play, the public base URL isn't serving the bucket yet: check the custom domain (or the `r2.dev` address) in the bucket's settings.

## Change or remove it

In **Settings → Share Settings**, under **Publishing · Cloudflare R2**: **Edit…** changes the details, **Test Connection** checks again, and **Remove** clears the bucket details and keys from illuminate. Removing it doesn't delete anything already in your bucket, and links you've shared keep playing as long as the files are there.

## If it doesn't work

- **The token is rejected:** check it has **Workers R2 Storage: Edit** for the same account as the Account ID.
- **Bucket not found:** check the bucket name and the Account ID, exactly.
- **The test passes but the video doesn't play:** the public base URL doesn't serve the bucket. Open it in a browser with a file's name on the end to check.
- **A large recording fails to upload:** add the S3 keys (step 4 above).

Next: [Share a recording](/guide/share-a-recording.html).
