Connect a Cloudflare R2 bucket to WildKite
Create your own Cloudflare R2 storage, make a key that only works for one bucket, and connect it to WildKite. Your media stays in your bucket the whole time.
Before you start
- A Cloudflare account. R2 is Cloudflare's file storage; you turn it on the first time you use it.
- A name you're happy to keep for your storage long term.
- A WildKite account. If you just want to look around first, the live demo walks through the same screens.
You will finish with
- A private R2 bucket (your own storage folder) that stays in your Cloudflare account.
- A key that only works for that one bucket, instead of one that controls your whole account.
- A WildKite connection you've tested and that's ready for you to add a library and start uploading.
Why R2 is a great first bucket
Cloudflare R2 is cloud storage you rent by the gigabyte. There's no server to set up and no surprise bill for people streaming your media. It's the storage we'd point most people to first.
Here's the part that matters most: your original music and video files stay in your R2 bucket. WildKite only keeps the small details it needs to show and play them — titles, thumbnails, audio waveforms, and a few generated files it tucks into its own folder in your bucket.
- Keep your bucket private. WildKite never needs you to make it public.
- Make a key that only works for this one bucket, not one that can touch your whole Cloudflare account.
- Pick a bucket name you can live with. Renaming storage later usually means moving everything, so it's worth getting right now.
Create your R2 bucket
-
Open R2 in Cloudflare
In the Cloudflare dashboard, go to Storage & databases, then R2. The first time, Cloudflare will walk you through switching R2 on for your account.
-
Create a bucket
A bucket is just your storage folder in the cloud. Give it a name that describes what's inside, like wildkite-media or my-music-archive.
This name can show up in tools and logs later, so don't put anything private in it — no passwords, no phone numbers.
-
Leave it private
Don't turn on public access. WildKite plays your media through short-lived, single-use links it creates on the fly, so the bucket can stay locked down.
Make a key for WildKite
To read and play your files, WildKite needs three things from Cloudflare: an address for your storage (the Endpoint), and a two-part key — an Access Key ID and a Secret Access Key. Think of the key like a username and password that apps use instead of you.
-
Open API token settings
On the R2 Overview page, find API Tokens and choose Manage.
-
Create an R2 API token
An API token is the key WildKite will use to reach your bucket. Create one. If you're setting this up just for yourself, a personal (user) token is the simplest choice.
-
Limit it to this one bucket
Choose Object Read & Write — that lets WildKite read your files and save the small extras it generates — and point it at only the bucket you just made. This way the key can't touch anything else in your account.
-
Copy the key right away
Copy the Access Key ID and Secret Access Key now. Cloudflare shows the Secret only once; if you lose it you'll have to make a new key.
-
Copy your storage address
Copy the Endpoint. It looks like https://<your-account-id>.r2.cloudflarestorage.com — Cloudflare fills in your account ID for you.
Fill in the WildKite form
Back in WildKite, open the new storage connection form and copy these across from Cloudflare.
| WildKite field | Value | Why it matters |
|---|---|---|
| Provider | Cloudflare R2 |
Pick R2 from the list. WildKite then fills in the right defaults for you. |
| Region | auto |
R2 doesn't use regions the way some storage does, so 'auto' is correct. WildKite sets this for you. |
| Endpoint | https://<your-account-id>.r2.cloudflarestorage.com |
Paste the storage address you copied from Cloudflare — not the public web address of a bucket. |
| Bucket | <your-bucket-name> |
Type the bucket name exactly as it appears in Cloudflare, including any dashes. |
| Prefix | media/ (optional) |
A prefix is a folder name. Add one if you only want WildKite to look inside a single folder in your bucket. Leave it blank to use the whole bucket. |
| Access Key ID | <your Access Key ID> |
The first half of the key you copied from Cloudflare. |
| Secret Access Key | <your Secret Access Key> |
The second half. WildKite stores it scrambled so it can't be read back out. |
Test it before you go further
Click Test connection before you create a library. WildKite does a quick check that the address, bucket name, and key all work together, so you catch typos now instead of later.
If your key can open files but isn't allowed to list everything in the bucket, WildKite may still let you save. That's fine if you set up a deliberately locked-down key — just know that WildKite will need a folder (prefix) to know where to look.
CORS only matters if something breaks
CORS is a bucket setting that lets your web browser talk to your storage directly. Normal playback doesn't need you to touch it. Only if uploading from your browser fails should you copy the CORS rule WildKite shows on the connection's edit page into Cloudflare.
If something doesn't work
| What you see | What's usually wrong | How to fix it |
|---|---|---|
| Access denied | The key isn't limited to this bucket, or it can't read and write files. | Make a fresh key with Object Read & Write pointed at your exact bucket. |
| Endpoint error | You pasted a public web address, or the storage address is missing your account ID. | Use the address that looks like https://<your-account-id>.r2.cloudflarestorage.com. |
| Uploads fail from your browser | Your bucket isn't set to accept uploads coming from the WildKite website. | Copy the CORS rule from the WildKite connection page into your bucket's settings. |
| Nothing shows up after a scan | WildKite is looking in a folder (prefix) that's empty. | Double-check the prefix and confirm your files are actually under it. |
Before you rely on it
- If you ever run more than one setup (say, one for everyday use and one for testing), give each its own key instead of sharing.
- Cloudflare lets you set rules that auto-delete old files. Only turn that on if you understand it — it can delete your media and the files WildKite generates.
- If your key ever ends up in a screenshot, chat, or log, replace it. Making a new one takes a minute.
- Check who can get into your Cloudflare account, so no one deletes the bucket by accident.
Questions
Will my files get uploaded to WildKite?
No. Your music and video stay in your own R2 bucket. WildKite only keeps the small details it needs to show and play them — titles, thumbnails, and the like — plus a few generated files it saves back into your bucket.
Does my bucket need to be public?
No, and you shouldn't make it public. Keep it private. WildKite plays your media through short-lived links it creates each time, so nothing is left open to the world.
Should I make a separate bucket just for WildKite?
For most people, yes. A dedicated bucket keeps your permissions, costs, and cleanup rules tidy, and makes it much harder to delete the wrong thing by mistake.
How much does R2 cost?
R2 charges for the storage you use and skips the 'people watched your files' fees some storage charges. The exact prices and any free allowance change over time, so check Cloudflare's R2 pricing page for current numbers (as of June 2026 — check Cloudflare for current limits).