How to use rclone with NAS for backups and cloud storage

Last update: 24/02/2026
Author Isaac
  • rclone allows you to manage NAS and over 70 cloud services from a single command line, ideal for backups and advanced synchronization.
  • It is possible to back up your PC to the NAS without mounting it as a 24/7 drive using remote SFTP, SMB, or WebDAV.
  • By installing rclone on the NAS, it can automatically and on a schedule synchronize data with Google Drive, OneDrive, or S3.
  • Features such as encryption, cloud joining, and spot mounts make rclone a very flexible and secure tool.

rclone setup with NAS

If you have a NAS at home or in the office and you're worried about having it mounted as a network drive all day Whether for fear of ransomware or simply for performance reasons, rclone is one of those tools worth mastering. With it, you can perform backups, synchronizations, and temporary mounts without leaving your NAS exposed 24/7 like just another network folder.

In this article we will see, step by step and in great detail, How to use rclone with a NAS (Synology or others), both for backups from your computer and for using the NAS itself as a bridge to cloud services like Google Drive, OneDrive, S3, etc. You'll see how to install it, configure it on different systems and environments (including devices without a browser, such as a NAS or a router), and how to automate tasks with cron or the task scheduler.

What is rclone and why is it so useful with a NAS?

rclone is a command line tool An open-source application designed to manage files across all types of cloud and remote storage: Google Drive, OneDrive, Dropbox, Amazon S3, Backblaze B2, WebDAV, SFTP, SMB, Proton Drive, MEGA, pCloud, Cloudflare R2, Wasabi, and many more. It's a kind of "supercharged rsync" adapted for the cloud.

Unlike a classic graphical client, rclone allows synchronize, copy, move, list, and mount Remote systems in a very flexible way. You can use it from Linux, Windows, macOS, or even from more modest devices like routers with OpenWrt or the NAS itself via SSH.

For use with your NAS, rclone fits perfectly into several scenarios: backups from your PC to the NAS without setting up a permanent network drive, NAS synchronization with Google Drive or other services, or even serving NAS content via HTTP, WebDAV or FTP using rclone as a server.

A major advantage over classic rsync is that rclone natively understands more than 70 cloud storage providersIt handles OAuth authentication, transparent encryption, and multi-threaded transfers to squeeze bandwidth better than other traditional tools.

Install rclone in different environments (PC, NAS, router)

Before we start setting up backups to the NAS or using it as a gateway to the cloud, we need to have rclone installed on the appropriate machine: your computer, the NAS, or bothdepending on what you want to do.

In many cases, it's enough to install rclone on your PC and access the NAS via network protocol (SMB, SFTP, WebDAV). In others, it's preferable to have rclone directly on the NAS so it can automatically back up to the cloud without going through your computer.

Installation on Windows

On Windows, you have several ways to install rclone, from direct download to package managers. The goal is to be able to run the command clone from any terminal window (CMD or PowerShell).

Recommended method: direct downloadDownload the ZIP file for your architecture from the official website (most common): rclone-v1.71.0-windows-amd64.zip (for 64-bit systems), unzip it and place rclone.exe on a route like C:\rclone\Add that path to the PATH environment variable so you don't have to type the full path every time.

If you prefer something more automated, in Windows 10/11 you can use winget to winget install Rclone.Rclone Or, if you pull Chocolatey, choco install rclone And, to use the mounting function as a unit, also install winfsp to choco install winfsp.

Linux installation (PC or NAS based on Linux)

On Linux, rclone is very easy to install using the official script. This method works perfectly for both... Linux PC such as for a NAS that allows SSH access and package installation (for example, many NAS devices based on Debian/Ubuntu or with SynoCommunity support).

The most direct way is to run the official installation script with administrator privileges: sudo -v ; curl https://rclone.org/install.sh | sudo bashThis script detects your system and installs rclone on it. /usr/bin/rclone or similar.

