# Back up a Synology NAS to Drime with rclone

Copy and sync the folders of your Synology NAS to Drime with rclone's official Drime backend, run in Docker and scheduled with DSM's Task Scheduler.

Updated: 2026-10-19  
Source: https://drime.cloud/support/integrations-and-api/synology-with-rclone

This guide follows rclone's and Synology's official documentation: [rclone Drime backend](https://rclone.org/drime/), [rclone with Docker](https://rclone.org/install/), [Synology Task Scheduler](https://kb.synology.com/en-global/DSM/help/DSM/AdminCenter/system_taskscheduler?version=7) and [Synology SSH](https://kb.synology.com/en-us/DSM/tutorial/How_to_login_to_DSM_with_root_permission_via_SSH_Telnet).

rclone has an official Drime backend, so a Synology NAS can copy its folders to Drime on a schedule: rclone runs in Docker on the NAS, and DSM's Task Scheduler starts it. The files arrive in Drime as ordinary files you can open, share and download.

No single official page covers this whole setup: this guide puts the two documentations together. Drime does not support rclone or DSM themselves: for help with them, see their documentation.

## What you need

- A Synology NAS on DSM 7, with an administrator account.
- Synology's Docker package: **Container Manager** on DSM 7.2 and later, **Docker** on DSM 7.1 and earlier.
- SSH access, only if you prefer rclone's interactive setup.
- A Drime account with enough free storage for what you back up.
- A Drime API token, created in the next section.

## Create an API token

1. In the Drime web app, click your avatar, then **Settings** \> **Developers**.

2. In **API access tokens**, click **Create token**.

3. Name the token after the NAS, for example "Synology NAS", and keep the **All** permission.

   rclone must be able to upload, list and delete. A **Read Only** token only lets rclone download.

   ![The Create new token dialog with a token name and the Permissions tabs](https://drime.cloud/media/01M59T977CYEFV0EGJSEE6Y0F7/1767ae179cc0-web-settings-developers-token-dialog.png)

4. Click **Create**, copy the token, then click **Done**.

   The token is shown only once: keep it for the next step, or store it in a password manager.

   ![The new token shown once, with the Copy button and the warning to store it in a safe place](https://drime.cloud/media/01M5A9VVN2VHMPSB1CPTQWH2G4/45e6a99fae24-web-settings-developers-token-shown-once.png)

All the token options are in [Create an API token](https://drime.cloud/support/integrations-and-api/api-tokens).

## The commands in this guide

Every command runs rclone's official Docker image the way rclone's documentation shows it. Replace the placeholders in capitals:

| Placeholder | Replace with | Example |
| --- | --- | --- |
| `CONFIG_FOLDER` | A NAS folder for rclone's settings | `/volume1/docker/rclone` |
| `NAS_FOLDER` | The NAS folder to back up, or to restore into | `/volume1/photo` |
| `DRIME_FOLDER` | The Drime folder that receives the backup | `NAS-backup/photo` |
| `YOUR_API_TOKEN` | Your Drime API token |  |

Use full NAS paths, starting with `/volume`. Inside Docker, rclone sees `CONFIG_FOLDER` as `/config/rclone` and `NAS_FOLDER` as `/data`.

> **Important**
>
> `CONFIG_FOLDER` will contain your token. Create it in a shared folder that only administrators can open, never in a folder you share with other people.

## Configure rclone on the NAS

### With Container Manager, without SSH

1. In DSM, open **Control Panel** \> **Task Scheduler**.

   Click **Create**, then **Scheduled Task** \> **User-defined script**.

2. Name the task, for example "rclone setup", and choose the **root** user.

3. In **Task Settings**, paste the setup command under **Run command**.

   ```
   docker run --rm \
       --volume CONFIG_FOLDER:/config/rclone \
       --user $(id -u):$(id -g) \
       rclone/rclone \
       config create drime drime access_token YOUR_API_TOKEN
   ```

   It downloads rclone's official image and creates a remote named `drime`.

4. Save the task, select it in the list, then click **Run**.

5. Delete the task afterwards: it contains your token.

### With SSH

If you prefer rclone's interactive setup:

1. In DSM, open **Control Panel** \> **Terminal & SNMP** \> **Terminal**, then tick **Enable SSH service**.

   Synology warns that enabling SSH may bring security risks: turn it off again when you are done.

2. From your computer, connect to the NAS with SSH, then run `sudo -i`.

   SSH sign-in needs an account in the local administrators group, and `sudo -i` asks for that account's password.

3. Start rclone's interactive setup.

   ```
   docker run --rm -it \
       --volume CONFIG_FOLDER:/config/rclone \
       --user $(id -u):$(id -g) \
       rclone/rclone \
       config
   ```

4. Answer rclone's questions to create the `drime` remote.

   Type `n` for a new remote, the name `drime`, the storage type `drime`, then paste your API token at `access_token`.

To check the setup, the same command with `listremotes` instead of `config` should list `drime:`.

## Make a first copy

Start with `rclone copy`: it adds files to Drime and never deletes anything there. Create a task as above, with the **root** user, and this command:

```
docker run --rm \
    --volume CONFIG_FOLDER:/config/rclone \
    --volume NAS_FOLDER:/data:shared \
    --user $(id -u):$(id -g) \
    rclone/rclone \
    copy /data drime:DRIME_FOLDER
```

Run the task, then check the result in Drime.

## Keep Drime in step with sync

`rclone sync` makes the Drime folder match the NAS folder.

> **Warning**
>
> `sync` deletes in Drime the files that are no longer in the NAS folder. Test it first with `--dry-run`, which only lists what would change, and keep `copy` if you want to keep everything in Drime.

Run this once and read the task's output:

```
docker run --rm \
    --volume CONFIG_FOLDER:/config/rclone \
    --volume NAS_FOLDER:/data:shared \
    --user $(id -u):$(id -g) \
    rclone/rclone \
    sync /data drime:DRIME_FOLDER --dry-run
```

Remove `--dry-run` once the list is what you expect. Files rclone deletes in Drime go to your Drime Trash; rclone's advanced option `hard_delete` deletes them permanently instead.

## Schedule the backup

1. In **Control Panel** \> **Task Scheduler**, create a **Scheduled Task** with the **root** user.

   Choose **User-defined script**.

2. On the **Schedule** tab, choose the days and the time, for example every night.

3. In **Task Settings**, paste your `copy` or `sync` command under **Run command**.

   You can also ask DSM to email you the run details, or only when the script ends abnormally.

## Check your files in Drime

Open the Drime web app: `DRIME_FOLDER` holds your files with their usual names. They count toward your Drime storage like any other file.

Good to know, from rclone's Drime documentation:

- **Changes are detected by size.** Drime does not give rclone modification times or hashes, so a file edited without changing its size is not copied again.
- **File names** can be up to 255 bytes long (in UTF-8).
- **Workspaces**: rclone's advanced option `workspace_id` sends the backup to a workspace instead of your own files.
- **Times in rclone's output** are in UTC: the rclone container uses UTC unless its `TZ` variable is set.

## Restore files

Copy them back from Drime with `rclone copy`, the other way round. Use an empty NAS folder as `NAS_FOLDER`, for example `/volume1/restore`:

```
docker run --rm \
    --volume CONFIG_FOLDER:/config/rclone \
    --volume NAS_FOLDER:/data:shared \
    --user $(id -u):$(id -g) \
    rclone/rclone \
    copy drime:DRIME_FOLDER /data
```

You can also download single files from the Drime web app.

## If it doesn't work

| What you see | What to do |
| --- | --- |
| rclone says it did not find the `drime` section in its config file | The command does not use the same `CONFIG_FOLDER` as the setup. Use the same folder in every command. |
| rclone cannot find `/data`, or copies nothing | `NAS_FOLDER` is wrong. Use the full path of the folder, starting with `/volume`. |
| The task fails right away with a Docker error | Check that Container Manager (or Docker on DSM 7.1) is installed and that the task runs as **root**. |
| rclone stopped connecting to Drime | The token may have been deleted or revoked: the Drime API answers `401` with `Unauthenticated.` Create a new token, then run the setup command with `config update drime access_token YOUR_API_TOKEN` in place of `config create drime drime access_token YOUR_API_TOKEN`. |
| rclone can list and download but not upload | The token may be **Read Only**. Create a token with **All**, then replace it the same way (`config update`). |
| Uploads fail when your storage is almost full | Your Drime storage may be full. See [Check and free up storage space](https://drime.cloud/support/drive/check-and-free-up-storage). After a `sync`, empty the Drime Trash too. |
| Two-factor authentication is on for your Drime account | Nothing to change: rclone uses the API token, not your password. |
| A file with a very long name is not copied | Its name is over 255 bytes. Shorten it on the NAS. |

## Next steps

- [Rclone, Drime CLI and WebDAV](https://drime.cloud/support/integrations-and-api/rclone-cli-and-webdav)
- [Back up your computer to Drime with Duplicati](https://drime.cloud/support/integrations-and-api/back-up-with-duplicati)
- [Create an API token](https://drime.cloud/support/integrations-and-api/api-tokens)
