Skip to main content
formae runs as a client and an agent. The agent lives in your infrastructure, executes changes, and keeps state in sync with your cloud; you use your local CLI to provision it once, then point the CLI at it with a profile and hand off. See Architecture for the client/agent model. The recommended path is the open-source 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 sets insecureSkipVerify so 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 AWS alb mode. Requires a domain you own.
  • Tailscale (tailnet): private, reachable only over your Tailscale tailnet; the agent serves a trusted *.ts.net certificate. 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, so az login is enough (or set AZURE_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 ed25519 if 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.
Clone the installer:

Install

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; --watch streams progress.
To restrict who can reach the agent, add --allowed-cidr <cidr> (open by default). The agent is reachable at <name>.<location>.cloudapp.azure.com:49684.
3

Connect

The self-signed cert needs -k for curl; the profile script sets insecureSkipVerify for the CLI:
That writes a profile carrying the agent’s URL so your CLI can reach it.

Operate the agent

Day-2 procedures for a bootstrapped agent.

Update

Upgrade the agent the same way you created it: re-apply bootstrap.pkl with a newer image. --formae-image is the version knob; find a target tag on GitHub Releases.
Pass the same flags you applied with, and critically the same --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:
To roll back, re-apply with the previous image tag.
Keep the install you bootstrapped from. The local install you ran bootstrap.pkl from holds the agent’s own infrastructure (the resource group, PostgreSQL database, and VM that are the agent) in its state. That state lives only there, so re-applying bootstrap.pkl to upgrade or change the agent depends on keeping that install and its datastore.

Add extra plugins

The bootstrap image ships the standard plugin set (AWS, Azure, GCP, OCI, OVH, and auth-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

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.