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. Leave it out to use the default region.S3 mode
Settingstorage.s3 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 config above.
payload.config.ts
s3.region is the region the zone was created in; the endpoint becomes https://{region}-s3.storage.bunnycdn.com. Valid codes are de, jh, la, ny, se, sg, syd, uk, or a custom string.
This list isn’t the same as
storage.region above — the S3 region codes include de and omit br.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. s3.regionis required when S3 mode is enabled.
Collection overrides
A collection’sstorage can be one of three things:
- a partial override (
uploadTimeout,clientUploads) — merged onto the global zone; - a full config (with its 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. A full config inherits 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-config vs partial-override rules and the complete list of options.