> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mirage.strukto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Cloudflare R2

> Set up Cloudflare R2 credentials for the R2 resource.

## Credentials

### 1. Create R2 API Token

1. Go to [https://dash.cloudflare.com/](https://dash.cloudflare.com/) -> **R2 Object Storage**
2. **Manage R2 API Tokens** -> **Create API Token**
3. Set permissions: **Object Read** (or **Object Read & Write**)
4. Scope to your bucket
5. Copy the **Access Key ID** and **Secret Access Key**
6. Note your **Account ID** from the Cloudflare dashboard URL

### 2. Set Environment Variables

```bash theme={null}
# .env.development
R2_BUCKET=my-bucket
R2_ACCOUNT_ID=abc123...
R2_ACCESS_KEY_ID=...
R2_SECRET_ACCESS_KEY=...
```

For Python configuration, see the [R2 resource](/python/resource/r2) docs.
