> For the complete documentation index, see [llms.txt](https://mercure-technologies.gitbook.io/expo-open-ota/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mercure-technologies.gitbook.io/expo-open-ota/storage/azure-blob-storage.md).

# Azure Blob Storage

Use Azure Blob Storage to store and deliver update assets.

### Configure storage

Set these environment variables:

```dotenv
STORAGE_MODE=azure
AZURE_BLOB_CONTAINER_NAME=your-container-name
AZURE_STORAGE_ACCOUNT_NAME=your-account-name
AZURE_STORAGE_ACCOUNT_KEY=<account access key>
```

The server authenticates with the account access key (shared key). It is required in every case: beyond object operations, the key signs the SAS URLs used for uploads and asset delivery.

`AZURE_BLOB_ENDPOINT` optionally overrides the blob service URL, for example to point at an [Azurite](https://learn.microsoft.com/azure/storage/common/storage-use-azurite) emulator during local development. When unset, the server uses the standard `https://{account}.blob.core.windows.net` endpoint.

### Create the storage account and container

{% stepper %}
{% step %}

#### Create a storage account

In the Azure portal, go to **Storage accounts** and create one. A Standard general-purpose v2 account works fine.
{% endstep %}

{% step %}

#### Create a container

In the storage account, open **Containers** and create a private container for your updates.

Set its name as `AZURE_BLOB_CONTAINER_NAME`. Leave public access disabled: clients never talk to the container directly, every access goes through a SAS URL.
{% endstep %}

{% step %}

#### Retrieve the access key

Open **Security + networking**, then **Access keys**. Show `key1` and set it as `AZURE_STORAGE_ACCOUNT_KEY`, together with the account name in `AZURE_STORAGE_ACCOUNT_NAME`.
{% endstep %}
{% endstepper %}

### Publishing updates

Uploads go directly from the CLI to Azure through short-lived SAS URLs. Azure requires the `x-ms-blob-type` header on those uploads, and the server tells the CLI to send it, so publishing to an Azure-backed server requires an up-to-date `eoas`. Older CLI versions fail at upload time with a `MissingRequiredHeader` error.

### Asset delivery

Azure delivers assets through direct SAS URLs. Each URL expires after 15 minutes, and the container stays private.

{% hint style="success" %}
SAS delivery is enabled automatically in azure mode. No CDN configuration is required.
{% endhint %}

{% hint style="info" %}
Azure has no native CDN able to validate per-URL signatures, so there is no CloudFront-style option on this provider. For edge caching, put a CDN (Azure Front Door or any other) in front of a public container and configure the [Generic CDN](/expo-open-ota/cdn/generic-cdn.md); an explicitly configured `CDN_BASE_URL` takes precedence over SAS delivery.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://mercure-technologies.gitbook.io/expo-open-ota/storage/azure-blob-storage.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
