Remote access
Open the dashboard from anywhere — phone, café, train — via an HTTPS tunnel with token auth + QR code.
bn serve runs the dashboard on http://localhost:4242. Add --remote
and banyan also stands up an HTTPS tunnel with Bearer-token auth
and prints a QR code so you can open the same dashboard from your
phone in two taps.
One command
What happens:
- The dashboard starts locally on a free port (default 4242).
- Banyan checks for a tunnel provider (prefers
cloudflared, falls back tongrok). - A 32-hex token is generated (or reused if one already exists in
the keychain) — every API call must carry it as
Authorization: Bearer <token>. - The tunnel exposes the dashboard at a public
https://…URL. - A QR code is printed in the terminal. It encodes
https://…/#token=<token>— scanning it on your phone opens the dashboard already authenticated.
How the auth works
- The token is stored in your OS keychain (
securityon macOS,secret-toolon Linux). It survives reboots and dashboard restarts. - The QR code embeds the token as a URL hash fragment (
#token=…) — hash fragments aren't sent to servers, so the token stays client-side until the SPA reads it on load. - On first load the SPA reads the hash, persists the token in
localStorage, strips it from the URL bar (clean address bar, no leak in screenshots), and uses it asBearer <token>on every subsequent API call. - Server-Sent Events (the live conversation stream) can't set
arbitrary headers, so SSE accepts the token as a
?token=query string as well.
Rotating the token
Generates a fresh token, invalidates the old one, prints a new QR. Useful if you've shared a QR by accident or want a clean break.
Pick the tunnel provider
Auto-detect chooses cloudflared if both are installed. Cloudflare
quick tunnels need no account; ngrok needs an auth token configured
locally.
Install:
- Cloudflared:
brew install cloudflared(macOS) — see Cloudflare docs for other OSes. - ngrok:
brew install ngrok && ngrok config add-authtoken <yours>.
Why this matters
The whole point of banyan is running many agents in parallel — and
agents take a while. You don't want to be tethered to your desk
waiting for them. With --remote you can step away, check the
pipeline progress on your phone, jump back into a live conversation
with one of the agents, and approve a plan from a café.