Remote hosts over SSH and Tailscale
Run a group's panes on another machine over ssh, from an ssh config alias, user@host or a Tailscale name, with persistence that survives drops.
On this page
A group can live on another machine: its panes run there over ssh, and its git, pull-request and Files views read from there. The other machine doesn't need Flow; it needs an ssh server, and ideally flow-session or tmux so a session survives a dropped connection.
This is not the same as Puddles, which links devices that run Flow. A remote host is a server Flow reaches with your own ssh.
What counts as a host
A host is anything ssh accepts as a destination:
- an alias from
~/.ssh/config; user@host;- a Tailscale MagicDNS name. Tailscale is not a separate transport: a tailnet machine is an
sshdestination that Flow finds for you, and Tailscale SSH works through the same plainsshclient.
A destination may not be empty, start with -, or contain whitespace or control characters.
Open a session on a remote host
From the command palette (⇧⌘P), run New remote session… (no default shortcut; bind one in Keybindings). It walks four steps:
- Host. Pick a known host or type a destination. Known hosts are listed in this order: recently used, online tailnet machines (with their OS),
~/.ssh/configaliases, offline tailnet machines, then hosts you only have a profile for. - Directory. The folders under the host's default directory (
~unless its profile says otherwise), or type a path. Paths are on the host:~/src/appmeans the remote home. A directory that doesn't exist there starts the pane in~with a one-line notice. - Persistence. How the session survives a dropped connection (persistence tiers). The host's profile is preselected, and your pick is written back to it.
- Label. As for a local session.
From the command line:
flow-cli new-session --host devbox ~/src/app
flow-cli new-session devbox:~/src/app
flow-cli new-session ssh://me@devbox/~/src/app
With --host and no path, the session starts in ~. In the one-argument forms, an existing local directory wins over a name:path reading.
How hosts are found
~/.ssh/config: every concrete name on aHostline. Wildcard and negated patterns (*,?,!) are skipped, andIncludefiles are not followed.- Tailscale:
tailscale status --json, from thetailscaleCLI on yourPATHor the Mac app's bundled one at/Applications/Tailscale.app/Contents/MacOS/Tailscale. A missing, failing or slow (over 3 s) Tailscale just adds nothing. - Recent hosts:
remote.recent, the last 20 destinations you used. - Profiles: any host with
remote.host.<dest>.*settings.
Persistence tiers
A remote pane is a local terminal running ssh in a reconnect loop. What you reconnect to is the tier:
| Tier | Label | Survives a dropped connection | Needs on the host |
|---|---|---|---|
auto (default) | Auto | as the first available of the three below | nothing |
flow-session | flow-session | yes, with Flow's own replay | flow-session on the remote PATH |
tmux | tmux | yes | tmux; Flow runs a dedicated server (tmux -L flow) with the status bar and prefix key off, so it behaves like a bare terminal |
shell | Plain shell | no | nothing |
If you force a tier the host doesn't have, the pane falls back to a plain shell and prints "flow: <tier> is not installed on this host — this shell will not survive a dropped connection". With Persist sessions off, the tier is always a plain shell.
On your Mac, with Persist sessions on, the ssh loop itself runs inside a local flow-session holder, so quitting and relaunching Flow reattaches to the live connection. The remote tier is what survives your Mac rebooting or the network dropping. See Persistent sessions.
Reconnecting
When ssh loses the connection (it exits with status 255, for example after sleep or a network change), the pane prints "flow: lost the connection to <host> — press Enter to reconnect" and waits. Any other exit ends the loop, so exit in the remote shell closes the pane like a local one. Closing a pane or group yourself also ends its remote tier session.
The first pane to a host is interactive: that is where a password prompt, a new host key or a Tailscale check-mode URL appears. Every other ssh run (git refreshes, file listings, previews) is non-interactive and fails fast instead of waiting for a prompt.
Per-host profiles
Each host can carry its own settings. Edit them in Settings › Advanced › Remote hosts: each known host has a persistence menu and an Edit link that fills a form (default directory, remote shell, extra ssh args). Enter in a field saves it.
| Key | Type | Default | Meaning |
|---|---|---|---|
remote.ssh | string | ssh | the ssh program every remote pane and lookup runs ("ssh program") |
remote.host.<dest>.persist | auto | flow-session | tmux | shell | auto | the host's persistence tier |
remote.host.<dest>.root | string | ~ | the default directory the palette offers first |
remote.host.<dest>.shell | string | the host's $SHELL, else /bin/sh | the shell the plain-shell tier starts, as a login shell |
remote.host.<dest>.ssh_args | string | (none) | extra ssh options, split like shell words, e.g. -J bastion or -F ~/work/ssh_config |
remote.recent | JSON array | [] | recently used destinations, newest first, at most 20 |
For example, to jump through a bastion for one host:
flow-cli settings set remote.host.devbox.ssh_args "-J bastion"
Connections
Every ssh run to a host shares one multiplexed connection (ControlMaster=auto, kept for 10 minutes after the last use, with keepalives every 15 seconds). The first pane pays the handshake; later git refreshes and listings are a channel on the same connection. The control sockets live in a 0700 folder beside your settings file. Your profile's ssh_args come after Flow's options, and the destination always comes last.
Git, pull requests and Files
- Git is read on the host: one round trip per refresh reports the repo, branch, head, default branch, origin and change counts. A remote group refreshes at most every 15 seconds.
- Pull requests stay local:
ghruns on your Mac against the repository named by the host'soriginand the branch, so your GitHub login and Flow's PR cache stay on the Mac. A branch pushed from the host shows up at the next refresh. - Files: a Files tab on a remote group is rooted at the remote path and browses it over the shared connection. Text previews work; images, video and PDFs aren't fetched ("No preview of this kind of file on a remote host"), and listings show no file sizes. Open becomes Copy path, which copies
host:path; there is no local app to hand a remote file to. See Files.
Limits
- Remote groups keep the directory they were created in; a
cdin a pane doesn't move the group. - Per-pane history,
.flowspace.jsonlayouts and the group's primary command (claudeby default) are skipped for remote groups. - New session's Base step and
dropworktrees run locally only; there are no remote worktrees yet. - The Task Manager and tab titles see only the local
sshprocess. - Port forwarding for web tabs is not available: a dev server on the host's
localhostdoesn't open in a web tab. - Remote files can't be opened in an editor, only copied as a path.
Sources
Written from these files in the Flow app repo
docs/remote-hosts.mdsrc/remote.rssrc/command.rssrc/bin/flow-cli.rssrc/settings_ui.rssrc/settings_catalog.rssrc/files_tab.rssrc/files_ui.rssrc/git_context.rssrc/pages.rs