Linux mount

The drive as a real folder in a VM, on a server or in a container.

phantomdisk-mount mounts a drive as a folder on Linux, for programs that need real file paths. It needs FUSE 3. Files open at once and only the parts that are read come down; a write is uploaded in the background once the file is closed.

In a VM or on a server

sudo apt-get install -y fuse3
curl -fsSL https://api.phantomdisk.com/v1/tools/install.sh | sh     # phantomdisk and phantomdisk-mount
export PHANTOMDISK_KEY=pdk_YOUR_KEY
mkdir -p ~/drive
phantomdisk-mount - ~/drive      # "-" is the key's drive; or give a drive's name
ls ~/drive
fusermount3 -u ~/drive           # unmount; files still waiting keep sending

In a container

The image needs fuse3 and the two tools; the container needs FUSE and the right to mount. The key goes in as an environment variable.

docker run --rm -it --cap-add SYS_ADMIN --device /dev/fuse \
  --security-opt apparmor:unconfined \
  -e PHANTOMDISK_KEY="$PHANTOMDISK_KEY" \
  my-image sh -c 'mkdir -p /drive && phantomdisk-mount - /drive && ls /drive'

The --security-opt line is for hosts with AppArmor, such as Ubuntu: without it the mount is refused there. As root inside a container, unmount with umount /drive.

Many sandboxes do not allow that. There, use the TypeScript SDK or the MCP server: neither needs any special permission.

Good to know

  • A read-only key mounts read-only.
  • Unmounting returns at once. phantomdisk-mount then sends the files still waiting, for up to 30 seconds, and exits; what is left goes with the next mount. Before a VM or container is thrown away, wait until phantomdisk uploads prints nothing.
  • Deleting a file moves it to Recently Deleted. A killed mount loses nothing: the next mount sends what was still waiting.
  • Not supported: symbolic and hard links, extended attributes, owners and permissions (one user; files show as 0644).
  • Tested on Ubuntu on ARM. The x86-64 build has only been run under emulation so far. There is also a .deb of the two tools for each.

Next: For agents