> ## Documentation Index
> Fetch the complete documentation index at: https://vlyai-1c28d863.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Cloudflare R2

> S3-compatible object storage with no egress fees. Cheaper than S3 for high-bandwidth use cases.

[Cloudflare R2](https://www.cloudflare.com/products/r2/) is S3-compatible storage with **zero egress fees**. Major cost saving for high-bandwidth apps (video streaming, image-heavy).

<Note>
  Full walkthrough being written.
</Note>

## When to pick over S3

* Bandwidth-heavy apps where S3 egress fees are significant.
* You're already on Cloudflare for CDN.
* API parity with S3 (use the same SDKs).

## Setup

`R2_ACCOUNT_ID`, `R2_ACCESS_KEY_ID`, `R2_SECRET_ACCESS_KEY`, `R2_BUCKET` in vly secrets. Use AWS S3 SDK with R2's endpoint.

## Related

<CardGroup cols={3}>
  <Card title="AWS S3" icon="cloud" href="/integrations/aws-s3">
    The standard.
  </Card>

  <Card title="Convex file storage" icon="hard-drive" href="/convex/file-storage">
    Built-in.
  </Card>

  <Card title="UploadThing" icon="upload" href="/integrations/uploadthing">
    Simpler alternative.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.