If you prefer more control, in Debian/Ubuntu you can download the specific .deb package (for example, rclone-v1.71.0-linux-amd64.deb (from the official website) and then install it with sudo dpkg -i rclone-v1.71.0-linux-amd64.deb, correcting dependencies with sudo apt -f install if necessary.

Installation on macOS

On macOS, the most convenient way is to use HomebrewSimply run brew install rclone You'll then have the latest stable version installed and accessible from the terminal. Afterwards, you can verify the installation with... rclone version –check to confirm you have the current version and see any available betas.

  The 9 Best Backup Programs

If you don't use Homebrew, you can download the macOS ZIP file from rclone's downloads page, extract it, and move the binary. clone to a route like / usr / local / bin, creating the directory if it does not exist, so that it is in the PATH and you can call it from any terminal.

Install rclone directly on a Synology NAS

On a Synology NAS, the usual practice is to use the repository SynoCommunity to install tools like bash and network utilities. Once this is done, you can install rclone in much the same way as you would on a normal Linux system using the official script.

The typical steps would be: first you install the package SinoCLI network tools from the SynoCommunity repository within DSM, then You access via SSH as root to the NAS, you enter bash with exec /bin/bash and you execute curl https://rclone.org/install.sh | sudo bashThis will download and install the appropriate version of rclone for your NAS architecture.

Once the process is complete, verify the binary with /usr/bin/rclone -V and then simply type rclone -V No path. If you see the same version, it means the system already knows where rclone is and you can use it without typing the full path. Otherwise, log out of SSH and log back in to refresh the environment.

Installing and using rclone on an OpenWrt router

Some people prefer it to be a router with OpenWrt The one who manages remote connections and access to the NAS, since it's always on and can act as a "mini server". In OpenWrt, rclone is integrated both via the command line and through a web interface in LuCI.

The idea is this: access LuCI, go to Services > TerminalLog in with your OpenWrt credentials and launch the command from there. rclone-configAll initial setup is done via CLI; later you can view and manage remotes from the NAS > Rclone section in the web interface.

Configure remotes in rclone (Google Drive, OneDrive, S3…)

The heart of rclone is the “remote”Definitions that indicate how to connect to a service (Google Drive, NAS via SFTP, S3, etc.). Each remote is a configuration block within the file. rclone.conf, which is generated with the command rclone config.

Think of a remote as "a connected account". From there, you'll use routes like remoto:ruta/en/destino. For example, gdrive:backups/pc o nas-sftp:/volume1/backups, and rclone will handle all authentication and transport.

Full example: Setting up Google Drive as remote

In order for your NAS or PC to upload or download data from Google Drive, you first need to create a remote driveThe procedure is similar in Linux, macOS, Windows or even OpenWrt; what changes is whether a browser is available or not.

1) Execute rclone config and choose the option to create a new remoteGive it a simple name without spaces, for example GDrive2) In the list of suppliers, select Google Drive (Sometimes it appears as number 12, 13, or 17 depending on the version). 3) When it asks for Client ID and Client Secret, you can leave both blank to use the default values ​​provided by rclone.

Next, rclone will ask you for the scopeIf you want full access to your drive, choose option 1 (full read/write). You can leave the other options, such as root folder ID or service account JSON file, blank if you don't have specific requirements.

In the advanced settings step, select that you don't want to edit The advanced configuration, and then rclone will ask if you want to use “auto config” through the browser. If you are on a PC with a browser, accept; a window will open where you authenticate with Google, grant permissions, and once you close the flow, the configuration will be saved.

Authenticate Google Drive without a browser (NAS, router, remote server)

If you are in a browser-less environment, such as the NAS via SSH Or with a router running OpenWrt, things change slightly, but it's still simple. When rclone asks if you want to use auto-config, answer No.The program will show you a command like this: rclone authorize "drive" to run on another machine that does have a browser.

On that other computer (your laptop, for example), run that command in a terminal. A browser tab will open; log in to your Google account and accept the permissions. When finished, rclone will display a access token in the terminal. Copy that JSON block and paste it back into the NAS or router's terminal, when prompted in the corresponding field.

