Skip to content

Private access and mobile pairing

The supported remote topology is a private HTTPS web gateway through Tailscale Serve. Both Bazilion listeners stay on loopback. Direct daemon exposure, public reverse proxies, and Tailscale Funnel are unsupported.

Finish local provider setup first. Install Tailscale and connect the host and client devices to your tailnet. Use the host’s actual HTTPS name, such as https://your-host.your-tailnet.ts.net, for every step below.

Remote chat uses protected execution. Prepare Docker and confirm protected-work readiness before exposing the web UI. Enabled browser and MCP tools remain unavailable in protected turns.

The current bazilion gateway preflight command runs on the Linux daemon host and uses ss and the Tailscale CLI to inspect listeners and Serve configuration.

Stop the running dashboard or managed services. For a terminal-managed setup, export these values and start the dashboard in that shell:

Terminal window
export BAZILION_PUBLIC_ORIGIN=https://your-host.your-tailnet.ts.net
export HOST=127.0.0.1
export PORT=4321
export WEB_HOST=127.0.0.1
export WEB_PORT=4322
bazilion dashboard

Use an origin only: no URL path, query, or credentials. For managed services, put these settings in their service environments and restart both processes. Do not start a second dashboard alongside them. Both the daemon and web UI must receive the same origin. Once set, all HTTP Agent turns use protected execution, even when a client connects locally.

In another terminal on the host:

Terminal window
tailscale serve --bg --https=443 http://127.0.0.1:4322
tailscale serve status
BAZILION_PUBLIC_ORIGIN=https://your-host.your-tailnet.ts.net bazilion gateway preflight

Use the same port environment values if you changed the defaults. Preflight checks loopback listeners, the private Serve target, absence of Funnel, and authenticated protected-runtime readiness. It does not reconfigure anything. Resolve a failed check before proceeding.

Serve may prompt you to enable HTTPS for the tailnet. Its --bg setting persists in the background. See the Tailscale Serve reference for installation-specific setup and command details.

From the authenticated local CLI:

Terminal window
bazilion token create personal-laptop --expires-days 90

Open the exact HTTPS origin from that laptop while connected to Tailscale and paste the newly displayed device credential into the login form. It is shown once. Browser login exchanges it for a bounded session; it does not put the bootstrap bearer into browser cookies.

Use a separate named credential for each device. The first-run bootstrap login exception ends when provider setup completes.

With the Bazilion mobile app installed and Tailscale connected on the phone:

Terminal window
bazilion token create phone --expires-days 90 --qr \
--server https://your-host.your-tailnet.ts.net

Scan the QR in the app, paste its pairing URL manually, or open the bazilion://pair deep link. The app verifies the origin and credential before saving them. Treat the QR as a credential; do not post it in a shared channel. The phone connects to the HTTPS web gateway, never port 4321 directly.

Open an Agent and send a short message. Confirm the streamed reply, cancel control, and reconnect behavior. Mobile denies dangerous shell commands rather than offering an interactive shell approval; use web chat for those decisions.

Terminal window
bazilion token list
bazilion session list
bazilion token revoke <device-token-id>

Revoking a device credential invalidates its derived browser sessions too. The bootstrap token cannot be revoked. An expired or rejected mobile credential requires pairing again with a newly minted credential.

  • Origin or CSRF error: use the exact configured HTTPS URL; check both service environments and restart after changing them.
  • Gateway preflight cannot inspect listeners: run it on the Linux host with ss available, not on the phone or a different computer.
  • Protected runtime unavailable: run bazilion doctor and repair Docker, the image, or the selected provider configuration. Remote chat cannot fall back to host tools.
  • Phone cannot connect: confirm both devices are in the tailnet and its access rules permit the connection, then check tailscale serve status.

In 0.15.0, mobile sends carry the observed conversation selection so stale input fails before it can reach a different conversation. Native conversation management remains deferred; use the web conversation library. Saved results and eligible question controls open the authenticated web UI. These handoffs never place the native device credential in the URL; the browser uses its own sign-in.