formae-bootstrap
installer. One apply stands up the whole agent (a VPC, a Cloud SQL for PostgreSQL
datastore, and a GCE VM running the agent container), secure by default.
This guide covers the GCP bootstrap path. For other clouds, see
Install on AWS and
Install on Azure.
Choose an access mode
Compute is always a GCE VM on Container-Optimized OS, running the agent container plus a Cloud SQL Auth Proxy sidecar.--access decides how clients reach it. Basic
auth is on in both modes.
- Tailscale (
tailnet, default): private, reachable only over your Tailscale tailnet; the agent serves a trusted*.ts.netcertificate. No public ingress. - Public (
public): a global external HTTPS load balancer fronts the agent. Requires a domain you own.
Prerequisites
- The formae CLI, matching the agent image version. If you have not installed it, see the Quick start.
-
A GCP project, with the required APIs enabled:
-
Local credentials for the formae GCP plugin: either
gcloud auth application-default login(user ADC, simplest) orexport GOOGLE_APPLICATION_CREDENTIALS=/path/to/sa-key.json. Restart the agent after setting them so the plugin picks them up. -
Tailscale (tailnet mode only): a reusable auth key tagged
tag:formae, with HTTPS certificates enabled on your tailnet.
Install
- Tailscale (tailnet)
- Public (HTTPS LB)
You also need a Tailscale tailnet with a
tag:formae tag, HTTPS certificates
enabled, and a reusable auth key carrying that tag:- Sign in at login.tailscale.com/start
with an identity provider (the free Personal plan is enough) and note your
tailnet name (e.g.
tailXXXX.ts.net). - DNS tab: enable MagicDNS and HTTPS Certificates (required for the
*.ts.netcertificate). - Access controls → Tags: create a tag named
formae(notag:prefix), owned by yourself. - Settings → Keys → Generate auth key: Reusable on, Ephemeral off,
Tags →
tag:formae. Copy thetskey-auth-...value.
1
Generate the API credential
Basic auth validates a bcrypt hash, produced locally:Keep the printed password for the connect step; the hash goes to
the apply. Also pick a stable Cloud SQL postgres password.
2
Apply
Cloud SQL spin-up is the long pole; The agent joins your tailnet as
--watch streams progress.<ts-hostname>.<your-tailnet>.ts.net and
serves the API over a trusted certificate on port 49684. Confirm it joined
in the Tailscale admin console under Machines.3
Connect
Your CLI machine must be on the same tailnet (a device can be on only one
at a time; use That writes a profile carrying
the agent’s URL so your CLI can reach it.
tailscale switch / tailscale login to reach it):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.
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), and scope public
ingress to your load balancer with a Google-managed certificate rather than a
self-signed one.
Tear down
Destroy the stack, then deregister the target:You may need to run
destroy twice. The first pass deletes the agent VM, but its
Cloud SQL Auth Proxy connections take a moment to drain, so the formae database
delete can fail with pq: database "formae" is being accessed by other users.
Re-running destroy once the sessions have been reaped completes the teardown.Reference
Bootstrap flags and sizing
Bootstrap flags and sizing
Flags for
formae apply ... gcp/bootstrap.pkl:Passing a flag that belongs to another mode fails fast with a clear message.
--size maps to a GCE machine type. Memory has a ~2 GB floor regardless of
inventory size, because the agent image loads all its bundled resource plugins at
once.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.

