Sign in during Public Preview to get the Team plan free, plus an early-adopter discount when we launch. Sign in
Azure IoT Hub is a managed service for connecting IoT devices to the cloud - receiving their telemetry, and managing them using device twins and direct methods.
Locally supports both provisioning IoT Hubs (and the devices within them) and connecting devices which send telemetry, keep a twin and answer direct methods - so you can test your device and backend code together.
When you provision a hub in Locally, it's available at <hub>.iothub.locally - over HTTPS on port 5662, AMQP on 5671 and MQTT on 5883 - which you can connect to using the Azure IoT device and service SDKs.
Once a hub has been created, you can find its HTTPS Endpoint on its resource page within the Locally Dashboard, and open the emulator from the command line using:
$
locally iothub dashboard --hub <hub>
Within the IoT Hub Emulator you can register devices, and open a device to see its keys and connection strings, its twin and the telemetry it's sent recently:
You can also update a twin's desired properties, send telemetry as the device, and Pause a device to see how your backend copes when it goes quiet.
The IoT Hub emulator supports:
Authentication is supported using a device's SAS token (signed with its own keys), the hub's shared access policies or - over HTTPS - a Microsoft Entra token, checked against IoT Hub's data-plane roles.
Devices can send telemetry over AMQP, MQTT or HTTPS - but MQTT is served on port 5883 rather than 8883, so MQTT clients need their port set. The Locally CLI also has its own commands for the hub's data plane, such as locally iothub device create and locally iothub device send, so you don't need the Azure CLI's IoT extension.
IoT Hub also works with Locally's other emulators, as you'd expect - for example:
messages/events works unchanged.DeviceCreated, DeviceDeleted, DeviceConnected, DeviceDisconnected and DeviceTelemetry events are sent to the hub's system topics in the Event Grid Emulator.As of Locally v2026.09.02, the IoT Hub emulator has the following differences from Azure:
SELECT * FROM devices with equality filters only.Should you encounter any issues, please take a look at the troubleshooting section.
Sign in during Public Preview to get the Team plan free, plus an early-adopter discount when we launch. Sign in
Your Azure infrastructure, running on your machine. Deploy in seconds, break things freely, and ship to Azure when you're ready.