Configuration
miniblue works with zero configuration out of the box. This page covers everything you can customise.
Environment variables
| Variable | Default | Description |
|---|---|---|
PORT |
4566 |
HTTP server port |
TLS_PORT |
4567 |
HTTPS server port (self-signed certificate) |
LOG_LEVEL |
info |
Log verbosity: debug, info, warn, error |
LOCAL_AZURE_ENDPOINT |
http://localhost:4566 |
Endpoint used by the azlocal CLI |
LOCAL_AZURE_CERT_DIR |
~/.miniblue |
Directory for TLS certificate and key |
DATABASE_URL |
(unset) | PostgreSQL connection string for persistent storage |
Example -- run on custom ports:
Ports
| Port | Protocol | Used by |
|---|---|---|
| 4566 | HTTP | curl, SDKs, Terraform endpoint, azlocal, REST calls |
| 4567 | HTTPS | Terraform metadata_host, Azure CLI (MSAL), auth endpoints |
Why two ports?
The HTTP port (4566) handles all resource management APIs. The HTTPS port (4567) is required because Terraform's azurerm provider fetches cloud metadata over HTTPS, and the Azure CLI (MSAL) requires TLS for auth endpoints. If you only use curl or azlocal, you only need port 4566.
TLS certificate
On first start, miniblue generates a self-signed certificate at:
The certificate is valid for 1 year. miniblue reuses an existing certificate if it has more than 24 hours until expiry.
Trusting the certificate
You need to trust the certificate for Terraform, Go SDKs, and other tools that verify TLS.
Custom certificate directory
Persistent storage
By default miniblue stores everything in memory (lost on restart). For persistence, set DATABASE_URL:
Or use the included Postgres docker-compose:
Docker configuration
Pass environment variables with -e:
docker run -p 8080:8080 -p 8443:8443 \
-e PORT=8080 \
-e TLS_PORT=8443 \
-e LOG_LEVEL=debug \
moabukar/miniblue:latest
To access the generated certificate from the host, mount the cert directory:
Health check
{
"services": [
"subscriptions", "tenants", "resourcegroups", "blob", "table",
"queue", "keyvault", "cosmosdb", "servicebus", "functions",
"network", "dns", "acr", "eventgrid", "appconfig", "identity"
],
"status": "running",
"version": "0.2.5"
}
Storage
miniblue uses in-memory storage by default. All data is lost when the process exits. This is intentional -- it keeps tests fast and repeatable.
Persistent storage
File-backed persistent storage is on the roadmap. Contributions welcome.