# Connecting Shade to Backblaze

Shade supports Bring-Your-Own-S3 (BYOS3) with multiple providers such as AWS, GCP, MinIO, Wasabi, Backblaze, and more. Here’s how to connect Shade with your existing Backblaze account.

### Provisioning a New Bucket in Backblaze

{% hint style="info" %}
Although provisioning a new bucket is not strictly necessary, we highly recommend provisioning a new bucket for Shade. Shade is unable to use files in existing buckets due to the nature of ShadeFS. Shade will create two new folders `blobs` and `chunks` to any bucket that you connect to it.
{% endhint %}

If you do not have a Backblaze account already, you can create an account [here](https://www.backblaze.com/get-started). To create a new bucket in Backblaze, sign in to your account, head to Buckets, and “Create Bucket”.

<figure><img src="/files/0oK1pSEKX7i16qlTmLWb" alt=""><figcaption></figcaption></figure>

Following the steps and prompts, ensure that you keep track of your **bucket name**, and your **bucket region** (as these are important and will be used in a later step). *In this case, our bucket name is “shade-new-bucket” and the region (not depicted) is us-east-005.*

<figure><img src="/files/38sL274zFCTcGmJtxCRm" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
ShadeFS does not require any other specific properties to be set on the bucket. You may opt to replicate data, log, or set up versioning as you prefer for your business.
{% endhint %}

### Configuring CORS (Easier Option but Does Not Always Work)

Cross-Origin Resource Sharing is an important characteristic that allows buckets to be accessible from other origins (such as <https://app.shade.inc>). This is critical for Shade to access and download original media for you from our app. Backblaze makes it easy to share this origin. We recommend allowing all origins. However, if you prefer a more restricted origin, it is required to whitelist `*.shade.inc` as an allowed-origin.

<figure><img src="/files/XW2wAFvWjJSJsM2ABBs6" alt=""><figcaption></figcaption></figure>

### Surefire Option of Updating CORS

B2 seems to have a few issues sometimes updating CORS directly from the UI. To surefire update your b2 bucket. You can use the [b2 cli](https://www.backblaze.com/docs/cloud-storage-command-line-tools).

#### Create a cors.json

First, create a `cors.json` file with the following content.

```json
[

  {

    "corsRuleName": "web-any-origin",

    "allowedOrigins": ["*"],

    "allowedHeaders": ["*"],

    "allowedOperations": [

      "b2_download_file_by_id",

      "b2_download_file_by_name",

      "b2_upload_file",

      "b2_upload_part",

      "s3_get",

      "s3_put",

      "s3_delete",

      "s3_head"

    ],

    "maxAgeSeconds": 3000

  }

]
```

Then open a terminal on your machine and update:&#x20;

```
b2 bucket update --cors-rules "/path/to/cors.json" your-bucket-name-here allPublic
```

It should respond with a result here:&#x20;

```json
{

    "accountId": "---------",
    "bucketId": "---------",
    "bucketInfo": {},
    "bucketName": "---------",
    "bucketType": "allPublic",
    "corsRules": [
        {
            "allowedHeaders": [
                "*"
            ],
            "allowedOperations": [
                "s3_head",
                "b2_download_file_by_id",
                "b2_upload_part",
                "b2_upload_file",
                "s3_put",
                "b2_download_file_by_name",
                "s3_delete",
                "s3_get"
            ],
            "allowedOrigins": [
                "*"
            ],
            "corsRuleName": "web-any-origin",
            "exposeHeaders": null,
            "maxAgeSeconds": 3000
        }
    ],
    "defaultRetention": {
        "mode": null
    },
    "defaultServerSideEncryption": {
        "mode": "none"
    },
    "isFileLockEnabled": false,
    "lifecycleRules": [],
    "options": [
        "s3"
    ],
    "replication": {
        "asReplicationDestination": null,
        "asReplicationSource": null
    },
    "revision": 5
}
```

### Creating Access Keys

Shade accesses Backblaze buckets via the S3 protocol, this means that Shade requires a bucket name, a bucket region, access key, and secret key in order to access this bucket.

Head to Access Keys > Create Access Key and provision a Master or Application Key. Here, we provision an application key specifically for our bucket.

<figure><img src="/files/G6oU4fMhhRik6ECZfPcB" alt=""><figcaption></figcaption></figure>

**Ensure, you have Read and Write enabled.**

Once you create a new key, copy the created key ID (Access Key for Shade) and applicationKey (Secret key for Shade) to your clipboard and save this for the next few steps.

<figure><img src="/files/u6Cr8FUyhCsi2LyBMBcR" alt=""><figcaption></figcaption></figure>

### Creating a BYOS Drive in Shade

Reaching this point, you should have successfully acquired the following items:

1. Shade Workspace
2. Bucket Name
3. Bucket Region
4. KeyID (Access Key)
5. applicationKey (Secret Key)

If you do not have a workspace already, you can create one [here](https://app.shade.inc).

Within your Shade workspace, you can now create a drive. Selecting the plus button next to “My drives” > BYOS drive.

<figure><img src="/files/X95cXiElBQZZCE7x5rdV" alt=""><figcaption></figcaption></figure>

#### Select a Template

<figure><img src="/files/QN89M1gFyRl43Uevhwg6" alt=""><figcaption></figcaption></figure>

Our templates help you get set up quickly with Shade with additional metadata and views that help you organize your files and assets. For more information about our AI you can check out our [academy](https://academy.shade.inc/ai-tools/custom-and-automated-metadata). In this case, we have selected Video Production.

#### Creating our Backblaze Drive

Next, we decide on our drive name and select our provider Backblaze.

<figure><img src="/files/SLK5X7pHCaIpLDDlltMb" alt=""><figcaption></figcaption></figure>

#### Adding Our Backblaze Credentials

From the previous steps, we add our Backblaze credentials including our bucket name, region, access key and secret key.

{% hint style="info" %}
This has to be the bucket name that you created in Backblaze. This is not the same as the drive name that you created on the previous screen.
{% endhint %}

<figure><img src="/files/woGLJuKEywUjqjvReaCh" alt=""><figcaption></figcaption></figure>

### Uploading your first file

Once you have followed the previous steps, you are now able to upload your first file to your Shade drive. If configured successfully, you should be able to upload your file and mount the Shade drive to your computer from the [Shade Desktop App](https://shade.inc/download)

<figure><img src="/files/Tukp4Kxko0fKbhuRCUpf" alt=""><figcaption></figcaption></figure>

### Troubleshooting Tips

If you have more questions - feel free to contact us at <support@shade.inc> or join our [discord](https://discord.gg/h8wqFMJ4vK).

#### I can’t upload, what’s going on?

If you are unable to upload, please check your CORS settings on your bucket or your secret / access keys and its associated permissions.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://academy.shade.inc/byos/connecting-shade-to-backblaze.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
