storage block passed to bunnyStorage(...). This page also covers browser-direct client uploads, which are configured under storage.clientUploads.
payload.config.ts
Options
The top-level
storage block is optional. If every collection points at its own storage zone, you can omit the global storage entirely — the plugin only requires that each collection resolves to at least one active service.Getting your credentials
1
apiKey
Bunny Storage dashboard → your Storage Zone → FTP & API Access → copy the Password (use the full password, not the read-only one).
2
zoneName
The Username shown in the same panel.
3
hostname
Your Pull Zone hostname (not the Storage API endpoint). Bunny Storage needs a Pull Zone configured in front of it; files aren’t reachable without one. See Bunny’s guide on accessing storage files.
4
region
Read from your Storage Zone’s endpoint hostname. For example,
ny.storage.bunnycdn.com means region ny, and storage.bunnycdn.com means de. Leave it out for de.Regions
These codes autocomplete. Any other string is passed through, so a new Bunny region works without a plugin update. Codes with only the Edge (SSD) column are replication regions without a storage endpoint, so they cannot be the zoneregion.
S3 mode
Settingstorage.s3: true makes the plugin upload and delete files through Bunny’s S3-compatible endpoint (SigV4-signed requests) instead of the HTTP Storage API. It also switches client uploads to presigned S3, where the browser sends a presigned PUT straight to that endpoint (no Edge Script needed).
No extra secrets are needed: the S3 access key is your zoneName and the secret is your apiKey (the Storage Zone password) from the options above.
payload.config.ts
https://{region}-s3.storage.bunnycdn.com, with the same region as above.
See Client uploads for how S3 mode powers browser-direct uploads.
Requirements
The plugin validates these on startup and throws a clear error if any fails:hostnamemust be your Pull Zone host. The plugin rejects ahostnamecontainingstorage.bunnycdn.com.- If you turn on signed URLs anywhere
storageis active,tokenSecurityKeybecomes required.
serverURL in your Payload config. Cropping, changing the focal point and duplicating a document make Payload download the stored file again. Without serverURL, Payload may call the wrong origin, or call it without the editor’s session, and these operations fail when the collection uses Payload access control.
Collection overrides
A collection’sstorage can be one of three things:
- a partial override (
uploadTimeout,clientUploads) — merged onto the global zone; - full options (with their own
apiKey/hostname/zoneName) — this collection uses its OWN storage zone, ignoring the global zone entirely; false— disable Bunny Storage for this collection.
payload.config.ts
apiKey. Full options inherit nothing from the global zone: omitted optional keys (region, s3, tokenSecurityKey, clientUploads, uploadTimeout) fall back to plugin defaults, never to the global zone’s values. Provide that zone’s own tokenSecurityKey if you enable signed URLs for it.
See Collection overrides for the full-options vs partial-override rules and the complete list of options.