locally build

Preview

During Public Preview you can use the Team plan for free, and get an early-adopter discount at GA. Sign in

locally build

This page is part of the CLI Reference and is generated from the CLI's own help output, so it matches what locally build --help prints.

For more information see Persistence.

locally build

Launch the Locally environment on this machine.

Launches the Locally environment on this machine, which includes:

* The Dashboard
* The Control Plane API
* The Authorization API
* The Directory API

The Dashboard opens in your browser. Use 'locally run' to point az, Terraform, Pulumi and the
Azure SDKs at it. In CI, use 'locally ci' instead.

Before launching, this checks that *.locally resolves and that any installed container runtime can
reach Locally, and refuses to start if not. Skip a check with its --skip-*-check flag or the
matching LOCALLY_SKIP_*_CHECK=1 environment variable.

Locally listens on 127.0.0.1, except for two listeners that containers need to reach, which listen
on every interface: the *.locally DNS server (port 5673), and the identity endpoint that containers
fetch managed-identity tokens from. If you run a host firewall, expect these ports to be open.

On Docker Desktop, Locally also starts a DNS forwarder container so the containers it launches can
resolve *.locally. See 'locally configure docker', or set LOCALLY_CONTAINER_DNS=none to opt out.

With --persist, Locally keeps all of your resources and data across restarts in the snapshot
"default": it loads what it saved last time, autosaves every 15 minutes when something has changed,
and saves again when it stops (press Ctrl-C a second time to quit without saving). --persist=<name>
keeps them in the snapshot <name> instead; two running instances cannot use the same one.
--clear-state starts empty and discards the saved state. Persistent mode needs the Standard plan or above.

Usage

locally build [flags]

Flags

--clear-state[=true|false]              With --persist, discard the saved state and start empty
  -h, --help[=true|false]                     help for build
      --persist name[="default"]              Keep all of your resources and data in Locally across restarts, in the snapshot name: load what was saved last time, autosave every 15 minutes, and save on shutdown
      --skip-browser[=true|false]             Skip opening the dashboard in a browser on launch
      --skip-certificate-check[=true|false]   Start even if the TLS certificate does not cover every name Locally serves. Also LOCALLY_SKIP_CERTIFICATE_CHECK=1.
      --skip-dns-check[=true|false]           Start even if *.locally does not resolve. Also LOCALLY_SKIP_DNS_CHECK=1.
      --skip-docker-check[=true|false]        Start even if Docker cannot reach Locally. Also LOCALLY_SKIP_DOCKER_CHECK=1.
      --skip-podman-check[=true|false]        Start even if Podman cannot reach Locally. Also LOCALLY_SKIP_PODMAN_CHECK=1.
Preview

During Public Preview you can use the Team plan for free, and get an early-adopter discount at GA. Sign in

A local cloud for you and your AI agents.

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