A direct connection rides an exposed network port, so it’s always token-gated. On an untrusted network, prefer an SSH tunnel instead.
From Another Mains Desktop App
Open Settings → Relay → Add and choose Direct URL.Paste the WebSocket URL
Copy it from the host’s This machine panel:
| Exposure | URL shape |
|---|---|
| LAN / loopback | ws://<host>:8787 |
| Tailscale HTTPS | wss://<machine>.<tailnet>.ts.net |
Enter the pairing token
The token shown in the host’s panel (or printed by
npm run serve). Required whenever the backend was started with one.From A Phone Or Browser
Every exposed address has a browser link that loads the full Mains UI in a web browser, with the token already embedded:Managing Backends
Saved backends live under Settings → Relay, alongside Local (this machine):| Action | Effect |
|---|---|
| Connect | Point the whole UI at this backend (one active at a time) |
| Disconnect / Use local | Return to the local in-process backend |
| Rename | Change the label |
| Remove | Forget the saved backend |
