Skip to main content
FUSE shows a workspace as a real folder. Editors, grep, git and any other program read and write its files like local ones, and every file operation still goes through the workspace’s mounts. The folder can be on the server’s machine, or on your own machine when the server runs somewhere else. With the mirage CLI the server runs on your machine, so the first way puts the folder there too. In your own app, set backend on the Mount instead, in Python or TypeScript.

On the server’s machine

1

Install FUSE

Install the system FUSE first, see the support matrix. Then the binding:
2

Mark the mounts

workspace.yaml
A mountpoint must be a folder that exists. Without one, the server makes a new temporary folder.
3

Create the workspace

The answer, like GET /v1/workspaces/{id}, lists where each mount landed:
The server mounts the folders when it creates the workspace and unmounts them when the workspace is closed or deleted. A folder belongs to no session, so no profile applies: it sees each mount as the mount’s mode allows, and a write to a READ mount fails with “Read-only file system”. On macOS a process holds one FUSE mount at a time, so the server can serve one folder there.

On your machine

sshfs mounts the workspace over SFTP, so the server needs nothing more than SSH turned on and your key authorized. On Linux install it with apt install sshfs; on macOS install macFUSE and SSHFS from macfuse.github.io.
  • Keep -o direct_io. Files from API-backed mounts, such as Linear, Slack or Trello, have no size until they are read, so they list as 0 bytes. Without direct_io the kernel trusts that size and they read as empty; with it they read in full.
  • One session for the whole mount. The mount is one SFTP channel, so it runs as one fresh session under the key’s profile, closed when you unmount. In jwt mode the key needs mirage-account and opens only that account’s workspaces.
  • A write to a READ mount fails with “Permission denied”, since SFTP has no read-only error.
  • Every file operation is a round trip to the server.