Skip to content

Bunny.net

This guide walks you through connecting Sunshine Cloud Storage to Bunny.net. Bunny.net works differently from the other providers — it combines storage and a CDN into one service, so your images are automatically served from edge locations worldwide.

What You Need

  • A Bunny.net account
  • A Storage Zone (where files are stored)
  • A CDN Pull Zone connected to the Storage Zone (for serving files)
  • Token Authentication enabled on the Pull Zone (for protecting full-size images)

Step 1: Create a Storage Zone

In the Bunny.net dashboard, go to Storage and click Add Storage Zone. Choose a name and a primary storage region:

Region Location
DE Germany (Frankfurt)
NY New York
LA Los Angeles
SG Singapore
SYD Sydney
BR Sao Paulo
JH Johannesburg

Pick the region closest to you or your customers for best upload/download speed.

After creating the zone, go to FTP & API Access and copy the Password — this is your Storage Zone Password that Sunshine needs.

For full details, see Bunny.net's documentation on Storage Zones.

Step 2: Create a Pull Zone

Go to CDN > Pull Zones and create a new Pull Zone. Select your Storage Zone as the origin. This gives you a CDN URL like https://your-pullzone.b-cdn.net that serves your files through Bunny's global CDN.

Copy the Pull Zone URL — you'll enter this in Sunshine.

Step 3: Enable Token Authentication

This step is important for protecting full-size gallery images. Go to your Pull Zone > Security > Token Authentication and enable it. Copy the Token Authentication Key.

Without Token Authentication, anyone who guesses the file path could access your full-resolution images directly. With it enabled, Sunshine generates signed URLs with expiring tokens for full-size images.

For full details, see Bunny.net's documentation on Token Authentication.

Step 4: Connect in Sunshine

  1. Go to Sunshine Photo Cart > Settings > Cloud Storage.
  2. Select Bunny.net as the provider.
  3. Choose your connection method:
  4. Database — Enter your credentials directly:
  5. Storage Zone Password — From your Storage Zone's FTP & API Access page.
  6. Storage Zone Name — The exact name of your Storage Zone.
  7. Storage Region — Must match the primary region you selected when creating the zone.
  8. CDN Pull Zone URL — The URL from your Pull Zone (e.g., https://your-pullzone.b-cdn.net).
  9. Token Authentication Key — From your Pull Zone's Security settings.
  10. wp-config.php (recommended) — Add the provided code snippet to your wp-config.php file.
  11. Click Test Connection to verify everything works.

wp-config.php Example

define( 'SUNSHINE_CLOUD_STORAGE_SETTINGS', serialize( array(
    'provider'              => 'bunny',
    'bunny-storage-api-key' => 'your-storage-zone-password',
    'bunny-storage-zone'    => 'your-zone-name',
    'bunny-cdn-url'         => 'https://your-pullzone.b-cdn.net',
    'bunny-token-key'       => 'your-token-authentication-key',
    'bunny-region'          => 'de',
) ) );

Learn how to add this custom code to your WordPress website

How Bunny.net Differs from Other Providers

  • No bucket selector. You enter the Storage Zone name manually instead of selecting from a dropdown.
  • No per-object ACLs. Bunny.net doesn't support making individual files private. Instead, privacy is handled through Token Authentication on the CDN. Full-size gallery images are served through signed URLs with expiring tokens.
  • Built-in CDN. The Pull Zone automatically serves your images from edge locations worldwide. No need to set up a separate CDN like CloudFront.
  • CORS is automatic. Bunny.net Pull Zones handle cross-origin headers automatically, so you don't need to configure CORS separately.
  • You'll see an ACL warning after testing your connection. This is normal and expected for Bunny.net — you can dismiss it. As long as Token Authentication is enabled, your full-size images are protected.

Using a Custom Domain (Optional)

If you've configured a custom domain on your Bunny Pull Zone (e.g., cdn.yourdomain.com), enter it in the Custom Domain field in Sunshine's Cloud Storage settings. Images will be served from your custom domain instead of the default b-cdn.net URL.

Troubleshooting

Test connection fails

  • Verify the Storage Zone Password is from the FTP & API Access page (not your Bunny.net account password).
  • Make sure the Storage Zone Name matches exactly (case-sensitive).
  • Check that the Storage Region matches the primary region of your Storage Zone.

Images not loading publicly

  • Verify you created a Pull Zone connected to your Storage Zone.
  • Check the CDN Pull Zone URL is entered correctly in Sunshine (include https://).

Full-size images accessible without purchase

  • Enable Token Authentication on your Pull Zone under Security settings.
  • Copy the Token Authentication Key into Sunshine's settings.
  • Re-run the Test Connection to confirm.

Signed URLs not working

  • Verify Token Authentication is enabled on the Pull Zone.
  • Make sure the Token Authentication Key in Sunshine matches the one in your Pull Zone settings.
  • Check that the CDN Pull Zone URL is configured (signed URLs require it).

Still need help?

If you have not yet found your answer in the documentation articles, please contact support

Sunshine Photo Cart for WordPress