DNS Server

Preview

Sign in during Public Preview to get the Team plan free, plus an early-adopter discount when we launch. Sign in

DNS Server

Available on Starter Standard Team Compare plans →

Everything within Locally runs on your machine, so Locally has a built-in DNS server to resolve the *.locally domain names it uses. This covers Locally's own services (for example, instances of the Data Plane Emulators), and any Public and Private DNS Zones you create.

The DNS server is configured as part of locally setup, but can also be configured on its own by running:

$ locally configure dns

It listens on port 5673 (UDP and TCP). On Windows it also listens on port 53, since the rule Windows uses to send .locally lookups to Locally can only point at an IP address, not a port. The full list of ports Locally uses is in Networking & Proxies.

Which DNS domains resolve in Locally?

Both Locally's internal components and the Data Plane Emulators you create are provisioned on the *.locally domain. Records in any Public and Private DNS Zones you create resolve too, which is covered below.

This means you can spin up multiple instances of a Data Plane Emulator, each with its own subdomain. For example, two Storage Accounts would be available at account1.blob.core.storage.locally and account2.blob.core.storage.locally, each with its own credentials, permissions and so on.

This table shows all of the domains that Locally resolves under *.locally:

Service Domains
App Configuration<store>.config.locally
Application Insightsingest.appinsights.locally
live.appinsights.locally
api.appinsights.locally
Azure Monitor (Data Collection Endpoints)<label>.ingest.monitor.locally
Bastionbst-<id>.bastion.locally
Container Apps<environment>.furnace.locally
<app>-<environment>.furnace.locally
Container Instances<dns-name-label>.gondola.locally
Container Registry<registry>.dockhand.locally
Cosmos DB<account>.cosmonaut.locally (with -tables and -mongo variants)
Event Grid<namespace>.eventgrid.locally
<topic>-<region>.eventgrid.locally
Event Hubs<namespace>.eventhub.locally
Function Apps<app>.furnace.locally
<app>-scm.furnace.locally
IoT Hub<hub>.iothub.locally
Key Vault<vault>.vault.locally
Locally itselfcontrol-plane.locally
dashboard.locally (and Locally's other built-in services)
Log Analyticsapi.opinsights.locally
<workspace-id>.opinsights.locally
Managed HSM<hsm>.managedhsm.locally
MySQL<server>.mysql.locally
PostgreSQL<server>.postgres.locally
Public IP Addresses<dns-label>-<region>.publicip.locally
Redis Cache<cache>.redis.locally
Service Bus<namespace>.servicebus.locally
SQL Database<server>.database.locally
Storage<account>.blob.core.storage.locally (and file, queue, table, web and dfs)
Web Apps<app>.furnace.locally
<app>-scm.furnace.locally

All of these resolve to your local machine, and only resolve when the resource actually exists. This means that incorrect configuration (like connecting to an account that doesn't exist) is caught in local testing - and accounts that get deleted return NXDOMAIN.

DNS Zones

As well as the *.locally domains, Locally's DNS server also serves the records in any Public and Private DNS Zones that you create - so you can check your DNS configuration resolves as expected before deploying it to Azure.

Public DNS Zones

For example, to create a Public DNS Zone using the Azure CLI:

$ locally run az network dns zone create -g locally-resources -n example.com

And then a record within it:

$ locally run az network dns record-set a add-record -g locally-resources -z example.com -n www -a 127.0.0.1

This can then be resolved via:

$ dig @127.0.0.1 -p 5673 www.example.com

Private DNS Zones

Similarly, to create a Private DNS Zone:

$ locally run az network private-dns zone create -g locally-resources -n internal.example.com

And then a record within it:

$ locally run az network private-dns record-set a add-record -g locally-resources -z internal.example.com -n api -a 127.0.0.1

This can then be resolved via:

$ dig @127.0.0.1 -p 5673 api.internal.example.com

As in Azure, a new Zone comes with an SOA record set at the apex, and Public DNS Zones get NS record sets too.

The supported record types are A, AAAA, CNAME, MX, TXT, NS, SRV, PTR and CAA.

Resolving your DNS Zones

As locally setup only sends .locally lookups to Locally, your machine still looks up domains like example.com using your usual DNS server. To resolve the records in your DNS Zones from your own applications, point them at Locally's DNS server on 127.0.0.1, port 5673 (or port 53 on Windows). For example:

$ dig @127.0.0.1 -p 5673 www.example.com

Should you encounter any issues, please take a look at the troubleshooting section.

Preview

Sign in during Public Preview to get the Team plan free, plus an early-adopter discount when we launch. Sign in

A local cloud for you and your agents.

Your Azure infrastructure, running on your machine. Deploy in seconds, break things freely, and ship to Azure when you're ready.