Mount SFTP folders in network storage, as CoreDesktop does

configure storage now finds machines that announce SFTP as well as SMB
servers, and takes sftp://[user@]host[:port][/path] addresses. Folders
are mounted with SSHFS on macFUSE, as you, with your SSH keys
(Bitwarden's SSH agent while it runs one), and never ask for a
password. storage-mount mounts them again at login and when the
network changes, as it does SMB shares; each line of the list now
records its mount point.

macFUSE and SSHFS are offered for download, checked against their
Team ID (3T5GSNBU6W, read from the packages' signatures). On macOS 26
and later macFUSE mounts through FSKit, whose extension you turn on
once in System Settings. Earlier macOS needs its kernel extension,
which this uses if it's running but doesn't set up.

smoketest: 85-sftp installs both and mounts a folder from the VM
itself over SSH, if macFUSE's extension can be turned on there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-11 08:55:55 -07:00
co-authored by Claude Opus 5.5
parent 08e6b2ee4f
commit 8e2a886215
7 changed files with 436 additions and 60 deletions
+6 -2
View File
@@ -41,7 +41,9 @@ To run it as just `configure`, link it into a directory on your PATH, e.g. `ln -
- launchd starts it hourly and at login, and it backs up once a day, so a Mac that was asleep or off catches up soon after. It's started through a small app, "Federated Backup" in ~/Applications, because macOS only lets apps into Desktop, Documents, Mail and Photos once you give them Full Disk Access. `configure` opens the right place in System Settings and checks that it worked. Without it, backups leave those folders out and you get a notification each time.
- The log is `~/Library/Logs/Federated Connector/backup.log`. Run `configure backup` again to back up now or to turn backups off; turning them off also offers to delete the backups.
- To restore, see "Restoring from a backup" below.
- **Network storage**: shared folders (SMB) from Windows PCs, NAS boxes and Macs with File Sharing on. It finds them on your network, or you enter an address (`smb://nas.local/files`; leave out the share to choose from a list). macOS mounts them in /Volumes and shows them in Finder's sidebar, and its sign-in window can keep the password in your keychain. A launchd job mounts them again at login and when the network changes, skipping servers it can't reach. Folders over SSH (SFTP) need macFUSE, which this doesn't set up.
- **Network storage**: shared folders from other machines on your network, mounted in /Volumes and shown in Finder's sidebar. It finds SMB servers (Windows PCs, NAS boxes, Macs with File Sharing on) and machines that announce SFTP (Macs with Remote Login on, many Linux machines), or you enter an address (`smb://nas.local/files`, `sftp://me@server.local/srv/data`). A launchd job mounts them again at login and when the network changes, skipping servers it can't reach. "Remove one" unmounts it and takes it off the list.
- **SMB** is built into macOS. Leave out the share to choose from a list. The sign-in window can keep the password in your keychain, and mounting again at login needs it there.
- **SFTP** uses [macFUSE](https://macfuse.github.io) and SSHFS, which `configure storage` offers to install. It needs macOS 26 or later, where macFUSE runs in user space through FSKit; you turn on its file system extension once, in System Settings > General > Login Items & Extensions. On earlier macOS, macFUSE needs its kernel extension, which on Apple silicon means starting up in Recovery and lowering security. This doesn't do that, but it uses the kernel extension if you've set it up yourself. As in CoreDesktop, an SFTP folder is mounted as you with your SSH keys (Bitwarden's SSH agent while it's running, otherwise macOS' agent and `~/.ssh`) and never asks for a password, so the server has to accept one of your keys.
- **AI agents**: offers to install Claude Code, opencode and Hermes Agent with each one's own installer, and runs them in a sandbox (see below). `configure claude`, `configure opencode` and `configure hermes` sign in to them and choose their model providers.
- **Agent sandbox**: iCloud Drive and other cloud drives' files are hidden from agents. Reading a file macOS keeps only in the cloud downloads it. To let agents read one of these, switch it here.
- **AI servers**: LLM servers on this Mac or your network, such as Ollama or LM Studio. It finds the machines on your network over Bonjour and asks each one on the ports LLM servers use (11434 Ollama, 1234 LM Studio, 8080 llama.cpp, 8000 vLLM); or you enter an address. For the server you choose, it lets the sandboxed agents reach it (that port only), adds it to opencode with its models, offers to make it Hermes' model, and lets the commands Claude Code runs reach it too. A server on another machine has to accept connections from other machines: in Ollama's settings turn on "Expose Ollama to the network"; in LM Studio, "Serve on Local Network".
@@ -86,6 +88,8 @@ If an app a step needs isn't on this Mac, `configure` offers to download and ins
| Nextcloud | Your files | github.com/nextcloud-releases/desktop | `NKUJUXUJ3B` |
| Element | Your Core's chat | packages.element.io | `7J4U792NQT` |
| Tailscale | Your Core's network | pkgs.tailscale.com | `W5364U7YZB` |
| macFUSE | SFTP folders | github.com/macfuse/macfuse | `3T5GSNBU6W` |
| SSHFS | SFTP folders | github.com/libfuse/sshfs (linked from macfuse.github.io) | `3T5GSNBU6W` |
An app is installed only if it's signed with its maker's Developer ID (the Team ID above) and Gatekeeper accepts it, which means Apple notarized it. The apps update themselves after that. Installing a .pkg (Nextcloud, Tailscale) asks for your Mac password.
@@ -135,6 +139,6 @@ Keep to bash 3.2: no `mapfile`, `read -i`, associative arrays or `${var,,}`.
- Mail, Calendar and Contacts come from a configuration profile, not GNOME Online Accounts. macOS asks you to approve the profile.
- Files sync through the Nextcloud app rather than a davfs2 mount.
- Backups and network storage run from launchd rather than systemd. Backups need Full Disk Access (see above), and network storage uses macOS' own SMB mounting and keychain rather than /etc/fstab.
- Network storage is SMB only; SFTP would need macFUSE.
- SFTP folders need macFUSE and SSHFS, and macOS 26 or later (or macFUSE's kernel extension), where CoreDesktop uses sshfs on FUSE, built into Linux.
- The sandbox uses Seatbelt rather than bubblewrap, so sandboxed agents reach everything, including local servers, through srt's proxy.
- Not ported: Cline Desktop (not packaged for macOS here), running Hermes' gateway in the sandbox, printers (AirPrint finds them), languages, Tally and the email watcher.