how-to
Mount drives so the agent can read your files
Three mount surfaces (host-FS passthrough, removable drives, SMB/NFS) gated through one policy file.
deputyOS gives the agent access to user files via three surfaces — all gated
through a single policy file at /etc/deputyos/mounts-policy.json. Every
mount lives under /mnt/deputyos/ so AppArmor’s per-profile rules can confine
it. Every mount is reviewable + revocable from deputyctl mounts and from
the PWA “Mounts” card.
Surface 1: host-FS passthrough (desktop launcher / WSL2)
When deputyOS runs as a VM on your laptop (via the desktop launcher → WSL2 / UTM / qemu), share a host folder into the appliance.
Linux / macOS host (qemu / UTM, virtiofs)
make try TARGET=qemu-aarch64 VIRTIOFS_SHARE=/home/me/Documents
deputyctl mounts add \
--id documents \
--host-path /home/me/Documents \
--guest-path /mnt/deputyos/documents \
--mode rw
Windows host (WSL2, DrvFs)
The desktop launcher detects /mnt/c and /mnt/wslg automatically and
offers a per-folder picker. Behind the scenes it generates the same
deputyctl mounts add invocation.
Surface 2: removable drives on bare-metal
Plug a USB stick or external SSD into a Pi 5 / NUC / mini-PC. With the default policy, nothing happens — auto-mount is opt-in:
sudo jq '.removable.enabled = true | .removable.auto_mount = true' \
/etc/deputyos/mounts-policy.json | sudo tee /etc/deputyos/mounts-policy.json
Now plugging a USB stick auto-creates /mnt/deputyos/<label-or-uuid>. The
helper enforces:
nosuid,nodev,noexecfor unknown filesystems.roby default; flip torwper-device in the policy.- LUKS-encrypted volumes are refused until you
cryptsetup luksOpenthem manually.
deputyctl limits adds a “Connected drives” section listing
detected/mounted/refused devices with reasons.
Surface 3: SMB / NFS network shares
For NAS users (TrueNAS, Synology, Unraid).
deputyctl mounts add \
--id photos \
--host-path "//nas.lan/photos" \
--guest-path /mnt/deputyos/photos \
--mode ro
The wizard’s “Network shares (advanced)” tile collects credentials and
writes them to /etc/deputyos/secrets.env (mode 0600); they are never
recorded in the policy file.
deputyctl doctor mounts-health pings each share and reports failures (DNS,
auth, kernel-module-missing).
Revoking access
deputyctl mounts list # see what's configured
deputyctl mounts remove documents # by id
sudo systemctl restart deputyos-mounts.service # re-materialise
The PWA “Mounts” card has a one-click revoke button per mount.
Why this is safe
- Every mount is under
/mnt/deputyos/, which AppArmor per-profile rules confine. - Mounts are explicit: an empty policy means the agent sees nothing.
- Credentials live in
secrets.env, never in the policy file (so the policy is safe to commit to backups). - Removable auto-mount is opt-in and applies safe options for unknown filesystems.