Husk
GitHub

Guides

Chat apps on the web

Let claude.ai and ChatGPT use Husk through a tunnel you run, or from a Fly app of your own. Who can read what, signing in with a passkey, approving calls, and switching it off.

Chat apps on your computer (Claude Desktop, Cursor, Claude Code) start Husk themselves. claude.ai and ChatGPT run in someone else's data centre, so they have to reach Husk over the internet. Remote access is how: husk serve --remote serves Husk's tools at https://<your name>/mcp, for one person, its owner.

What you will have at the end: claude.ai or ChatGPT running commands and a browser on computers of yours, with every command, file change, click, typed text, upload and script waiting for your passkey first. Reading pages and files does not wait.

Prerequisites

  • Husk on a computer with Docker running, or Podman, or Fly or SSH computers. Remote chats never get the computer Husk runs on; Husk will not start remote access without one of these, and an SSH target that is this machine (localhost, 127.0.0.1, ::1) does not count.
  • A phone, a laptop or a security key that can hold a passkey.
  • A tunnel with a fixed public name. The name is part of your passkey and of every sign-in, so a name that changes each run (ngrok's or Cloudflare's temporary ones) would lose them every time.

What the chat app, and your tunnel, can see

Read this before the commands.

  • The chat app sees everything the tools return. Shell output, file contents, page text and screenshots go to ChatGPT or Claude as tool results, and are handled under that app's own policies. This is just as true when Husk runs locally, and it is why a hand-off exists: what you type during a hand-off goes to the browser on the computer, not to the chat.
  • Your tunnel may see it too. Where TLS ends decides who can read the traffic, including anything you type during a hand-off:
TunnelWhere TLS endsCan the provider read it?
Tailscale Funnel (recommended)On your computerNo: Funnel's relays "do not decrypt the traffic"
ngrok, with TLS ended at the agentOn your computerNo. Needs a paid plan, your own domain and its certificate
ngrok, ngrok httpngrok's cloudYes
Cloudflare TunnelCloudflare's networkYes. Cloudflare can read everything Husk sends and receives.
Fly, your own cloudFly's edgeYes; Fly also runs the computers
  • You can see when it is on. The console's header and its Connect page, and Husk Bar on a Mac, show "Remote access on" with the public URL and the apps signed in.

Step 1: A fixed name

Pick a tunnel and publish port 7378. That is remote access's own port: the console and Husk's API stay on 7377, on loopback, and the tunnel reaches remote access and nothing else. (husk serve --remote-port changes it. --remote-host sets the address it listens on: leave it at loopback, where the tunnel connects, unless Husk runs in a container behind its own proxy, as on Fly.)

Tailscale Funnel

Funnel ends TLS on your computer, needs no certificate of yours, and its name does not change. You need MagicDNS, HTTPS certificates and the funnel attribute in your tailnet's policy; the first tailscale funnel walks you through turning them on.

tailscale funnel --bg 7378

It stays on in the background, across restarts, and prints your name: https://<machine>.<tailnet>.ts.net. Funnel only listens on ports 443, 8443 and 10000, and the default, 443, is the one you want. To stop it: tailscale funnel --https=443 off, or tailscale funnel reset. See Tailscale Funnel.

ngrok, with TLS ended on your computer

This needs ngrok's Pay-as-you-go plan, a domain of yours pointed at ngrok, and a certificate for it that browsers trust. Put this in ngrok's configuration file (ngrok config edit):

version: 3
agent:
  authtoken: <your authtoken>
endpoints:
  - name: husk
    url: tls://husk.example.com
    upstream:
      url: 7378
    agent_tls_termination:
      server_certificate: /path/to/husk.example.com.crt.pem
      server_private_key: /path/to/husk.example.com.key.pem

Then ngrok start husk. See agent TLS termination.

Cloudflare Tunnel

Only a named tunnel, on a domain you have on Cloudflare: a quick tunnel's name changes every time. Cloudflare can read everything Husk sends and receives.

cloudflared tunnel login
cloudflared tunnel create husk
cloudflared tunnel route dns husk husk.example.com

Then, in ~/.cloudflared/config.yml:

tunnel: <the tunnel's UUID>
credentials-file: /home/you/.cloudflared/<the tunnel's UUID>.json
ingress:
  - hostname: husk.example.com
    service: http://localhost:7378
  - service: http_status:404

and cloudflared tunnel run husk. See Cloudflare's tunnel guide.

Step 2: Start Husk with remote access

If Husk is already running on this machine, quit it first: the desktop app's tray, Quit and stop Husk. Otherwise husk serve stops with "another husk server (v…) is already on 127.0.0.1:7377".

husk serve --remote --public-url https://box.tail1234.ts.net

Use your own name, with no path. The computers come from Docker unless you name another provider: add --provider podman, --provider fly or --provider ssh. Husk checks for security advisories first:

The claim code makes whoever types it first the owner. It is printed on a terminal only, never into a log: when Husk runs as a service, run husk remote claim on the same computer for one. It is good for 15 minutes and 5 tries.

Step 3: Add Husk to your chat app

