> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bunny.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Backblaze

> Speed up Backblaze B2 file delivery with bunny.net CDN for global caching and reduced bandwidth costs.

Bunny CDN caches files from your Backblaze B2 bucket and delivers them from a global edge network, speeding up delivery and saving on bandwidth costs. This guide uses S3-compatible authentication to securely connect a private B2 bucket. If you don't have a Backblaze B2 account yet, you can [create one for free](https://www.backblaze.com/b2/sign-up.html).

<Tip>
  Prefer to keep your files on bunny.net? [Bunny Storage](/storage) is globally replicated object storage with tight CDN integration, and it offers an [S3-compatible API](/storage/s3) (currently in beta).
</Tip>

<Steps>
  <Step title="Create a private B2 bucket">
    Log in to Backblaze and click **Create a Bucket**. Set the bucket to **Private** mode to keep your content secure while it's served to users. Encryption and Object Lock can be left at their defaults.

    <Frame>
      <img src="https://mintcdn.com/bunnynet-cb9733c2/RilmGx6yE6wbeAYi/images/cdn/integrations/storage/backblaze-create-bucket.png?fit=max&auto=format&n=RilmGx6yE6wbeAYi&q=85&s=76b09988337dcc95c140f95b1d50b5b7" alt="Creating a Backblaze B2 bucket" width="1195" height="624" data-path="images/cdn/integrations/storage/backblaze-create-bucket.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/bunnynet-cb9733c2/RilmGx6yE6wbeAYi/images/cdn/integrations/storage/backblaze-bucket-private.png?fit=max&auto=format&n=RilmGx6yE6wbeAYi&q=85&s=3472a73ade16a2afb4d1140576456bf2" alt="Setting the bucket to Private mode" width="927" height="1052" data-path="images/cdn/integrations/storage/backblaze-bucket-private.png" />
    </Frame>
  </Step>

  <Step title="Create an S3 application key">
    To authenticate securely, Bunny CDN connects to your bucket using S3 authentication. Select **App Keys** in the Backblaze dashboard.

    <Frame>
      <img src="https://mintcdn.com/bunnynet-cb9733c2/RilmGx6yE6wbeAYi/images/cdn/integrations/storage/backblaze-app-keys.png?fit=max&auto=format&n=RilmGx6yE6wbeAYi&q=85&s=1d4676d9c193ef1e9f2e1ca16db3645e" alt="The App Keys page" width="1199" height="870" data-path="images/cdn/integrations/storage/backblaze-app-keys.png" />
    </Frame>

    Click **Add a New Application Key**.

    <Frame>
      <img src="https://mintcdn.com/bunnynet-cb9733c2/RilmGx6yE6wbeAYi/images/cdn/integrations/storage/backblaze-add-app-key.png?fit=max&auto=format&n=RilmGx6yE6wbeAYi&q=85&s=d5c7ac73e762b9a6f576c9178aa4644f" alt="Adding a new application key" width="1191" height="1184" data-path="images/cdn/integrations/storage/backblaze-add-app-key.png" />
    </Frame>

    Select the private bucket you created and ensure **Allow List All Bucket Names** is checked, then click **Create New Key**.

    <Frame>
      <img src="https://mintcdn.com/bunnynet-cb9733c2/RilmGx6yE6wbeAYi/images/cdn/integrations/storage/backblaze-app-key-config.png?fit=max&auto=format&n=RilmGx6yE6wbeAYi&q=85&s=00578a1d0997512f78903b88930564d7" alt="Configuring the application key" width="739" height="831" data-path="images/cdn/integrations/storage/backblaze-app-key-config.png" />
    </Frame>

    On the confirmation page, save the **keyID** and **applicationKey** somewhere safe. You'll need them in a later step.

    <Frame>
      <img src="https://mintcdn.com/bunnynet-cb9733c2/RilmGx6yE6wbeAYi/images/cdn/integrations/storage/backblaze-app-key-created.png?fit=max&auto=format&n=RilmGx6yE6wbeAYi&q=85&s=3cddff17232842a3aacaef8db0caf8be" alt="The created application key details" width="1198" height="700" data-path="images/cdn/integrations/storage/backblaze-app-key-created.png" />
    </Frame>
  </Step>

  <Step title="Find your S3 bucket URL">
    Click **Browse Files** and upload a test file if you don't have one. Click the **(i)** info tooltip next to the file.

    <Frame>
      <img src="https://mintcdn.com/bunnynet-cb9733c2/RilmGx6yE6wbeAYi/images/cdn/integrations/storage/backblaze-browse-files.png?fit=max&auto=format&n=RilmGx6yE6wbeAYi&q=85&s=b064cd6ae3a82a1201cc8c4a974ac83a" alt="Browsing files and opening the info tooltip" width="1191" height="500" data-path="images/cdn/integrations/storage/backblaze-browse-files.png" />
    </Frame>

    Find the **S3 URL** and save it, excluding the file name. For example, for a bucket named `bunnytestbucket`:

    ```
    https://bunnytestbucket.s3.eu-central-003.backblazeb2.com
    ```

    <Frame>
      <img src="https://mintcdn.com/bunnynet-cb9733c2/RilmGx6yE6wbeAYi/images/cdn/integrations/storage/backblaze-s3-url.png?fit=max&auto=format&n=RilmGx6yE6wbeAYi&q=85&s=03971f1565195ff719a225105e0816a3" alt="The S3 URL in the file details" width="1100" height="910" data-path="images/cdn/integrations/storage/backblaze-s3-url.png" />
    </Frame>
  </Step>

  <Step title="Create a Pull Zone">
    Log in to your [bunny.net dashboard](https://dash.bunny.net) and open **Add Pull Zone**. Give it a name (this becomes your CDN hostname) and paste the S3 URL from the previous step into the **Origin URL** field. The Host Header is generated automatically and doesn't need changing. For details, see [How to create your first Pull Zone](/cdn/quickstart).

    <Frame>
      <img src="https://mintcdn.com/bunnynet-cb9733c2/RilmGx6yE6wbeAYi/images/cdn/integrations/storage/backblaze-add-pull-zone.png?fit=max&auto=format&n=RilmGx6yE6wbeAYi&q=85&s=44fb29276afdc84d75bbae29969d6014" alt="Adding a Pull Zone with the B2 S3 URL as origin" width="1975" height="1119" data-path="images/cdn/integrations/storage/backblaze-add-pull-zone.png" />
    </Frame>

    To use an existing Pull Zone instead, set the same Origin URL in its settings.

    <Frame>
      <img src="https://mintcdn.com/bunnynet-cb9733c2/RilmGx6yE6wbeAYi/images/cdn/integrations/storage/backblaze-reconfigure-pull-zone.png?fit=max&auto=format&n=RilmGx6yE6wbeAYi&q=85&s=0fc6cfd9c593b3ac4e4728a21f43de90" alt="Reconfiguring an existing Pull Zone" width="1719" height="878" data-path="images/cdn/integrations/storage/backblaze-reconfigure-pull-zone.png" />
    </Frame>
  </Step>

  <Step title="Secure the connection with S3 authentication">
    Open the **S3 Authentication** section of your Pull Zone's **Security** settings and click **Enable AWS S3 Authentication**. Fill in the details using the keys from step 2:

    * **AWS Key**: your B2 `keyID`
    * **AWS Secret**: your B2 `applicationKey`
    * **AWS Region Name**: the region from your origin URL (for example, `eu-central`)

    <Frame>
      <img src="https://mintcdn.com/bunnynet-cb9733c2/RilmGx6yE6wbeAYi/images/cdn/integrations/storage/backblaze-s3-authentication.png?fit=max&auto=format&n=RilmGx6yE6wbeAYi&q=85&s=06eddb8434953547c87c537c64340cb4" alt="Configuring AWS S3 authentication on the Pull Zone" width="1373" height="442" data-path="images/cdn/integrations/storage/backblaze-s3-authentication.png" />
    </Frame>

    Click **Save Configuration**.
  </Step>

  <Step title="Test your Pull Zone">
    With everything configured, request a file through your Pull Zone hostname, for example:

    ```
    https://bunnytestwordpress.b-cdn.net/code-to-share.js
    ```

    If the file is served, your private B2 bucket is protected by S3 authentication and accelerated by Bunny CDN. Replace your existing URLs with the Bunny CDN URLs in your application to start serving cached content.
  </Step>
</Steps>