When you're finished, rclone will show you a summary of the remote's configuration. Confirm that it's correct and save. Now you can list folders with something like rclone lsd gdrive: and check that your Drive directories appear.

  What Is A VBS File

Create remotes for OneDrive, S3, or other services

The process for other services is similar. In OneDrive, when creating a remote of type one drive linuxrclone will ask for your region (usually "global"), then open your browser to authenticate with your Microsoft account, and let you choose whether the drive is personal, business, SharePoint, etc. Finally, it will save the settings and you'll be able to use paths like onedrive:backup.

In the case of Amazon S3, Backblaze B2, Wasabi or Cloudflare R2rclone will ask for access keys (Access Key, Secret Key) and the region or endpoint. Once configured, you can list buckets or containers, copy and delete objects, and even migrate data from one bucket to another using rclone commands instead of the provider's web consoles.

How to use rclone to back up from PC to NAS

One of the most common scenarios that many people encounter is: “My computer and the NAS are on the same local network, but I don't want to have the NAS mapped as a network drive all day. "For security reasons, I want to run scheduled backups with rclone." This is perfectly possible.

The idea is for your PC to communicate with the NAS using a protocol supported by rclone, such as SFTP, SMB/CIFS or WebDAVwithout needing to permanently mount a Windows network drive. You configure a remote that points to the NAS, and then schedule a rclone sync o rclone copy from your local folders to that remote location.

If the NAS offers SFTP, a typical remote might have type sftp pointing to the NAS IP address and the user with permissions on the target volume. Something like nas-sftp:/volume1/backups/pc This will be the path you will use from rclone to write your backups.

Once the remote is defined, a simple copy command would be rclone copy C:\Usuarios\TuUsuario\Documentos nas-sftp:/volume1/backups/pc --progress if you're on Windows, or rclone copy /home/usuario/documentos nas-sftp:/volume1/backups/pc --progress on Linux. This allows you to upload new or modified files without having the NAS mounted all day.

If you want the NAS contents to be an exact reflection of your local folder, you can use rclone sync. Note that sync is destructiveIf you delete a file locally and run `sync`, `rclone` will also delete it on the NAS. That's why it's highly recommended to add --dry-run The first time to see what it would do, without touching anything.

Use the NAS with rclone as a gateway to the cloud

Another very powerful option is to install rclone directly on the NAS and let it handle the process. sync with Google Drive, OneDrive, S3, Backblaze B2 or your preferred cloud service. This way you can have your local backups on the NAS and a remote off-site copy without using your PC as an intermediary.

On a Synology system, after installing rclone via script as we saw earlier, you can run rclone config to create a remote connection, for example, using SSH gDrivethat points to Google Drive. The process is the same: choose “Google Drive”, full access scope, do not use advanced settings, disable auto config if the NAS does not have a browser, and authenticate from another machine to paste the token.

Once the remote is working (check it with rclone lsd gDrive:), create the folder on the NAS where you want to mount or synchronize, for example with mkdir /volume1/Backups/gdriveYou can also create it from DSM and then check the exact path in properties.

If what you want is sync filesThe typical command would be something like rclone sync /volume1/Backups/Local gDrive:copias_nas --log-file=/var/log/rclone-gdrive.log -PIn this way, all files from the NAS's local directory will be uploaded and kept up-to-date in the folder. copies_nas from your Google Drive.

To schedule the task, in Synology you can use the Task Scheduler to launch that rclone command every night at the time that suits you best, or directly use cron If you're comfortable using the console, you can add a line to your crontab like this: 0 2 * * * /usr/bin/rclone sync /volume1/Backups/Local gDrive:copias_nas --log-file=/var/log/rclone-gdrive.log.

Mount cloud and NAS storage as file systems with rclone

In addition to copying and syncing, rclone has a mode of editing This allows you to present a remote location (a cloud or even the NAS itself) as if it were a local drive or folder. This is very useful for accessing remote files on a case-by-case basis without making a full copy.

In Windows, you can mount a remote drive as drive X: with a command like rclone mount onedrive: X: --vfs-cache-mode fullIt is also possible to mount it as a network drive with --network-mode. Parameter –vfs-cache-mode full It is generally recommended for more stable behavior with applications that read and write files.

