formae-bootstrap
installer. One apply stands up the whole agent (a resource group, a VNet, a private
Azure Database for PostgreSQL Flexible Server, and a VM running the agent
container), secure by default.
This guide covers the Azure bootstrap path. For other clouds, see
Install on AWS and
Install on GCP.
Choose an access mode
Compute is always a VM;--access decides how clients reach it. Basic auth is on
in every mode.
- Public (
public, default): the agent’s own public IP, with the API port opened to--allowed-cidr. The agent terminates HTTPS itself with a self-signed certificate; the connect profile setsinsecureSkipVerifyso the CLI accepts it. - App Gateway (
appgw): an Application Gateway v2 fronts the VM on:443, terminating TLS with a Key Vault certificate (self-signed by default, or your own PFX for a browser-trusted cert). The Azure analog of the AWSalbmode. Requires a domain you own. - Tailscale (
tailnet): private, reachable only over your Tailscale tailnet; the agent serves a trusted*.ts.netcertificate. No public ingress.
Prerequisites
- The formae CLI, matching the agent image version. If you have not installed it, see the Quick start.
-
Local Azure credentials for the formae agent you run locally to perform the apply.
The Azure plugin uses
DefaultAzureCredential, soaz loginis enough (or setAZURE_TENANT_ID/AZURE_CLIENT_ID/AZURE_CLIENT_SECRET). Restart the local agent after setting them. -
A service principal the remote agent operates Azure with:
-
An SSH public key (Azure requires one on the VM even though no inbound SSH is
opened):
ssh-keygen -t ed25519if you don’t have one. -
App Gateway mode: a domain you control, a globally-unique Key Vault name (3 to 24
chars), and the applying principal’s objectId
(
az ad sp show --id <client-id> --query id -o tsv). -
Tailscale (tailnet mode only): a reusable auth key tagged
tag:formae, with HTTPS certificates enabled on your tailnet.
Install
- Public (self-signed)
- App Gateway
- Tailscale (tailnet)
1
Generate the API credential
Basic auth validates a bcrypt hash, produced locally; the script also prints
a stable Postgres password:Keep the printed password for the connect step; the hash and
db-password go to the apply. Reuse the same db-password on every
re-apply.
2
Apply
PostgreSQL spin-up is the long pole; To restrict who can reach the agent, add
--watch streams progress.--allowed-cidr <cidr> (open by
default). The agent is reachable at
<name>.<location>.cloudapp.azure.com:49684.3
Connect
The self-signed cert needs That writes a profile carrying
the agent’s URL so your CLI can reach it.
-k for curl; the profile script sets
insecureSkipVerify for the CLI:Operate the agent
Day-2 procedures for a bootstrapped agent.Update
Upgrade the agent the same way you created it: re-applybootstrap.pkl with a
newer image. --formae-image is the version knob; find a target tag on
GitHub Releases.
--db-password
(it is set once at DB creation and carried in the agent config), so the reconcile
changes only the image. Then match your local CLI to the new version:
Add extra plugins
The bootstrap image ships the standard plugin set (AWS, Azure, GCP, OCI, OVH, andauth-basic). To manage anything else, build a derived image and pass it as
--formae-image. See
Extend the agent image.
Tune for production
The bootstrap installer favors a lean default. For production, choose a larger--size as your inventory grows (see the sizing table below), scope public mode
ingress with --allowed-cidr, and prefer appgw with your own PFX (or tailnet)
for a trusted certificate.
Tear down
Destroy the stack, then deregister the target:In
tailnet mode, the agent’s Tailscale node identity lives on the VM’s OS disk and
does not survive teardown. After destroying, delete the stale node manually in the
Tailscale admin console.Reference
Bootstrap flags and sizing
Bootstrap flags and sizing
Flags for
formae apply ... azure/bootstrap.pkl:Passing a flag that belongs to another mode is ignored or fails fast with a clear
message.
--size maps to an Azure VM size. Memory has a ~2 GB floor regardless of inventory
size, because the agent image loads all its bundled resource plugins at once. Sizes
use the Dsv6 family, which has default vCPU quota on fresh subscriptions.See also
- Manage profiles: connect the CLI to the agent you just started, and switch between environments.
- Configuration: agent and CLI settings, including authentication.
- Architecture: how the client, agent, and plugins fit together.

