Add storage with rclone or SSHFS

You can extend a VPS with remote storage by mounting it as a folder: SSHFS mounts a directory from another server over SSH, and rclone mount does the same for S3-compatible buckets, SFTP and many other backends. Both use FUSE, start from systemd at boot, and suit archives, media and backups rather than databases.

Servers and storage guide, updated 2026-12-03

When does a network mount make sense?

A network mount is right for data that is large and read in whole files: media libraries, archives, backup targets, build artifacts and old logs. It is the wrong place for a database, a mail store or anything doing many small random writes, because every operation crosses the network. Keep those on the local NVMe disk of your server.

Both tools need FUSE support, which every KVM server has. Install the packages:

apt install sshfs rclone fuse3
dnf install fuse-sshfs rclone

On Rocky and AlmaLinux, fuse-sshfs and rclone come from EPEL. You can also install the latest rclone from its project site if you need newer backends.

How do you mount another server with SSHFS?

SSHFS needs only SSH access to the storage server. Create a dedicated key so the mount does not depend on your personal key:

ssh-keygen -t ed25519 -f /root/.ssh/storage -N ""
ssh-copy-id -i /root/.ssh/storage.pub store@198.51.100.20
mkdir -p /mnt/store
sshfs -o IdentityFile=/root/.ssh/storage,reconnect,ServerAliveInterval=15 store@198.51.100.20:/srv/data /mnt/store

Check it with df -h /mnt/store and unmount with fusermount3 -u /mnt/store (or umount /mnt/store as root). reconnect and ServerAliveInterval let the mount recover after short network drops.

How do you mount SSHFS at boot with systemd?

A mount unit is cleaner than an fstab line because you control ordering. The file name must match the mount path, with slashes turned into dashes: /mnt/store becomes mnt-store.mount.

# /etc/systemd/system/mnt-store.mount
[Unit]
Description=SSHFS storage
After=network-online.target
Wants=network-online.target

[Mount]
What=store@198.51.100.20:/srv/data
Where=/mnt/store
Type=fuse.sshfs
Options=_netdev,IdentityFile=/root/.ssh/storage,reconnect,ServerAliveInterval=15,allow_other

[Install]
WantedBy=multi-user.target

Accept the host key once by hand with ssh -i /root/.ssh/storage store@198.51.100.20, then run systemctl daemon-reload && systemctl enable --now mnt-store.mount. allow_other lets other users, such as a web server user, read the mount.

How do you configure rclone for a bucket or SFTP?

Run rclone config and answer the prompts. For an S3-compatible bucket you need the endpoint URL, access key and secret from your storage provider. The result lands in /root/.config/rclone/rclone.conf and looks like this:

[bucket]
type = s3
provider = Other
access_key_id = YOUR_KEY
secret_access_key = YOUR_SECRET
endpoint = https://s3.example.com

[box]
type = sftp
host = 198.51.100.20
user = store
key_file = /root/.ssh/storage

Test before mounting: rclone lsd bucket: lists buckets and rclone ls box:/srv/data lists files over SFTP. Protect the file with chmod 600, because it holds credentials.

How do you run rclone mount as a service?

rclone mount supports systemd notification, so a simple service unit works well:

# /etc/systemd/system/rclone-media.service
[Unit]
Description=rclone mount of bucket media
After=network-online.target
Wants=network-online.target

[Service]
Type=notify
ExecStartPre=/usr/bin/mkdir -p /mnt/media
ExecStart=/usr/bin/rclone mount bucket:media /mnt/media --vfs-cache-mode writes --vfs-cache-max-size 5G --dir-cache-time 5m --allow-other
ExecStop=/usr/bin/fusermount3 -u /mnt/media
Restart=on-failure

[Install]
WantedBy=multi-user.target

Enable it with systemctl enable --now rclone-media and read errors with journalctl -u rclone-media. If you run rclone as a non-root user with --allow-other, enable user_allow_other in /etc/fuse.conf. Check the binary path with command -v rclone.

Which caching flags should you pick?

Object storage cannot edit a file in place, so rclone needs a local cache for many applications to work.

  • --vfs-cache-mode off: no cache; only sequential reads and writes work. Fine for copying archives.
  • --vfs-cache-mode writes: files opened for writing are staged locally, then uploaded. Good default for most apps.
  • --vfs-cache-mode full: reads are cached too, with partial file downloads. Best for media servers and repeated reads.

Limit the cache with --vfs-cache-max-size so it cannot fill your local disk, and set --cache-dir if you want it outside /root/.cache. --dir-cache-time sets how long folder listings are trusted.

What performance should you expect?

Throughput depends on the distance to the storage and the backend. Large files stream well; thousands of tiny files are slow because each one is a separate request. Pick storage close to your server city, such as storage in Germany for a Frankfurt server.

Remember that data leaving your server counts as outgoing traffic; for P4 in Europe the allowance is 20 TB, and extra volume costs $0.72 per TB. Reads from the mount into your server are incoming and free. Applications that lock files or rely on fast rename, such as SQLite or Git repositories, belong on the local disk.

How do you encrypt remote data with rclone crypt?

A crypt remote wraps another remote and encrypts file contents and, optionally, names before upload. Create it with rclone config, choose type crypt, point it at a folder such as bucket:private and set two passwords. The config gets an entry like:

[secret]
type = crypt
remote = bucket:private
filename_encryption = standard
password = *** obscured ***

Mount secret: instead of bucket:private and you see plain files, while the provider stores only ciphertext. Copy rclone.conf to a safe place outside the server: without those passwords the data cannot be decrypted.

Encryption costs a little CPU on your server and nothing on the storage side. File sizes grow by a small fixed overhead per file, and with name encryption on, very long file names can hit backend length limits, so keep paths reasonably short.

Questions about this guide

Can I attach extra disk space from the console?

No. Extra block volumes are not sold. Mount remote storage as shown here, or move to a plan with more NVMe.

Should I run a database on an rclone mount?

No. Databases need low-latency local disk. Keep them on the server NVMe and send dumps to the mount instead.

Why does the mount hang after the network drops?

Add reconnect and ServerAliveInterval to SSHFS, and Restart=on-failure to the rclone service. A stale mount can be cleared with fusermount3 -uz.

Is SSHFS encrypted?

Yes. It runs over SSH, so traffic is encrypted in transit. Files are stored unencrypted on the target unless you add rclone crypt or disk encryption there.

Can two servers write to the same mount?

They can, but neither tool coordinates locks between servers. Let one writer own each folder.

How do I see what rclone is doing?

Add --log-level INFO or -v to the mount command and read the output with journalctl -u rclone-media -f. rclone about bucket: shows used space where the backend supports it.

Can I use a second CheapVPS server as storage?

Yes. A server in another city works well as an SSHFS or SFTP target, for example with 2 vCPU, 4 GB RAM, 80 GB NVMe on P4.