In Linux or macOS, mounting is done on a directory. For example, you would create mkdir ~/OneDrive and then you would execute rclone mount onedrive: ~/OneDrive --vfs-cache-mode full --daemonThis leaves the remote accessible in that directory while the rclone process continues running in the background.

  Warp Terminal: The AI ​​Command Line Revolution

If what you want is set up the NAS From your PC using rclone, instead of a traditional network drive, you can create a remote SFTP or SMB connection to the NAS and mount it in the same way. This way, it will only be "connected" when you choose, reducing its vulnerability to problems like ransomware.

Within the setup, rclone handles read and write caching. You can experiment with VFS cache modes: off (no cache), minimal, writes (deeds only) and full, depending on your usage pattern and your system resources.

Automate backups with cron or task scheduler

Once you understand how to copy or synchronize data with rclone, the next logical step is automate copies so you don't have to remember to launch them manually. You have several options depending on the platform: task scheduler in Windows, cron in Linux/NAS, or even integration with dashboards like LuCI in OpenWrt.

On Windows you can use the Task Scheduler to run rclone at a specific time each day. You create a task that calls C:\rclone\rclone.exe with arguments such as sync C:\DatosImportantes onedrive:backup --log-file=C:\rclone\backup.log, and you configure the trigger to repeat daily at the time you want.

On Linux systems (PC, NAS, VPS, etc.), cron is still king. You edit the crontab with crontab -e and you add a line like 0 2 * * * /usr/bin/rclone sync /home/usuario/documentos gdrive:backup --log-file=/var/log/rclone-backup.logWith that, every night at 2:00 it will automatically synchronize your documents to the remote.

On a router with OpenWrt, in addition to cron jobs, many NAS-oriented LuCI interfaces include a section for NAS > Rclone where you can enable “run Rclone as daemon” and, from there, manage connections through a web UI. However, remote configuration is always done first via the CLI with rclone config.

Advanced features: cryptography, cloud integration, and services

Once you've mastered the basics of rclone with your NAS, you can take it a step further and take advantage of some of its features. advanced functionalities to improve the security and flexibility of your backups.

One of the most interesting is the type of remote cryptwhich adds a layer of encryption on top of another remote. For example, you can create a remote GDrive normal and then a remote secret of type crypt that points to gdrive:encryptedEverything you upload with rclone copy /datos secret: It will be stored in the cloud encrypted, with obfuscated file and directory names.

Another powerful feature is unionwhich allows you to combine several remotes (for example, Google Drive, OneDrive, and Dropbox) into a single logical one. If you create a remote union with "upstreams" gdrive: onedrive: dropbox:Then you can list everything with rclone ls union: as if it were a single file system, and let rclone decide where to place each file based on the configuration.

There is also the family of commands servesWith these features, rclone can turn any remote device (including your NAS) into an HTTP, WebDAV, FTP, or SFTP server. For example, rclone serve webdav remote:path --addr :8080 It sets up a WebDAV server on remote:path, perfect for exposing NAS data to applications that speak that protocol.

Finally, rclone includes a Official Web GUI which you can activate with rclone rcd --rc-web-gui --rc-user=admin --rc-pass=password the one you access from the browser in http://localhost:5572In environments like OpenWrt, many integrations use this functionality to display a React GUI where you can view your remotes, navigate through them, and launch basic operations without always having to use the CLI.

This entire ecosystem makes rclone an ideal Swiss Army knife for managing both your NAS and various cloud services from a single point, maintaining local, remote, encrypted, and automated backups without driving you crazy with a thousand different clients.

With everything we've seen, it's clear that rclone fits like a glove into any NAS backup strategy: it allows you to Back up your computer to the NAS without mounting it 24/7Use the NAS itself as a gateway to Google Drive, OneDrive or S3, mount remote drives on occasion, encrypt sensitive data, automate tasks and even unify several providers into a single logical one, all from a robust, scriptable and multiplatform tool.