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 due to ransomware or simply performance concerns, 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'll see, step by step and in 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 web 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 an open-source command-line tool 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 traditional graphical client, rclone allows you to synchronize, copy, move, list, and mount remote systems with great flexibility. You can use it from Linux, Windows, macOS, or even from more modest devices like OpenWrt routers or your own NAS via SSH.

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

A major advantage over classic rsync is that rclone natively understands over 70 cloud storage providers , 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 device: your computer, the NAS, or both , depending 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 rclone command 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 with winget install Rclone.Rclone Or, if you pull Chocolatey, choco install rclone And, to use the mounting function as a unit, also install winfsp with 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 PCs and NAS devices that allow SSH access and package installation (for example, many Debian/Ubuntu-based NAS devices or those 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.

  3 Ways to Run Windows Programs on Mac

If you don't use Homebrew, you can download the macOS ZIP from the rclone downloads page, unzip it, and move the rclone binary to a path like /usr/local/bin , creating the directory if it doesn't exist, so that it's 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 SynoCommunity repository to install tools like bash and network utilities. Once that's done, you can install rclone in much the same way as you would on a regular 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 users prefer to use an OpenWrt router to manage remote connections and access to the NAS, as it's always on and can act as a "mini-server." OpenWrt offers rclone integration both via the command line and through a web interface in LuCI.

The idea is this: access LuCI, go to Services > Terminal , log in with your OpenWrt credentials, and run the command `rclone config` from there . All the initial configuration is done via the CLI; later you can view and manage the 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

To allow your NAS or PC to upload or download data from Google Drive, you first need to create a remote drive . The procedure is similar on Linux, macOS, Windows, or even OpenWrt; the only difference is whether a web browser is available.

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 scope . If you want it to have 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 any special requirements.

In the advanced configuration step, select that you don't want to edit the advanced settings, and then rclone will ask if you want to use "auto config" through the browser. If you're on a PC with a browser, accept; a window will open where you authenticate with Google, grant permissions, and once you close the process, the settings 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 an 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.

  The 6 Best Programs to Open APK Files.

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.

For Amazon S3, Backblaze B2, Wasabi, or Cloudflare R2 , rclone 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 many people encounter is: “My computer and NAS are on the same local network, but I don’t want 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 powerful option is to install rclone directly on the NAS and let it 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 mount mode that lets you 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.

  Net::err_cert_authority_invalid: Error in Google Chrome. 9 Solutions

If you want to mount 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 manages the read and write cache. You can experiment with VFS cache modes: off (no cache), minimal , writes (writes only), and full , depending on your usage patterns and 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 to automate the backups so you don't have to remember to run 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 advanced features 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 all this in mind, 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/7 , use 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 cross-platform tool.