A lightweight Azure Blob Storage emulator that stores blobs directly on the file system. Designed as a faster alternative to Azurite for local development and testing.
- ✅ File-based storage - Blobs stored directly as files, not JSON
- ✅ Azure Blob API compatible - Works with Azure SDK
- ✅ SharedKey authentication - Full HMAC-SHA256 signature validation
- ✅ Block blob support - Single-shot and block upload
- ✅ Container operations - Create, delete, list blobs
- ✅ Swagger UI - API documentation in development mode
- .NET 9.0 SDK
- Docker (optional)
| Variable | Description | Required |
|---|---|---|
BLOB_ACCOUNT_NAME |
Storage account name | ✅ Yes |
BLOB_ACCOUNT_KEY |
Base64-encoded account key | ✅ Yes |
BLOB_ROOT |
Root directory for blob storage | No (default: blob-data) |
# Set environment variables
export BLOB_ACCOUNT_NAME=devstoreaccount1
export BLOB_ACCOUNT_KEY=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==
# Run the application
cd src/services/FileBlobEmulator
dotnet runThe server will start at https://localhost:5001 (or http://localhost:5000).
docker run -d \
-p 5000:8080 \
-e BLOB_ACCOUNT_NAME=devstoreaccount1 \
-e BLOB_ACCOUNT_KEY=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw== \
-v $(pwd)/blob-data:/app/blob-data \
tieuanhquoc/fileblobemulator:latest# Clone and build
docker build -t fileblobemulator .
# Or run with .NET directly
cd src/services/FileBlobEmulator
dotnet run| Method | Endpoint | Description |
|---|---|---|
PUT |
/{account}/{container}?restype=container |
Create container |
DELETE |
/{account}/{container}?restype=container |
Delete container |
GET |
/{account}/{container}?restype=container&comp=list |
List blobs |
| Method | Endpoint | Description |
|---|---|---|
PUT |
/{account}/{container}/{blob} |
Upload blob (single-shot) |
PUT |
/{account}/{container}/{blob}?comp=block&blockid=... |
Upload block |
PUT |
/{account}/{container}/{blob}?comp=blocklist |
Commit blocks |
GET |
/{account}/{container}/{blob} |
Download blob |
DELETE |
/{account}/{container}/{blob} |
Delete blob |
using Azure.Storage.Blobs;
var connectionString = "DefaultEndpointsProtocol=http;" +
"AccountName=devstoreaccount1;" +
"AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;" +
"BlobEndpoint=http://localhost:5000/devstoreaccount1";
var client = new BlobServiceClient(connectionString);
var container = client.GetBlobContainerClient("mycontainer");
await container.CreateIfNotExistsAsync();
var blob = container.GetBlobClient("myblob.txt");
await blob.UploadAsync(BinaryData.FromString("Hello, World!"));Access Swagger UI at https://localhost:5001/swagger (development mode only).
Logs are written to:
- Console (all levels)
logs/blobserver-{date}.log(Warning+ as JSON)
Apache License 2.0 - See LICENSE for details.