Setting up R2
Before filling in the settings, you need a bucket and API credentials in Cloudflare:1
Create a bucket
In the Cloudflare dashboard, go to R2 → Create bucket. Give it a name (e.g.
my-domainer-media). Note the bucket name — you’ll enter it below.2
Enable public access
Open the bucket → Settings → Public access. Either enable the
r2.dev subdomain or connect your own custom domain (e.g. media.example.com). This gives you the Public URL needed below.3
Create an API token
Go to R2 → Manage API Tokens → Create API Token. Set permissions to Object Read & Write and scope it to the bucket you created. Copy both the Access Key ID and Secret Access Key — the secret is shown only once.
4
Fill in Storage Settings
Enter the values in Settings → Storage and save.
Fields
The settings form has two groups. Fields in the first group require a server restart to take effect. Fields in the second group apply immediately after saving. Requires server restart after saving:
Applies immediately:
On Vercel, the server restarts automatically on redeploy. After changing the Bucket Name or Account ID, trigger a redeploy from the Vercel dashboard for the new values to take effect.On Docker, restart the container after changing these fields:
docker compose -f docker-compose.hub.yml up -d.