Deploy to Locally Button

Preview

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

Deploy to Locally Button

When documenting ARM Templates, it's pretty common to include a Deploy to Azure button in the readme, which allows users to quickly deploy the ARM Template to Azure via the Azure Portal.

Locally supports the Deploy to Locally button (an example of which can be found below), which allows you to specify which ARM Template (and an optional Parameters file) which can be deployed to Locally through the Locally Dashboard.

When someone clicks the button:

  1. The Dashboard shows the template's URI and where it'll be downloaded from, and asks them to confirm. Nothing's downloaded until they choose Download and review.
  2. The template opens in the Deploy ARM template page, where it's validated and they can check the What-If preview, fill in any parameters and choose where to deploy it.
  3. Nothing's deployed until they choose Deploy.

The button only works on a machine where Locally is running - if it isn't, start it with locally build.

The Deploy to Locally button

We currently provide 2 different designs for the Deploy to Locally button, namely a Yellow and a Dark variant:

Deploy to Locally, in yellow Deploy to Locally, in dark

The Deploy to Locally functionality is then available within the Locally Dashboard at this URI:

https://localhost:5678/deploy-to-locally?uri={templateUrl}

Optionally, you can also include a parameters file, too:

https://localhost:5678/deploy-to-locally?uri={templateUrl}&parametersUri={parametersFileUrl}

Note: both the ARM Template and Parameters file arguments need to be URL-encoded, for example:

https://localhost:5678/deploy-to-locally?uri=https%3A%2F%2Fraw.githubusercontent.com%2Flocallybuild%2Fexamples%2Fmain%2Farm-templates%2Fapp-configuration%2Ftemplate.json

Generate a Deploy to Locally button

You can paste the URL to your ARM Template below and we'll write the Markdown and HTML for it, optionally with a Deploy to Azure button alongside it.

Or .


                        
                    

What Can Be Loaded

The template can come from anywhere your machine can reach over HTTPS - GitHub, an Azure or Locally Storage Account, or a server on your company's network:

  • The URI must be https, as must any redirects (up to 5 are followed). A template on the public internet can't redirect to your machine or your network.
  • For a blob in a private container, use a SAS URL with read permission. The SAS is part of the URI, so it's URL-encoded along with the rest.
  • The template must be ARM JSON (comments are fine). Bicep files need building into JSON first, with az bicep build.
  • Templates can be up to 4 MB, and the download has to finish within 30 seconds.

Note

A Locally Storage Account (for example https://{account}.blob.core.storage.locally:5660/...) only exists on the machine running it, so a link to one only works there - for a button in a shared README, host the template somewhere everyone can reach.

Next steps

See ARM Templates for deploying a template from the command line instead, and the Examples for ARM Templates you can try the button with.

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 AI agents.

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