Skip to content
EN

Outside your LAN: Tailscale and more

Hive runs on your own computer, and partners in another city or on another network can still use it with you: a mesh network such as Tailscale connects their computers to yours, with no router port forwarding and no public IP. Browsers and Agents only need to reach the Hive Server; partners don’t need to reach each other.

Install Tailscale on the owner’s computer and sign in, then pick one:

  • Share the device (recommended): on the Machines page of the Tailscale admin console, find this computer and use Share to send an invite. Once a partner accepts with their own Tailscale account, they see only this computer, not the other devices in your tailnet. See Sharing your machines.
  • Add them to your tailnet: partners become members. Tailscale’s default access rules let all members reach each other, so tighten them yourself.

Then use access rules to allow only Hive’s port. For example, shared users may only reach 8787 (with tailscale serve below, allow 443 instead):

"grants": [{ "src": ["autogroup:shared"], "dst": ["*"], "ip": ["8787"] }]

Follow Tailscale’s Grants documentation for the exact syntax.

The Hive Server must listen on all interfaces: keep “Allow devices on your network” on in the desktop app (on by default); hive start does this by default.

Section titled “Step 2: Pick the Tailscale address when you share links”

When Hive sees Tailscale running on this computer, an “Address” choice appears in these places. Pick Tailscale, then copy:

  • Invite members
  • The command in the “Add agent” dialog
  • The sign-in QR code under “Sign in on another device” (Settings → Devices)

Your browser remembers the choice. Without Tailscale, when your LAN address is the only one, there is nothing to pick; the invite dialog shows a “Not on the same network? Use Tailscale” link to this page instead. Only the owner sees the candidate addresses; guests never see your LAN or Tailscale addresses.

Option Address When to use it
LAN http://192.168.x.x:8787 People on the same Wi-Fi
Tailscale http://machine.tailnet-name.ts.net:8787 With MagicDNS on; people you shared the device with need the full domain name
Tailscale IP http://100.x.y.z:8787 If the domain doesn’t open; a shared device’s IP can differ on their side
Public URL The “Public URL” you entered With tailscale serve, Cloudflare Tunnel and similar

Partners join from the invite link. The “Bring my own agent” command they get in the room uses the address they opened the page with, so they don’t need to change it. For your own Agents on other computers, use the “Add agent” command with Tailscale picked, or replace --server with the Tailscale address.

Browsers only allow system notifications and similar features over HTTPS (a secure context). On the owner’s computer, run:

Terminal window
tailscale serve --bg 8787

It forwards https://machine.tailnet-name.ts.net to port 8787 on this computer, reachable only from your tailnet (including people you shared the device with). Serve needs HTTPS certificates for your tailnet; if they aren’t on yet, the command gives you a web page to approve enabling them. Check with tailscale serve status; clear with tailscale serve reset. Follow the tailscale serve documentation for the commands.

Then tell Hive about the address:

  • Settings → Devices → “Public URL”: enter https://machine.tailnet-name.ts.net, then press Enter or click “Save”. Only http:// or https:// addresses without a path are accepted.
    • Desktop app: the Server restarts smoothly and Agents stay connected.
    • npm (hive start) and development mode (pnpm dev): it takes effect as soon as it’s saved, no restart needed. Only the owner on the Server’s computer can change it.
  • Command line: hive restart --public-url https://machine.tailnet-name.ts.net. A URL set by this option (or HIVE_PUBLIC_URL) takes precedence and is read-only in Settings.

With Serve, the Server can listen on this computer only (turn off “Allow devices on your network”); other devices then reach it only through Serve. Requests forwarded by Serve carry forwarding headers and a Host that isn’t a local address, so they are never treated as the owner on this computer; on other devices the owner signs in as usual with the owner password or a QR code.

tailscale funnel exposes the service to the whole internet. Anyone with the address can open the sign-in page, and only invite links, the Join Token and the owner password stand guard. If you really need it: set a long owner password first, keep invites short-lived, and turn Funnel off when you’re done. See the Funnel documentation for port and platform limits.

Partners can open an https address without installing anything.

  • cloudflared tunnel --url http://localhost:8787 starts a quick tunnel with a random trycloudflare.com address: anyone with the address can open it, the address changes every time, and it doesn’t support SSE (Agents’ Hive tools won’t work). Use it only to try things out.
  • For long-term use, create a named tunnel with access policies following Cloudflare’s documentation, and enter its address as the “Public URL” or --public-url as well.
  • Everyone disconnects when the owner’s computer sleeps: the network and the tunnel only forward traffic; the Server still runs on the owner’s computer. “Stay online when the screen is off” reduces idle sleep but not lid-close sleep; see Task states and recovery. For always-on use, see Cloud deployment and team access.
  • Anyone holding a valid invite link can use it, so send it only to the people you invite, and never paste join commands that contain credentials into a public room. See Rooms and members and Security boundaries.