Cloudflare R2

You can keep your media in Cloudflare R2 by pointing Litestore's S3 client at your R2 endpoint.

Cloudflare R2

Endpoint<account>.r2.cloudflarestorage.com
shirt-front.jpg
shirt-back.jpg
lookbook.webp
  • lookbook.webpUploaded in 5 MB partshttps://media.your-store.com/media/cm9x2k4.webp
  • logo.svgRejected
  • Litestore uploads to R2 with the same code it uses for AWS.
  • You point the client at R2 by setting S3_ENDPOINT.
  • You should set S3_PUBLIC_URL as well, because Litestore otherwise builds an AWS address for each file.
  • Litestore checks the real type of every upload before it writes the file.

Related integrations

Connect Cloudflare R2 to your store

The guide explains every value you set and what Litestore does with it.