--- title: Configuring Azure Blob Storage --- For users who want to store their images, files and design assets in Azure Blob Storage container rather than on Amazon S3, we provide a separate storage strategy. ## Setting up Azure Blob Storage In order to integrate Azure Blob with Livingdocs, you need to make sure you have the following things set up properly: - An [Azure Storage Account](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-create?tabs=azure-portal). - At least one [container](https://docs.microsoft.com/en-us/azure/storage/blobs/blob-containers-portal) on your Azure Storage Account. - [SAS Token](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview#sas-token). ### Create Storage Account 1. To create a new Storage Account go to your [Azure Portal](https://portal.azure.com) and search for `Storage Account` service. ![Azure Storage Account in Azure Portal](/customising/server-configuration/storage/azure-blob-storage/0-goto-storageaccount.png) 2. Create a new Storage Account with `+ Create` button. ![Create an Storage Account in Azure Portal](/customising/server-configuration/storage/azure-blob-storage/1-new-storageaccount.png) 3. Fill the configuration according to your needs (i.e. `renduncacy`, `region`) under basics tab. ![Create an Storage Account in Azure Portal](/customising/server-configuration/storage/azure-blob-storage/2-fill-storageaccount-config.png) 4. In Advance tab, choose `enable public access from all networks`, to allow Imgix access to the Storage Account. ![Create an Storage Account in Azure Portal](/customising/server-configuration/storage/azure-blob-storage/3-fill-storageaccount-config.png) 5. In `Review + Create` tab, check the configuration matches your needs, then press `Create`. ### Create Container At least one container is needed to store your media documents. In the Storage Account left sidebar go to `Containers`, then create a new container using `+ Container` button. Define your preferred name, access level and press `Create`. ![Create a container (Blob) in Azure Portal](/customising/server-configuration/storage/azure-blob-storage/4-new-container.png) ### Generate SAS Token - In the Storage Account menu, open `Shared Access Signature` (SAS) from the left sidebar. Then configure the settings as followed: - Allowed services: Blob. - Allowed resource type: Object. - Allowed permission: Read, Write, Delete, Add, Create. - Configure the start and expiry date according to your needs. When the configuration is filled, press `Generate SAS and connection string`. ![Configure SAS Token in Azure Portal](/customising/server-configuration/storage/azure-blob-storage/5-SAS-storage-account.png) - Scroll down in the `Shared Access Signature` menu to find the newly generated SAS token. Use this SAS token in the Livingdocs Server configuration under `sasToken`. ![Copy SAS Token in Azure Portal](/customising/server-configuration/storage/azure-blob-storage/6-copy-SAS-Token.png) ## Configuring the Livingdocs Server to use Azure Blob Storage as storage In your local configuration, set the storage strategy to `azure-blob-storage` and add the container name and the Blob Service SAS URL from the Azure Storage Account settings: ```js { images: { publicUrl: 'https://my-storage-account.blob.core.windows.net/my-container-name/', storage: { strategy: 'azure-blob-storage', config: { storageAccountName: 'my-storage-account' sasToken: '?my-sas-token', // optional, do not define sasToken when using DefaultAzureCredential containerName: 'my-container-name' } } }, files: { publicUrl: 'https://my-storage-account.blob.core.windows.net/my-container-name/', storage: { strategy: 'azure-blob-storage', config: { storageAccountName: 'my-storage-account' sasToken: '?my-sas-token', // optional, do not define sasToken when using DefaultAzureCredential containerName: 'my-container-name' } } }, designs: { assets: { publicUrl: 'https://my-storage-account.blob.core.windows.net/my-container-name/', storage: { strategy: 'azure-blob-storage', config: { storageAccountName: 'my-storage-account' sasToken: '?my-sas-token', // optional, do not define sasToken when using DefaultAzureCredential containerName: 'my-container-name' } } } } } ```