Connecting via Rclone¶
Rclone is an open-source command-line tool for managing files across cloud storage platforms. It supports syncing, copying, and transferring files of virtually any size.
When to use Rclone
Use Rclone for large datasets (10+ GB) or when you need scripted/automated transfers. For smaller uploads, the browser interface may be simpler.
The Command Line¶
The command line (interface) allows you to interact with a computer through text commands.
The command line has different names, depending on the software platform.
| Operating system | Term |
|---|---|
| Windows | Command Prompt |
| Mac | Terminal |
| Linux | Terminal |
Accessing the Command Line¶
Windows¶
- Click the Start menu or press the windows key
- Type
cmdorCommand Prompt - Click the result
Mac (macOS)¶
- Press Command (⌘) + Space bar
- Type
Terminal - Press Enter
Linux¶
- Press the windows key (Start menu)
- Type
Terminal - Press Enter
Obtaining a folder path¶
rclone commands such as copy & sync require you to specify a local folder path. This is the location of a folder on your machine that you wish to act on.
Drag your desired folder onto the terminal, the terminal automatically receives the path.
Choosing the Right Method¶
| Method | Best for | Considerations |
|---|---|---|
| Copy | One-time uploads, archiving data | Files are transferred once; no ongoing sync |
| Sync | Keeping folders in sync | Deletes files at destination that don't exist at source |
| Mount | Interactive work, browsing files | Requires stable connection; slower for large operations |
Copy vs Sync¶
- Copy: Transfers files from source to destination. Safe for uploads - won't delete anything.
- Sync: Makes destination identical to source. Use with caution - files only at destination will be deleted.
# Copy: safe, additive
rclone copy /local/data "cropxr:study_folder"
# Sync: makes destination match source (destructive)
rclone sync /local/data "cropxr:study_folder"
Sync deletes files
rclone sync will delete files at the destination that don't exist at the source. Always use --dry-run first to preview changes.
When to Mount¶
Mounting is useful when you need to:
- Browse files interactively
- Work with software that expects local file paths
- Make small edits without downloading entire files
Mounting is not recommended for:
- Large batch uploads (use
copyinstead) - Unreliable network connections
- Long-running operations
Working with Permissions¶
Research Drive permissions affect what you can access via Rclone. See Sharing Data for details on managing permissions.
What You Can See¶
Rclone can only access folders that are:
- Owned by you, or
- Shared with you (appears in your root directory)
Upload Permissions¶
Before uploading, ensure you have write access to the destination folder. If you only have read access, uploads will fail. See Getting Access if you need to request permissions.
Best Practice Workflow¶
- Request folder access from the folder owner or data team
- Verify access by listing the folder:
rclone lsd cropxr:folder_name - Upload data using copy or sync
- Notify the data team if permissions need adjustment after upload
Permissions after upload
Once you upload data to a shared folder, the folder owner controls access. Coordinate with your team about who should have read/write access. See Sharing Data for sharing guidelines.
Quickstart¶
Once configured, use these commands:
# Copy files to Research Drive
rclone copy /local/path "cropxr:destination/folder"
# Mount Research Drive as a local folder
rclone mount "cropxr:folder" /mount/point --vfs-cache-mode writes
Requirements¶
Version Requirement
Rclone version 1.63.1 or newer is required for Nextcloud compatibility. Earlier versions will fail with a chunked upload error.
Downloading rclone¶
Download rclone from rclone.org/downloads
Refer to the table below to easily identify the correct download for your machine.
| Your device | What to download |
|---|---|
| Windows | Intel/AMD - 64 Bit |
| Mac (2020 or newer, M1/M2/M3 chip) | ARM - 64 Bit |
| Mac (2019 or older, Intel chip) | Intel/AMD - 64 Bit |
| Linux | Intel/AMD - 64 Bit |
Installation¶
Tip
If downloading and extracting rclone, place the extracted folder on the local drive or OneDrive. Do not place it on a university network drive e.g. //WURNET.
Windows¶
- Extract the download to a folder (e.g.,
C:\rclone) - Open the rclone folder in File Explorer
- Click the address bar at the top and type 'cmd'
- Press Enter. This opens a command prompt window with the rclone folder set as the working directory
- Run rclone commands from that folder.
When running commands from inside the rclone folder, you must start your command with .\rclone. The .\ tells your terminal to run the rclone program inside the folder.
Example:
Linux/macOS (with admin access)¶
This is a system-wide install of rclone, which means that rclone can be run from any location within the terminal. You can therefore run rclone commands without the "./" prefix.
Example:
Linux/macOS (without admin access)¶
- Open your Files app and go to your Downloads folder.
- Right-click the downloaded file and choose Extract Here.
- Open the extracted folder (it will have a name like
rclone-v1.xx.x-linux-amd64). - Inside this folder, you should see a file called
rclone. - Right-click inside the folder and choose Open in Terminal
- Make rclone executable by running:
- You can now run rclone commands from this terminal window.
When running commands from inside the rclone folder, you must start your command with ./rclone. The ./ tells the terminal to run the rclone program inside the folder.
Verify installation:
Configuration¶
Step 1: Generate App Password¶
- Log in to Research Drive
- Go to Settings (top right) > Security
- Under "Devices & sessions", click Create new app password
- Copy the password immediately (it is only shown once)
Step 2: Get Your WebDAV URL¶
- In Research Drive, go to Files
- Click Settings (bottom left corner) > WebDAV
- Copy the URL (format:
https://cropxr.data.surf.nl/remote.php/dav/files/your@email.com/)
Step 3: rclone configuration¶
- Open the command line in the rclone folder.
- Run
rclone config(This starts the built-in config setup tool) - Create a new connection by typing
n - Enter the name for the remote connection e.g.
cropxr - Scroll through the list for your desired storage type e.g.
webdavand enter its number. - Enter the connection details
- URL:
https://cropxr.data.surf.nl/remote.php/dav/files/your@email.com - Vendor:
nextcloudor 2 - User: enter your login email address
- Password: enter your app password
- Confirm the settings when prompted and save the configuration.
- Enter
Nofor editing advanced config - Enter
Yeswhen asked about keeping the newly configured remote connection.
Step 4: Test Connection¶
This should list the folders in your Research Drive.
Usage¶
Copying Files¶
For large files, add a timeout (approximately 10 minutes per GB):
Commands for verifying successful file transfer¶
This command shows a list of files stored in the remote destination. You can use this to check that your files appear in the list and that the file names look correct.
This command compares files between your computer and the remote destination.
The absence of errors means that everything matches. Errors indicate that files did not transfer correctly or are missing. In such a case, try repeating the copy and check commands.
Mounting as Local Drive¶
First install WinFsp (requires admin privileges).
Path formats
Paths can be either the full path or the shared folder name:
- Full path:
cropxr:cropxr (Projectfolder)/investigations/inv_folder/study_folder - Shared folder:
cropxr:study_folder
Best practice
Mount a specific folder (e.g., your study folder) rather than the root. This improves performance and simplifies navigation.
Command Flags Explained¶
| Flag | Purpose |
|---|---|
--vfs-cache-mode writes |
Caches files during upload for reliable transfers |
--use-cookies |
Maintains session with Nextcloud/WebDAV servers |
-v |
Verbose output for monitoring progress |
--timeout |
Maximum time for a single operation |
Troubleshooting¶
| Issue | Solution |
|---|---|
| "chunked upload" error | Update rclone to version 1.63.1 or newer |
| Connection timeout | Add --timeout 60m or increase the value |
| Permission denied | Verify your app password and username |
| Mount not working (Windows) | Ensure WinFsp is installed |
When reporting issues
Include the rclone command you ran, the error message, and your rclone version (rclone --version). For Research Drive platform issues, see SURF servicedesk.
See Also¶
- Uploading Data - Overview of upload methods
- Via Browser - Simpler option for small uploads
- Via NextCloud - Desktop sync client alternative
- Sharing Data - Managing folder permissions
External References¶
SURF Research Drive¶
Rclone¶
- Rclone documentation
- Rclone WebDAV - WebDAV backend configuration
- Rclone copy - Copy command reference
- Rclone sync - Sync command reference
- Rclone mount - Mount command reference
- Rclone flags - Global flags reference