
Azure Azurite is a local development emulator for Azure Storage, allowing you to test and develop Azure Storage applications on your local machine.
It's a free and open-source tool that provides a local emulation of Azure Blob Storage, File Storage, and Queue Storage.
Azure Azurite is designed to be a drop-in replacement for Azure Storage, making it easy to switch between local development and cloud-based testing.
With Azurite, you can run your Azure Storage applications locally without incurring cloud storage costs or waiting for data to sync with the cloud.
For your interest: Azure Storage
Installation
You can install Azurite in various ways, including using Visual Studio 2022, which has Azurite automatically available. If you're running an earlier version of Visual Studio, you can install Azurite using Node Package Manager (npm), DockerHub, or by cloning the Azurite GitHub repository.
To install Azurite in Visual Studio Code, simply select the Extensions icon and search for Azurite, then click the Install button. You can also navigate to the Visual Studio Code extension market in your browser and install it from there.
Alternatively, you can install Azurite using Docker by pulling the latest image from Docker Hub with the command `docker pull mcr.microsoft.com/azure-storage/azurite`, and then run the Azurite Docker container with the command `docker run -p 10000:10000 mcr.microsoft.com/azure-storage/azurite`.
Related reading: Azure Data Studio vs Azure Data Explorer
Install

Installing Azurite is a straightforward process, and you have several options to choose from.
If you're using Visual Studio 2022, Azurite is automatically available and updated with each new version release.
You can install Azurite using Node Package Manager (npm), DockerHub, or by cloning the Azurite GitHub repository if you're running an earlier version of Visual Studio.
In Visual Studio Code, you can install the Azurite extension by selecting the Extensions icon and searching for Azurite, then clicking the Install button.
Alternatively, you can navigate to the Visual Studio Code extension market in your browser, select the Install button, and it will open Visual Studio Code and take you directly to the Azurite extension page.
To run Azurite using Docker, you can pull the Azurite image from Docker Hub by running the command `docker pull mcr.microsoft.com/azure-storage/azurite` in your terminal or command prompt.
Once the image is pulled, you can run the Azurite Docker container by executing the command `docker run -p 10000:10000 mcr.microsoft.com/azure-storage/azurite`, which maps port 10000 on your host machine to port 10000 in the Docker container.
Here are the steps to install Azurite:
- Pull the Azurite image from Docker Hub: `docker pull mcr.microsoft.com/azure-storage/azurite`
- Run the Azurite Docker container: `docker run -p 10000:10000 mcr.microsoft.com/azure-storage/azurite`
This will allow you to access Azurite's Blob service locally.
Executable File Location

To find the Azurite executable file, you'll need to locate it in the extensions folder of your Visual Studio installation.
The location of the Azurite executable file varies depending on your Visual Studio version. For instance, in Visual Studio Community 2022, it's located at C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\Extensions\Microsoft\Azure Storage Emulator.
Here's a breakdown of the executable file locations for different Visual Studio versions:
So, to summarize, the Azurite executable file can be found in the extensions folder of your Visual Studio installation, and the exact location depends on your Visual Studio version.
Consider reading: Azure Data Studio Connect to Azure Sql
Configuration
To configure Azurite settings, you need to select the Extensions icon in Visual Studio Code, then click the Manage gear button for the Azurite entry, and finally select Extension Settings.
The default setting for the Blob service listening endpoint is 127.0.0.1, and the default port is 10000.
You can configure the Queue service listening endpoint and port by modifying the azurite.queueHost and azurite.queuePort settings, respectively.
You might like: Azure Port
The Table service listening endpoint defaults to 127.0.0.1, and the default port is 10002.
You can enable HTTPS mode by setting the azurite.cert option to the path of a locally trusted PEM or PFX certificate file.
To output the debug log to the Azurite channel, set the azurite.debug option to true.
Here are the supported Azurite settings:
Running and Executing
To run Azurite, you first need to launch the Azurite executable. Once it's running, Azurite listens for connection requests from your application.
You can choose to configure your project to start Azurite automatically during project setup, but this doesn't expose detailed Azurite configuration options. To customize these options, run the Azurite executable before launching Visual Studio.
For Azure Functions projects and ASP.NET projects, you can configure Azurite to start automatically. This can be done by marking the box labeled "Use Azurite for runtime storage account" while setting up the project options.
To launch Azurite from the command line, create a directory called c:\azurite, then use the following command: your command here. This tells Azurite to store all data in the specified directory.
You can also run Azurite from an Azure Functions project by marking the "Use Azurite for runtime storage account" box during project setup. Azurite starts automatically after you create the project.
In an ASP.NET project, you can run Azurite by adding a Storage Azurite emulator service dependency. This starts Azurite automatically after configuration completes.
If you're using Visual Studio Code, you can run Azurite using the command palette. To open the command palette, press F1 in Visual Studio Code. You can then use the following commands to control Azurite:
- Azurite: Clean - Reset all Azurite services persistency data
- Azurite: Clean Blob Service - Clean blob service
- Azurite: Clean Queue Service - Clean queue service
- Azurite: Clean Table Service - Clean table service
- Azurite: Close - Close all Azurite services
- Azurite: Close Blob Service - Close blob service
- Azurite: Close Queue Service - Close queue service
- Azurite: Close Table Service - Close table service
- Azurite: Start - Start all Azurite services
- Azurite: Start Blob Service - Start blob service
- Azurite: Start Queue Service - Start queue service
- Azurite: Start Table Service - Start table service
You can also run Azurite using the Docker image. To do this, use the following command: your command here. This redirects requests from the host machine's port 10000 to the Docker instance.
In the Docker command, you can specify the location of the persisted data by using the -v option. For example: your command here. This specifies c:/azurite as the persisted data location.
Intriguing read: Azure Docker Containers
Frequently Asked Questions
How do I know if Azurite is running?
To verify Azurite is running, navigate to its executable file location and run it. If it launches successfully, Azurite is installed and operational.
How do I know what version of Azurite I have?
To check your Azurite version, simply type "azurite --version" in your terminal. This will display the current version of Azurite installed on your system.
Sources
- https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azurite
- https://weblogs.asp.net/sfeldman/hello-azurite
- https://medium.com/@nischay_sharma/step-by-step-guide-on-how-to-set-up-azurite-locally-102332fc2ec
- https://michaeljohnpena.com/blog/azurite-functions-blob/
- https://www.ottorinobruni.com/save-money-developing-azure-storage-locally-with-azurite-using-vscode-and-csharp/
Featured Images: pexels.com