Pairing
Move a service to another device with a QR code — meshly pair show and meshly pair decode, no accounts and no network round-trip.
meshly pair turns a published service into a scannable credential. It reads
and writes pairing payloads without opening a single socket, which makes it
the one part of the client a GUI can drive synchronously.
Show a pairing QR
meshly pair show --service webOptions:
| Flag | Default | Meaning |
|---|---|---|
-c, --config | client.toml | Config holding the service |
-s, --service | the only one | Service name to pair (errors if the config publishes none) |
--bind | — | Suggested local_bind for the consumer; must be loopback |
--label | — | Human-readable label embedded in the payload |
--format | svg | svg, ansi (terminal half-blocks), png, or payload |
The payload carries the server NodeID, the group token and the per-service shared secret, plus the service name and optional bind/label hints.
A pairing payload is a bearer credential. Anyone who photographs the QR
owns the service until the secret is rotated. Treat --format payload output
like a password: it prints the group token and the shared secret in clear,
where they land in shell history and scrollback. Use svg for anything a
person will see, and payload only for scripting.
Decode a pairing payload
# from an image file
meshly pair decode --image pairing.png
# or from stdin
meshly pair show --format payload | meshly pair decodedecode validates the payload and prints its fields, so you can confirm what a
QR actually grants before trusting it. Malformed payloads fail loudly:
not a meshly payload, bad base64url, bad JSON, unsupported version, empty
field, invalid service name, invalid server NodeID, a non-loopback bind hint,
or an oversized payload that would not scan reliably.
Why accountless pairing
- No sign-up, no directory. Nothing is stored anywhere but the two devices.
- No network round-trip.
pair show/pair decodeare pure local operations, so they work on an air-gapped or freshly booted machine. - Rotatable. To revoke access, change
shared_secretinclient.tomland re-pair; old payloads stop working immediately. - Scriptable.
--format payloadplusdecodegives you a text pipeline for provisioning automation.