Skip to main content
Use a Direct URL when the backend is already reachable over a trusted network or a secure endpoint.

Expose the backend

For the running Mac app, enable Network access (LAN) or Tailscale HTTPS in Settings → Mains Connect. For Server, choose a corresponding startup option:
or:
Use the address advertised by that backend. The default HTTP and WebSocket port is 8787.

Connect from Desktop

Open Settings → Mains Connect, add a backend, and choose Direct URL. Enter a name, WebSocket URL, and owner token. The form accepts ws:// or wss://:
Use your real advertised address. Select the saved entry to connect.

Transport choices

Plain ws:// is unencrypted and should stay on a trusted LAN. Use Tailscale HTTPS, a properly configured TLS proxy, or an SSH tunnel for access beyond it. Direct public exposure needs a TLS proxy and an explicitly advertised public URL. Do not treat the owner token as a replacement for transport encryption.

Other clients

Browsers use a one-use login link rather than the desktop token form. On Server, generate one with mains web. Phones use device pairing, so they receive a separate revocable token.