Back to docs

Archive to Cloudflare R2

Set up a Cloudflare R2 bucket as your mnueron cold-storage tier. R2 speaks the S3 protocol, so it uses the same adapter as AWS S3 — just with a different endpoint and zero egress fees.

1Create the bucket

In the R2 dashboard, click Create bucket. Bucket names are account-scoped (no global uniqueness needed). Default location is fine for most cases; you can pin to a region later.

Note your account IDfrom the right rail — you'll need it for the endpoint URL.

2Create an API token scoped to this bucket

R2 → Manage R2 API TokensCreate API token.

  1. Token name: mnueron-archive.
  2. Permissions: Object Read & Write.
  3. Specify bucket: pick the bucket from step 1 (do NOT leave as "Apply to all buckets").
  4. TTL: forever (or rotate it on a schedule if your security policy requires it).

On success Cloudflare shows you an Access Key ID and a Secret Access Key. Copy both before closing the modal — the secret is shown only once.

3Paste credentials into mnueron and test

Open /account-settings/storage, pick Cloud + Archive, then the Cloudflare R2 backend. Fields:

  • Bucket — exactly as you named it.
  • Regionauto.
  • Endpointhttps://<account-id>.r2.cloudflarestorage.com. Substitute your account ID.
  • Access key ID + Secret — from step 2.

Click Test connection. On success you'll see "Connected. PUT, HEAD, and DELETE all succeeded." Click Save, then optionally Run archive now to verify with real data.

Secrets are encrypted with pgp_sym_encrypt before they touch the database. We never log them and never return them through any API.

Troubleshooting

Test fails with 401 or 403

R2 API tokens are scoped per-bucket. Make sure your token has Object Read & Write permission for this specific bucket, and that you used the token's access key ID and secret (not your Cloudflare account email and password).

What region should I use?

R2 doesn't have regions in the AWS sense — use 'auto' and it works. The data still lives in the location set on the bucket itself.

Where do I get the endpoint?

Cloudflare Dashboard → R2 → click your bucket → Settings. The endpoint looks like https://<account-id>.r2.cloudflarestorage.com. Your account ID is on the right side of the R2 overview page.

Can I use a custom domain?

Yes — R2 supports public access via a custom subdomain, but mnueron writes to the S3-API endpoint. Configure your custom domain only if you want users to download archive files directly from a branded URL.