Rclone

Rclone is a versatile tool with many functions, one of which is is mounting a S3 compatible object store as a file system. This lets you run minio or rustfs and still access it with programs that require file access.

You can easily implement a clustered file system with it, but it does not handle concurrent writes as JuiceFS does. But if you’re careful, it works well. Metadata retrieval is slower than JuiceFS as it doesn’t have a dedicated system for that, but it handles some of that with caching.

If file modification time is important to you - say because you’re trying to use rsync or syncthing - be aware that most back-ends don’t support that metadata field and rclone will only present it correctly for a short time while it’s cached. You’ll need to use JuiceFS.

Installation

# You may not already have fuse, which rclone needs
sudo apt install -y fuse3 curl

# as per their first (assuming preferred) installation method. Distrod such as
# debian have older versions.
# https://rclone.org/install/#script-installation
sudo -v ; curl https://rclone.org/install.sh | sudo bash

rclone --version

Configuration

# You can run `rclone config`, but it's easier to place this config for a S3 compatible service
sudo vi /etc/rclone.conf

[rustfs]
type = s3
provider = Other
access_key_id = rustfsadmin
secret_access_key = rustfsadmin
endpoint = http://localhost:9000
EOF

Testing

# Assuming you've created a bucket already with a `mc mb rustfs/test` or similar.
# Launch in the foreground and Ctrl-C to exit
sudo mkdir -p /mnt/rclone/
sudo rclone mount rustfs:test /mnt/rclone --config /etc/rclone.conf --log-level INFO

# assuming it worked, in another window:
sudo ls /mnt/rclone

Service Creation

# Create the user and group
sudo useradd \
  --system \
  --user-group \
  --home-dir /var/lib/rclone \
  --create-home \
  --shell /usr/sbin/nologin \
  rclone

# Change fuse settings to allow other
sudo sed -i '/#user_allow_other/ s/^#//' /etc/fuse.conf


# Create Explicit locations for cache and mount
sudo mkdir -p /var/cache/rclone /mnt/rclone
sudo chown -R rclone:rclone /var/cache/rclone /mnt/rclone
sudo chmod -R 750 /var/cache/rclone


# Create a service unit
sudo vi /etc/systemd/system/rclone-mount.service

[Unit]
Description=Rclone Mount for Local RustFS Object Service
After=network-online.target rustfs.service
Wants=network-online.target
Requires=rustfs.service

[Service]
Type=notify
User=rclone
Group=rclone

ExecStart=/usr/bin/rclone mount rustfs:rclone /mnt/rclone \
  --allow-other \
  --cache-dir /var/cache/rclone \
  --config /etc/rclone.conf \
  --dir-cache-time 30s \
  --log-level INFO \
  --log-systemd \
  --vfs-cache-mode full

# --log-file /var/log/rclone.log \
# --vfs-cache-max-size 1G
# --vfs-cache-max-age 48h

ExecStop=/bin/fusermount3 -u /mnt/rclone

Restart=on-failure
RestartSec=10

# Hardening (optional but recommended)
#NoNewPrivileges=true
#PrivateTmp=true
#ProtectSystem=full
#ProtectHome=true

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now rclone-mount.service

Notes

On Caching

full is the exception, not the default. Start with --vfs-cache-mode writes. Only upgrade to full if something actually breaks.

For torrent clients, the correct VFS cache mode is –vfs-cache-mode=full. Like a database, this is one of the clear-cut cases where full is not overkill.

To install the current mc client

curl –progress-bar -L https://dl.min.io/client/mc/release/linux-amd64/mc –create-dirs -o $HOME/minio-binaries/mc


Last modified March 27, 2026: FS updates (8b3d802)