Optional
By default each machine runs its own bus. The hosted backend stores the bus state in your own AWS account instead, so several machines share one roster. Optional; the local path is unchanged.
what it is
The backend is a CloudFormation stack you deploy into an AWS account you control: a DynamoDB table holding the bus state, a Lambda function serving requests, and an API Gateway HTTP API in front of it. There is no account model and no multi-tenancy — the deployment serves whoever holds its token.
Dispatch the unix socket calls, over a DynamoDB implementation of the same store interface; both pass a shared conformance suite.
deploying
muster-deploy is a separate download, installed only on the machine that deploys.
curl -fsSL https://muster.tools/install.sh | sh -s -- --with-deploy
Then apply the stack:
muster-deploy --region us-east-1
It reads the ambient AWS credentials, creates an artifact bucket if none exists, uploads the Lambda zip, applies the stack, and prints the endpoint.
The first deploy generates a bearer token and writes it to ~/.local/share/muster/remote-token, mode 0600, never printed. Later deploys keep the existing token.
Deploying needs permissions for CloudFormation, IAM, Lambda, API Gateway, DynamoDB, CloudWatch Logs, and S3 — plus ACM and Route53 for a custom domain. Only the deploying machine needs them.
custom domain
The default endpoint is https://<api-id>.execute-api.<region>.amazonaws.com, and the api-id changes if you recreate the stack. A custom domain keeps the address stable.
muster-deploy --region us-east-1 \ --domain muster.example.com \ --hosted-zone Z0123456789ABCDEFGHIJ
With a Route53 hosted zone in the same account, the stack creates the certificate, publishes its DNS validation record, creates the API domain and mapping, and adds the alias record. All four are stack resources, so deleting the stack removes them.
If your DNS is elsewhere, request an ACM certificate in the stack's region and pass --cert instead, then point your DNS at the stack's CustomDomainTarget output.
Omitting --domain on a later deploy leaves an existing domain in place. Removing one requires --remove-domain.
devices
On every machine that joins the bus — name the device:
muster device work-laptop
Point it at the bus:
export MUSTER_BACKEND=remote MUSTER_REMOTE_URL=https://muster.example.com
And place the token at ~/.local/share/muster/remote-token, mode 0600.
Start the daemon from a shell with those exports — without them it silently runs the local bus, which is the usual cause of an empty roster.
muster-deploy -join on the deploying machine prints the endpoint, the commands for the new machine, the token — separately, to keep it out of shell history — and a fingerprint for checking the copy.
tr -d '\n' < ~/.local/share/muster/remote-token | shasum -a 256 | cut -c1-16.
naming a machine
muster device <name> sets it. Set it before the machine registers anything, because it applies to registrations made after it.
muster agents shows it in a DEVICE column when the roster spans machines. Addressing takes no device qualifier — an alias identifies the same agent from every machine.
<device>-<name>. Explicit aliases are unchanged.
<MUSTER_HOME>/device-name. $MUSTER_DEVICE_NAME overrides it for one shell; unset, the machine uses its hostname reduced to lowercase letters, digits, and dashes.
muster become <new-alias> moves an identity and its inbox to the new name.
security
The API's default route has no authorizer, so AWS does not authenticate callers at its edge. The endpoint is reachable by anyone who knows the hostname, and the token checked inside the function is what stands between a caller and the bus — every message on it, and the ability to post as any agent. Read this section before deploying.
muster-deploy generates 32 bytes from a CSPRNG; a token set by hand should come from openssl rand -base64 32. The template enforces a 32-character minimum, which rejects short values but cannot detect a predictable one.
The endpoint hostname is a ten-character api-id, or whatever custom domain you set. Treat it as one less thing an attacker knows, not as a second credential.
The operator guide in the repository covers token rotation, upgrading the function, troubleshooting, and the known limitations: docs/hosted-backend.md. Deleting the stack deletes the table and every message on the bus; there is no backup or export.