This document outlines current limitations in the Rclone Remote Control (RC) API and proposes specific improvements to enhance its capability, especially for headless and GUI wrappers.
- Limitation:
config/setpathonly acceptspath(for the config file) and rejectscacheortemp. One must useoptions/setto changeCacheDir, butconfig/pathscontinues to report the old path (locked at startup), creating a disconnect between the API report and actual state. - Proposal: Update
config/setpathto acceptcacheandtemp. Ensure that changes trigger a dynamic reload of these paths internally soconfig/pathsreports the correct active paths immediately.
- Limitation:
config/getreturns the config if unlocked, but fails/hangs if locked. There is no safe, non-blocking way to just check if the config is encrypted/locked without potentially hanging the process on an interactive prompt (if not suppressed). - Proposal: Add a
config/statusendpoint that returns metadata:This allows clients to check status safely before deciding to prompt the user for a password.{ "encrypted": true, "locked": true, "path": "/..." }
- Limitation: If an encrypted config is locked and an RC command tries to access it, Rclone halts and waits for input on
stdin. This freezes the entire RC server.- Using
--ask-password=falseis not a viable workaround because it causes a CRITICAL failure at startup (CRITICAL: Failed to load config file ...: unable to decrypt configuration and not allowed to ask for password), crashing the process or preventing the RC server from even starting to receiveconfig/unlock.
- Using
- Proposal: When running with
--rc:- Default to non-interactive mode for config passwords.
- Fail fast instead of crashing: Return a specific API error (e.g.,
401 ConfigLocked) if the config cannot be loaded, but keep the RC server running soconfig/unlockcan be called.
- Limitation: No endpoints exist to encrypt an existing plain config, decrypt an encrypted one, or change the password.
- Proposal: Add endpoints:
config/encrypt(args:password)config/decrypt(args:password)config/changepassword
- Limitation: Cannot "import" a full JSON configuration object (from
config/getdump) into another instance easily. OAuth remotes (OneDrive, iCloud, etc.) are complex to reconstruct via atomicconfig/createcalls without re-triggering auth flows. - Proposal:
- Add a
raworblobparameter toconfig/createto accept a full JSON dump. - Or add
config/importto merge a standard config section or JSON object directly.
- Add a
- Limitation:
core/quitexists, but there is nocore/restart. - Proposal: Add
core/restartto gracefully shut down and respawn the Rclone process with the exact same initial arguments. This is essential for applying setting changes that require a reboot (like mount flags or environment variables).
- Limitation: When multiple mounts exists for the same remote,
vfs/listshows unique IDs (e.g.,remote:[0],remote:[1]). However, commands likevfs/stats,vfs/refresh,vfs/forgetoften reject these suffixed names and ambiguous requests fail. - Proposal: Standardize VFS answering. All
vfs/*commands should accept the unique IDs returned byvfs/listto target specific mount instances reliably.
- Limitation: There is no command in RC to update the remote rclone instance (equivalent to
rclone selfupdate). This prevents managing the rclone version of remote or headless instances via the API. - Proposal: Add
core/selfupdate(or similar) endpoint to trigger a self-update operation on the running instance. After update, the instance should restart automatically with the same arguments.
- Limitation: Filters passed dynamically via the RC API do not apply to mounted drives. Setting
_filterinmount/mountis silently ignored (it only lasts for the duration of the RC call), and updating global options viaoptions/setregisters the filter but the VFS layer fails to pick it up. The VFS layer appears to capture filter states strictly at daemon startup. Currently, the only workaround is passing filters (e.g.,--exclude="*.pdf") directly when starting thercddaemon. - Proposal: Ensure the VFS layer correctly inherits and applies dynamic filter options set via
options/setprior to amount/mountcall. Alternatively, introduce a mechanism to pass persistent, mount-specific filters directly into themount/mountAPI arguments so they aren't lost after the call completes.