docs/backends/s3_compatible/cloudflare-r2.rst
Cloudflare R2 implements an S3 Compatible API <https://developers.cloudflare.com/r2/api/s3/api/>_. To use it as a django-storages backend:
#. Create an R2 bucket using Cloudflare's web panel or API
#. Follow Cloudflare's docs_ to create authentication tokens, locking down permissions as required
#. On your Cloudflare dashboard, create a Custom Domain that has your Static URL. This should match your Static_URL in your Settings.py file (e.g. static.domain_name.com)
#. Follow the instructions in the :doc:Amazon S3 docs <../amazon-S3> with the following exceptions:
bucket_name to your previously created bucketendpoint_url to https://<ACCOUNT_ID>.r2.cloudflarestorage.comaccess_key and secret_key to their respective Cloudflare keys.. note:: If you need a jurisdiction-specific endpoint or other advanced features, consult the Cloudflare docs.
.. _Cloudflare's docs: https://developers.cloudflare.com/r2/api/s3/tokens/