Rclone rcd to create mountpoint when receive rc mount/mount command

not sure if's it's supported currently, but this could be really helpful to have

I'm running a rclone rcd in a docker with /mnt mounted to host, which is a remote machine, and i want the ability to ask rclone to create the moint point for me (and optionally remove it if it is empty when umounted?) instead of having to remote ssh into the machine and manually create it.

another question is that i can't seem to be able to find the --cache-dir option for a remove rc mount command? maybe it is there but i missed? or if there is some global option/variable to default to if that parameter is omitted in the rc request?

That's not really something that I'd imagine would be in rclone. You'd write a script to check for files I assume and umount it.

All documented here:


I've seen the documents, but at a glance there doesn't seem to be anything about specifying the cache dir for mount/mount

and i coudn't find anything with rclone rc options/get either

"mount": {
		"AllowNonEmpty": false,
		"AllowOther": true,
		"AllowRoot": false,
		"AsyncRead": true,
		"AttrTimeout": 1000000000,
		"Daemon": false,
		"DaemonTimeout": 0,
		"DaemonWait": 60000000000,
		"DebugFUSE": false,
		"DefaultPermissions": false,
		"ExtraFlags": [],
		"ExtraOptions": [],
		"MaxReadAhead": 131072,
		"NetworkMode": false,
		"NoAppleDouble": true,
		"NoAppleXattr": false,
		"VolumeName": "",
		"WritebackCache": false
"vfs": {
		"CacheMaxAge": 3600000000000,
		"CacheMaxSize": -1,
		"CacheMode": 3,
		"CachePollInterval": 60000000000,
		"CaseInsensitive": false,
		"ChunkSize": 134217728,
		"ChunkSizeLimit": -1,
		"DirCacheTime": 300000000000,
		"DirPerms": 511,
		"FilePerms": 438,
		"GID": 1000,
		"NoChecksum": false,
		"NoModTime": false,
		"NoSeek": false,
		"PollInterval": 60000000000,
		"ReadAhead": 0,
		"ReadOnly": false,
		"ReadWait": 20000000,
		"UID": 1000,
		"Umask": 23,
		"UsedIsSize": false,
		"WriteBack": 5000000000,
		"WriteWait": 1000000000

That's not really something that I'd imagine would be in rclone. You'd write a script to check for files I assume and umount it.

while reading the docs, i found out about this command operations/mkdir, it is meant to be used on a remote: but what happens if i just mount / as the remote, will i be able to create a dictionary remotely on the host?

You can't change the cache-dir on a running mount. What's your rc command you are using? You want to change the default cache dir location and create a mount through rc?

i want to create a new mount via rc mount/mount with specified cache-dir, and ideally but optionally if that command can create the mount point

currently, i'm creating the initial rcd via docker-compose, however the specified cache folder remains empty and i receive io timeout after using the mount for a little while, which i suspect was caused due to the cache ran out.

i did some reading and it seems that vfs cache and --cache-dir are two different thing?

version: '3.5'

    name: rclone
    driver: "bridge"

    image: rclone/rclone:beta
    container_name: rclone
    restart: unless-stopped
    privileged: true
        max-size: "10m"
        max-file: "3"
      - .env.rclone
      - PHP_TZ=${TZ}
      - PUID=${PUID}
      - PGID=${PGID}
      - /etc/passwd:/etc/passwd:ro
      - /etc/group:/etc/group:ro
      - /etc/localtime:/etc/localtime:ro
      - ~/.ssh/authorized_keys:/root/.ssh/authorized_keys:ro

      - ${CONFIG_DIR_RCLONE}/:/config/rclone/
      - $CACHE_DIR_RCLONE:/cache/
      - /mnt/rclone/mnt:/mnt:shared
      - seccomp:unconfined
      - /dev/fuse:/dev/fuse
      - SYS_ADMIN
      - SETPCAP
      - MKNOD
    entrypoint: >
      sh -c "
        set -x
        AUTH=\"--rc-addr=:5572  --rc-user=$${WEB_ADMIN_USER} --rc-pass=$$WEB_ADMIN_PASSWORD\"

        cat $$FILTER_FILE

        [ -f $${FILTER_FILE} ] && {
          FILTER=\"--filter-from $${FILTER_FILE}\"

        rclone rcd --rc-web-gui --rc-serve --rc-web-gui-no-open-browser \
          --transfers 8 --rc-web-gui-update -vv --cache-dir /cache $$FILTER $$AUTH &

        sleep 3

        rclone rc options/set $$AUTH  --json {'\"main\": {\"DisableHTTP2\": true, \"MultiThreadStreams\":5, \"BufferSize\":16777216}'}
        rclone rc options/set $$AUTH  --json {'\"vfs\": {\"CacheMode\": 3, \"GID\": '$$PGID', \"UID\": '$$PUID', \"Umask\": 0, \"CacheMaxAge\":172800000000000, \"ReadAhead\":67108864, \"NoModTime\":true, \"NoChecksum\": true, \"WriteBack\":10000000000}'}
        rclone rc options/set $$AUTH  --json {'\"mount\": {\"AllowNonEmpty\":"false", \"AllowOther\":"true", \"AsyncRead\":"true"}'}

        wait %1

      - 5572:5572

You can check out:


cache-dir is an option used in overall VFS cache mode to define where the files are stored.

I can't offer any advice on docker as I don't use it.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.