Skip to content
Select theme
  • Auto
  • Dark
  • Light

Store files in R2 or S3

The server keeps files on its local disk. Move them to a bucket when the disk is not enough.

Cloudflare R2 charges nothing for downloads.

  1. In Cloudflare, create a bucket.

  2. Create an R2 API token with Object Read & Write on the bucket. Copy its two keys: Cloudflare shows them once.

  3. In the server, open Settings › Storage.

  4. Under Storage type, choose A Cloudflare R2 bucket, or another S3-compatible bucket.

  5. Fill in the bucket:

    • Address: the S3 API address from the bucket’s Settings page, such as https://<account id>.r2.cloudflarestorage.com.
    • Region: empty.
    • Bucket: the bucket’s name.
    • Access key ID and Secret access key: from the token.
  6. Click Test connection.

  7. Click Save, and confirm.

The server copies the files to the bucket in the background. Everything keeps working meanwhile.

The old files stay on the disk. Delete them when the bucket works.

Setup Who checks each download Who sends the bytes
Local disk your server your server
R2 your server R2
R2 and edge delivery a Cloudflare Worker near the build R2, from the nearest bucket

Follow the same steps, with these values:

Setting AWS S3 SeaweedFS
Address empty http://seaweedfs:8333
Region the bucket’s region, such as us-east-1 any name, such as us-east-1
Path-style addresses off on
Test connection fails with R2

Use the S3 API address, with nothing after the host. A custom domain of the bucket does not work here.

Builds cannot download from the bucket

Turn off Download from the bucket, then click Save. Your server then sends the bytes itself.