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

# Set Up Cloudflare R2 — Zero-Egress Cloud Video Storage

> Connect Cloudflare R2 to Video Downloader Plus for S3-compatible object storage with no egress fees, lower storage costs, and full multipart upload support.

Cloudflare R2 is an S3-compatible object storage service that eliminates egress fees entirely. It uses the same API key authentication pattern as AWS S3, so the setup flow is similar — create a bucket, generate a scoped API token, and connect in Video Downloader Plus.

## Prerequisites

* A Video Downloader Plus account on the [Professional plan](/billing/plans)
* A Cloudflare account with R2 Object Storage enabled
* An R2 bucket and a scoped API token

## Step 1: Create an R2 bucket

1. Sign in to the [Cloudflare Dashboard](https://dash.cloudflare.com/)
2. Select **R2 Object Storage** from the left sidebar
3. Click **Create bucket**
4. Enter a name for the bucket — for example, `vidow-videos`
5. Set a location hint to the region closest to you to minimize latency
6. Click **Create bucket**

## Step 2: Create an R2 API token

1. In the Cloudflare Dashboard, navigate to **R2 Object Storage**
2. Click **Manage R2 API Tokens**
3. Click **Create API token**
4. Configure the token:
   * **Token name**: something recognizable, like `Video Downloader Plus Uploader`
   * **Permissions**: Object Read & Write
   * **Bucket access**: scope it to only the bucket you created in Step 1
5. Click **Create API Token**
6. Copy the **Access Key ID** and **Secret Access Key** that appear

<Warning>Cloudflare displays the Secret Access Key a single time. Copy it to a secure location before closing — there's no way to retrieve it afterward without generating a new token.</Warning>

## Step 3: Get your R2 endpoint URL

R2 exposes an S3-compatible API at an endpoint that includes your Cloudflare Account ID:

```
https://ACCOUNT_ID.r2.cloudflarestorage.com
```

Your Account ID appears on the R2 overview page and in the right-hand sidebar of the Cloudflare Dashboard. Substitute it into the URL above to form your endpoint.

## Step 4: Connect in Video Downloader Plus

<Steps>
  <Step title="Open Cloud Sync">
    Go to [vidow.io/cloud-sync](https://vidow.io/cloud-sync) and sign in to your Video Downloader Plus account.
  </Step>

  <Step title="Click Connect on Cloudflare R2">
    Find the Cloudflare R2 card and click **Connect** to open the credentials form.
  </Step>

  <Step title="Enter your credentials">
    Complete all four fields:

    * **Access Key ID** — The key ID from your R2 API token
    * **Secret Access Key** — The secret from the same token
    * **Bucket name** — Exactly as it appears in the Cloudflare Dashboard
    * **Endpoint** — Your full R2 endpoint URL including the Account ID
  </Step>

  <Step title="Test and save">
    Video Downloader Plus tests the connection against your bucket. A successful validation saves the connection and enables cloud sync.
  </Step>
</Steps>

## How uploads work

R2 follows the same S3 multipart upload protocol as AWS S3:

* Files larger than 100MB are divided into 10MB parts (minimum 5MB per part)
* Parts upload in parallel for maximum throughput
* Transfers can be paused and resumed without losing progress
* Supports files up to 50TB
* Files under 100MB are sent in a single direct request

## Why choose R2?

| Feature                | AWS S3              | Cloudflare R2          |
| ---------------------- | ------------------- | ---------------------- |
| Storage cost           | \~\$0.023/GB/month  | \~\$0.015/GB/month     |
| Egress (download) fees | \$0.09/GB           | **Free**               |
| S3 API compatible      | Native              | Yes                    |
| Best for               | AWS ecosystem users | Cost-sensitive storage |

The egress cost difference is the main reason to consider R2. If you regularly download or stream your stored videos, those transfers are free with R2 — with S3, you pay \$0.09 per GB out. For heavy video workloads, this adds up quickly.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Connection test fails">
    Verify that the endpoint URL matches the format `https://ACCOUNT_ID.r2.cloudflarestorage.com` with your actual Account ID substituted in. Also confirm the bucket name in Video Downloader Plus matches the name shown in the Cloudflare Dashboard — spelling and capitalization must be exact.
  </Accordion>

  <Accordion title="Permission denied">
    Your R2 API token must have **Object Read & Write** permissions and be explicitly scoped to the bucket you're connecting. Tokens scoped to a different bucket or with read-only permissions will fail. Create a new token with the correct settings if needed.
  </Accordion>

  <Accordion title="Slow uploads">
    R2 routes traffic through Cloudflare's network, and performance is influenced by the location hint you set when creating the bucket. If uploads are consistently slow, try creating a new bucket with a location hint that matches your geography more closely, then update the connection in Video Downloader Plus.
  </Accordion>
</AccordionGroup>
