Why you can't just SSH in
Most home and office networks, and many mobile and fiber ISPs, put your machine behind network address translation. With carrier-grade NAT (CGNAT) you don't even get a public address to forward a port on. Outbound connections work; inbound ones have nowhere to go.
The usual workarounds each add something to run or trust:
- Port forwarding exposes SSH to the internet, and isn't possible at all behind CGNAT.
- A VPN or mesh (WireGuard, Tailscale and similar) works well, but every machine that deploys has to join it, CI runners included.
- A tunnel service like Cloudflare Tunnel exposes a web app, and needs a domain on that provider. It isn't a way to run a deploy.
- An agent that dials out to a coordinator. This is what muster does.
How muster does it
- muster-agent runs on the server and opens an outbound WebSocket to
relay.getmuster.dev. It keeps that connection open; nothing on the server listens for connections. - muster-tunnel, used by the muster CLI on your laptop or CI runner, opens its own outbound connection to the same relay.
- The relay authenticates both ends and forwards frames between them by name. Command, environment, hook scripts and output are sealed end to end, so the relay forwards ciphertext.
- The agent runs only allowlisted commands (by default
muster deploy,status,rollback,logs), without a shell, and rejects shell metacharacters. The hooks it runs must be approved on the server itself.
Set it up
On the server, check out the project and approve its hooks, then pair it. muster cloud connect installs the agent and shows a code and QR you approve from your phone or browser.
curl -fsSL https://getmuster.dev/install.sh | bashgit clone https://github.com/acme/store /opt/acme && cd /opt/acmemuster hooks approve # review and approve the hooks on this machinemuster cloud connect # install muster-agent, pair with a codeFrom your laptop, add the server to the project's fleet and deploy:
muster cloud loginmuster fleet add pi-garage pi@pi-garage --transport cloud --mode muster --path /opt/acmemuster fleet test pi-garagemuster fleet deploy pi-garageTo have the server pull the latest commit before each deploy, set git_pull on the service ( muster setup --git-pull web). From GitHub Actions, the same deploy takes a Fleet Cloud token and no SSH key:
- uses: Muster-dev/muster@v0 with: command: fleet-deploy server: pi-garage cloud-token: ${{ secrets.MUSTER_CLOUD_TOKEN }}The encryption, exactly
Since muster-fleet-cloud 0.5, commands use end-to-end encryption v2. It runs a fresh handshake for every command, inside the messages that already carry it, so it adds no round trips.
- Hybrid key exchange. The CLI brings an ephemeral X25519 key and an ephemeral ML-KEM-768 key; the agent answers with its own ephemeral X25519 key and an ML-KEM encapsulation, and the CLI also encapsulates to the agent's long-lived ML-KEM key. Authentication follows the Noise KK triple-DH pattern between the pinned long-lived keys.
- One combiner. All the classical and post-quantum shared secrets go into one HKDF-SHA256 extraction, salted with a hash of every public key and ciphertext (the X-Wing and TLS 1.3 hybrid approach). The session keys stay secret if either X25519 or ML-KEM-768 holds.
- Records are ChaCha20-Poly1305 with the header (type, flags, request id) as associated data and sequence numbers on replies, so the relay can't alter, reorder, truncate or replay output, or turn a failure into a success.
- Forward secrecy. Ephemeral secrets are erased once used. If a server's or laptop's long-lived keys are stolen later, traffic recorded before that stays sealed. So does traffic recorded today and attacked with a quantum computer later.
- No silent downgrade. Two v2 peers can't be pushed back to the older scheme by the relay, and both sides pin each other's keys after first contact.
The full construction and threat model are in E2E-PROTOCOL.md.
What this does not protect
- Metadata. The relay sees which CLI talks to which server, when, and roughly how much data moves.
- Availability. The relay can drop traffic or end a session. It can make a command fail, not succeed.
- First contact. Keys are trusted on first use. A relay that was already malicious the first time a CLI met an agent could substitute its own keys. Compare the agent's key from
muster-agent statusout of band, or use the strict key policy, if that matters to you. - The endpoints. A compromised laptop or server sees everything it handles.
If you'd rather have no third party in the path at all, muster works over plain SSH too, through your own VPN or mesh.