Virteche
Guideschevron_rightStorage

Storage · 6 min read · Updated

How to Mount a Storage Box or S3 Bucket as a Drive

rclone can mount a storage box (over SFTP) or an S3 bucket as a drive letter on Windows or a folder on macOS and Linux, so any app can open and save files there. On Windows it needs WinFsp; on macOS, use rclone's nfsmount, which needs no extra driver; on Linux, rclone or the simpler sshfs both work. Turn on rclone's file cache (--vfs-cache-mode full), or many apps fail to save. A mount is for working with files, not for running databases, and it is not a backup.

1. Set Up the Remote in rclone

Install rclone from rclone.org. For a storage box with a password (rclone stores it obscured, not in plain text):

rclone config create box sftp host=bend.storage.virteche.com port=23 user=sb123456 pass=YOUR_PASSWORD

With an SSH key instead, use key_file=~/.ssh/id_ed25519 in place of pass. For an S3 bucket, create the remote as in Using object storage and mount virteche:my-bucket instead of box: below. Check the remote works:

rclone lsd box:

2. Windows

Install WinFsp, then in PowerShell:

rclone mount box: S: --network-mode --vfs-cache-mode full --vfs-cache-max-size 10G

S: appears in File Explorer as a network drive for as long as the window stays open. To mount it at every sign-in, create a task in Task Scheduler that runs the same command At log on, with --no-console added so no window stays open.

3. macOS

Use the rclone download from rclone.org: the Homebrew build does not include mount support. Then mount over rclone's built-in NFS server, which needs no kernel extension:

mkdir -p ~/StorageBox
rclone nfsmount box: ~/StorageBox --vfs-cache-mode full --vfs-cache-max-size 10G

Unmount with umount ~/StorageBox.

4. Linux

For a storage box, sshfs is the simplest:

sudo apt install -y sshfs
mkdir -p ~/box
sshfs -p 23 [email protected]: ~/box
fusermount -u ~/box                 # to unmount

Or use rclone, which also works for S3, in the background:

sudo apt install -y fuse3
rclone mount box: ~/box --vfs-cache-mode full --vfs-cache-max-size 10G --daemon

The Cache Setting Explained

  • --vfs-cache-mode off sends reads and writes straight through. Many apps cannot save files this way.
  • writes keeps files being written on local disk until they are uploaded. Enough for most saving.
  • full also caches what you read, so opening a file twice downloads it once. Best for documents and media; --vfs-cache-max-size caps the local space it uses.

Files saved through the cache are uploaded in the background. Wait for uploads to finish before unmounting or shutting down; rclone logs each one.

Other Ways In

For copying rather than working in place, WinSCP, Cyberduck and FileZilla connect over SFTP on port 23, and rsync or rclone copy only what changed. See Connecting to a storage box.

Common Questions

  • Can I run a database or a website straight from the mounted drive?

    No. Every read and write crosses the internet, so anything that does many small reads and writes is slow and can corrupt files if the connection drops. Use a mount for documents, media and archives, and keep live data on the server's own disk.

  • Is a mounted drive a backup?

    No. Deleting or overwriting a file in the mount deletes or overwrites it on the storage too. For backups use a backup tool, and for a storage box, its snapshots.

  • Why does the drive show the wrong size?

    Mount tools report what the storage tells them, and some report a placeholder. For a storage box, ssh -p 23 to it and run df -h for the real figure.

Storage boxes from 1 TB over SFTP, rsync and Borg, with transfer included and snapshots you schedule yourself.

See storage boxes

Keep Reading

All guides