|
| 1 | +--- |
| 2 | +title: Azure Portal (emulated) |
| 3 | +description: A local Azure Portal served by the emulator itself — browse, create, and manage your emulated Azure resources visually, with no extra installation. |
| 4 | +template: doc |
| 5 | +--- |
| 6 | + |
| 7 | +## Introduction |
| 8 | + |
| 9 | +The LocalStack Azure emulator can serve an emulated version of the Azure Portal directly from its own edge port. |
| 10 | +It gives you a visual way to work with your emulated resources — browse and filter everything in your local subscription, create resources through guided wizards, inspect blobs and Key Vault secrets, and invoke any ARM operation the emulator implements — without installing anything beyond the emulator you already run. |
| 11 | + |
| 12 | +:::caution |
| 13 | +The emulated portal is a **preview feature** and is disabled by default. |
| 14 | +It is not affiliated with or connected to the real Azure Portal — everything it shows and everything it does stays inside your local emulator. |
| 15 | +::: |
| 16 | + |
| 17 | +## Enabling the portal |
| 18 | + |
| 19 | +Set `LS_AZURE_PORTAL=1` on the emulator container and open: |
| 20 | + |
| 21 | +``` |
| 22 | +http://localhost:4566/_localstack/portal/ |
| 23 | +``` |
| 24 | + |
| 25 | +With `lstk`, add the flag to an environment profile in your config: |
| 26 | + |
| 27 | +```toml |
| 28 | +[[containers]] |
| 29 | +type = "azure" |
| 30 | +tag = "latest" |
| 31 | +port = "4566" |
| 32 | +env = ["portal"] |
| 33 | + |
| 34 | +[env.portal] |
| 35 | +LS_AZURE_PORTAL = "1" |
| 36 | +``` |
| 37 | + |
| 38 | +Or with plain Docker: |
| 39 | + |
| 40 | +```bash |
| 41 | +docker run -d -p 4566:4566 \ |
| 42 | + -e LOCALSTACK_AUTH_TOKEN=$LOCALSTACK_AUTH_TOKEN \ |
| 43 | + -e LS_AZURE_PORTAL=1 \ |
| 44 | + -v /var/run/docker.sock:/var/run/docker.sock \ |
| 45 | + localstack/localstack-azure |
| 46 | +``` |
| 47 | + |
| 48 | +When the flag is not set, the portal is fully inactive: the URL returns 404 and no portal code is loaded. |
| 49 | + |
| 50 | +There is no separate port, container, or install step — the portal is served on the same edge port as the emulator's API, so it works wherever the emulator works. |
| 51 | + |
| 52 | +## What you can do |
| 53 | + |
| 54 | +- **Browse resources** — all resource groups and resources in your emulated subscription, with filtering, sorting, and configurable columns. |
| 55 | +- **Create resources** — guided create wizards for supported resource types. |
| 56 | +- **Work with data** — a storage browser for blob containers (create, upload, download, delete), and Key Vault secrets and certificates. |
| 57 | +- **Invoke any implemented operation** — the API operations drawer lists every ARM operation your emulator implements and lets you run it with your own parameters and request body. |
| 58 | +- **See real coverage** — actions the emulator does not implement are greyed out with a reason, rather than failing unexpectedly. |
| 59 | + |
| 60 | +## Always in sync with your emulator |
| 61 | + |
| 62 | +The portal computes its capability catalog at runtime from the emulator it is running inside. |
| 63 | +It never claims an operation your emulator version does not support, and it picks up newly implemented operations automatically — there is no separate portal version to keep in step with the emulator. |
| 64 | + |
| 65 | +## Identity and sign-in |
| 66 | + |
| 67 | +The portal's sign-in screen is a **mock**: one click signs you in, and no credentials are collected. |
| 68 | +Inside the emulator, the portal acts as the default operator principal — the same identity used by the `az` CLI integration, SDKs, and Terraform. |
| 69 | +If you enable RBAC enforcement (`LS_AZURE_ENFORCE_RBAC=1`), portal requests are evaluated like any other operator traffic. |
| 70 | + |
| 71 | +## Things to know |
| 72 | + |
| 73 | +:::note |
| 74 | +- **Local only.** The portal manages emulated resources in your local emulator. Nothing it does touches a real Azure subscription, and no data leaves your machine. |
| 75 | +- **Same trust model as the emulator API.** Anyone who can reach port 4566 can use the portal, just as they can use the emulator's REST API. Do not expose the edge port to untrusted networks. |
| 76 | +- **State follows the emulator.** Resources created in the portal live in the emulator's state — without persistence configured, they are gone after a restart. |
| 77 | +- **A subset of the real portal.** The emulated portal covers the resource types and operations the emulator implements; it is not a re-implementation of every Azure Portal blade. |
| 78 | +- **Telemetry.** Portal-originated requests are not counted in the emulator's usage analytics. |
| 79 | +::: |
| 80 | + |
| 81 | +## Troubleshooting |
| 82 | + |
| 83 | +- **404 at `/_localstack/portal/`** — the `LS_AZURE_PORTAL` flag is not set on the container. |
| 84 | +- **Page loads but shows errors** — check `http://localhost:4566/_localstack/portal/api/meta/health`; it reports the emulator edition and the identity the portal is acting as. |
| 85 | +- **A resource action is greyed out** — the emulator does not implement that operation yet; the tooltip names the gap. |
0 commit comments