diff --git a/docs/backends/s3_compatible/cloudflare-r2.rst b/docs/backends/s3_compatible/cloudflare-r2.rst new file mode 100644 index 00000000..17eab665 --- /dev/null +++ b/docs/backends/s3_compatible/cloudflare-r2.rst @@ -0,0 +1,17 @@ +Cloudflare R2 +============= + +Cloudflare R2 implements an `S3 Compatible 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 +#. Follow the instructions in the :doc:`Amazon S3 docs <../amazon-S3>` with the following exceptions: + + * Set ``bucket_name`` to your previously created bucket + * Set ``endpoint_url`` to ``https://.r2.cloudflarestorage.com`` + * Set the values of ``access_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/ diff --git a/docs/backends/s3_compatible/index.rst b/docs/backends/s3_compatible/index.rst index bb19b187..900bfaec 100644 --- a/docs/backends/s3_compatible/index.rst +++ b/docs/backends/s3_compatible/index.rst @@ -10,5 +10,6 @@ backend for some of the most popular. :glob: backblaze-B2 + cloudflare-r2 digital-ocean-spaces oracle-cloud