The address is your name with /mcp after it: https://box.tail1234.ts.net/mcp.

  • claude.ai: Customize, then Connectors. Click + Add, then Add custom connector, and give it the address. On the Free plan you can have one custom connector. See custom connectors.
  • ChatGPT: at chatgpt.com/plugins, click the plus button, then Add custom MCP server. Give it the address, choose OAuth, read the warning, then Create as a plugin, install it, and @-mention it in a chat. Which plans can add one is up to OpenAI: check its help pages for yours. See connecting an MCP server.
  • Perplexity: Plugins, then Add custom, Connector, Add MCP connector, Remote. Give it the address, choose OAuth, and click the new connector to sign in. On Pro, Max and Enterprise. A user has reported that Perplexity's sign-in expects a client secret, which Husk does not give out, so it may not connect yet. See custom remote connectors.

Step 4: Sign in as the owner

The chat app opens Husk's sign-in page, on your name.

  1. The first time, type the claim code, then make a passkey. You are now the owner, and the claim code is spent.
  2. Allow the app.

After that, letting an app in takes your passkey and nothing else. The page names where it will send you back. If that is not claude.ai, ChatGPT, Perplexity or an app on your own device, it says so in red: allow it only if you added Husk there yourself, just now. If someone sent you the link, deny it.

Approving calls

These calls wait for you:

  • a command (shell), a file change (write_file, edit_file), and a port opened to the internet (expose_port);
  • in the browser, a click, typed text, a choice from a list, an upload, several steps at once, and a script (browser_click, browser_type, browser_select, browser_upload, browser_run, browser_script).

Everything else runs without asking: opening and moving around a page (browser_goto, browser_navigate, browser_hover, browser_scroll, browser_tabs, browser_wait_for), snapshots and screenshots, browse, read_file and list_dir. Opening a page can still do something on a site where the computer's browser is signed in, as following any link can, so sign that browser in only where you want the chat to act.

For a call that waits, the chat gives you a link instead of running it:

  1. Open the link, wherever you are.
  2. Read what the call sends: the page shows the computer it runs on, then every argument, exactly as it will run.
  3. Approve with your passkey, or deny.
  4. Tell the chat, and it calls again.

An approval is for that one call. Ten minutes without an answer is a no. A call too big to show on the page is never put to you, and never runs; the chat is told to split it. The box "Also let … for the next hour" lets that app make any call of that one tool, on any of its computers, without asking, for an hour. It is never ticked for you.

When the chat hands you the computer

For a login, a 2FA code or a CAPTCHA, the chat gives you a link instead of typing for you. The link opens with your passkey first, since the chat, and anyone you share the chat with, has the link too. Then you see the computer's browser and type into it yourself; what you type goes to that browser, not to the chat. Tell the chat when you are done.

Switching it off, signing an app out, starting over

From the console's Connect page, or with husk remote on the same computer:

ConsoleCommand
Off: every app signed out, every token and link revoked, the public URL a 404Switch offhusk remote off
On again: apps sign back in with your passkeySwitch onhusk remote on
One app signed out, its tokens and links with itSign out
No owner, no apps, no tokens, and a new claim codeStart overhusk remote reset

Switching on is refused while a high or critical advisory stands. Starting Husk with another --public-url forgets the owner, the apps and the tokens, since they belonged to the old name, and gives a new claim code. husk remote on its own says whether remote access is on, and which apps are signed in.

Limits

  • An app's access token lasts an hour, and its refresh token 30 days. A refresh token used twice is taken as stolen: every token from that sign-in stops working, and the app signs in again with your passkey.
  • Your passkey keeps a link open in that browser for 8 hours. The link itself lapses after ten minutes unused, and after 8 hours at most; ask the chat for a new one.
  • At most 50 apps are registered at once. At the cap, an app that registered over an hour ago and never signed in makes way for a new one.
  • Requests are budgeted per minute. Over budget, the answer is a 429 with retry-after: 60.
  • The advisory check runs at start and then daily, hourly after a check that failed to reach the registry.
  • Remote chats get the computer's tools, not the workspace tools, which work on this machine's own files.

When your computer is off

The chat app's calls fail with a connection error, and the model should tell you Husk is unreachable. Your computers keep their state: they are stopped, never destroyed. When Husk is back, the same chats find the same computers.

Your own cloud: Fly

For a Husk that is always on, run it on Fly.io. Husk runs in one Fly app, and its computers are Fly machines in a second app, which stop when idle and start on the next call. You pay Fly directly: see Fly's pricing. TLS ends at Fly's edge, and Fly runs the computers, so Fly is inside what you trust.

The two files are in deploy/fly/ in Husk's repository: a Dockerfile that installs Husk from npm, and a fly.toml. Copy that folder, then replace my-husk, my-husk-computers and the region in fly.toml with your own. From that folder:

fly apps create my-husk                 # Husk itself
fly apps create my-husk-computers       # its computers
fly volumes create husk_data --app my-husk --region ord --size 1
fly secrets set --app my-husk HUSK_FLY_TOKEN="$(fly tokens create deploy --app my-husk-computers)"
fly deploy

Husk checks for advisories as it starts, as on your own computer. Then ask it for a claim code. Its output on Fly is a log, so it never prints one there:

fly ssh console --app my-husk -C "husk remote claim"

Add https://my-husk.fly.dev/mcp to your chat app (step 3) and sign in (step 4). fly ssh console --app my-husk -C "husk remote off" switches it off.