Skip to main content
Set up automatically with the wizard, or configure by hand.

Automatic setup

The setup wizard is the fastest path — it provisions the Bunny resources for you and prints ready-to-paste plugin options plus .env lines, with no manual dashboard steps:
See Setup wizard for what it asks and everything it creates.

Manual setup

1

Install

Requires Payload 4.0.0-beta.4 or later, Next.js >=16.4 <17, React 19 and Node.js 24.22.1 or later. Canary builds of Payload are not supported. v4 is in beta under the beta npm tag, and Payload 4 is published under beta. The command also installs the peer dependencies that a Payload app does not have yet. payload and React 19 are already in your app. Use the same exact version for @payloadcms/plugin-cloud-storage, @payloadcms/translations, @payloadcms/ui and your payload package. For Payload 3, use @seshuk/payload-storage-bunny@3.
2

Configure storage

Add the adapter to the storage array of your Payload config and map an upload collection to Bunny Storage:
payload.config.ts
Files uploaded to the media collection are now stored in Bunny Storage and served from the CDN.The ! tells TypeScript that the variables are set, because the options need strings.The plugin adds components to the admin. In development, Payload adds them to the import map for you. Before a plain next build, run npx payload generate:importmap.
3

Add video streaming (optional)

To route video uploads to Bunny Stream, add a stream block. Non-video files continue to use Bunny Storage.
payload.config.ts
With Payload access control on (the default), Stream needs mp4Fallback: true or signed URLs with redirect — otherwise the plugin throws at startup. See Access control and mp4Fallback.If your Stream library blocks requests without a referrer, also set referer. Otherwise Bunny refuses the MP4 fallback and thumbnail requests that Payload sends.Videos now upload to Bunny Stream and expose an HLS playlist through the bunnyData field.

Next steps

Set serverURL in your Payload config. Payload needs it to crop images, change the focal point and duplicate documents.
  • Configuration — every option, including signed URLs, thumbnails and cache purging
  • Examples — complete examples for common setups
  • Client uploads — browser-direct uploads for serverless hosts and large files
  • Upgrading from v3? — the v4 changes, including the prefix column migration