Synology NAS configure Alibaba cloud disk synchronization (new)

Original link: https://fugary.com/?p=382

Latest: The previous version zx5253/webdav-aliyundriver is no longer available, use the new version messense/aliyundrive-webdav

WebDAV (Web-based Distributed Authoring and Versioning) is a communication protocol based on the HTTP 1.1 protocol. It extends HTTP 1.1 and adds some new methods in addition to several HTTP standard methods such as GET, POST, HEAD, etc., so that applications can directly read and write to the Web Server, and support write file locking (Locking) and unlocking (Unlock) , and can also support version control of files.

Synology NAS supports WebDAV synchronization, and Cloud Sync can be configured in Synology.

Install Docker and Cloud Sync

Generally use Synology NAS, Docker and Cloud Sync are two basic items that must be installed.

image-20210813170406106

If it is not installed, you can find the installation in the package center.

get refresh_token

Obtain the refresh_token for logging in to Alibaba Cloud Disk. This Token is automatically generated after logging in to Alibaba Cloud Disk. It can be obtained in localStorage , and it is more convenient to obtain it in the Chrome browser.

Log in to Alibaba Cloud Drive first: https://www.aliyundrive.com/drive

After Chrome is logged in, press F12 to open the developer tools, and then look under the Application tab to find Local Storage .

Get refresh_token :

image-20210813170816545

Install and configure aliyundrive-webdav

First open the Docker suite, then search the registry for messense/aliyundrive-webdav and double-click to install.

image-20220709143159775

After the installation is complete, you can configure the startup. Select messense/aliyundrive-webdav in [Image] and click [Start]

image-20220709143332774

Then configure it in [Advanced Settings].

Entering the advanced configuration environment variables is more important

Configure the parameters to start the container:

  1. Configure refresh_token
    1. The refresh_token has been obtained before
    2. Variable: REFRESH_TOKEN Value: Fill in the value of refresh_token
  2. Set up WebDAV login
    1. Variable: WEBDAV_AUTH_USER Value: Enter the username you want to set (default is admin, modify as needed)
  3. Set the WebDav login password (this is the password used by the container and has nothing to do with the Alibaba cloud disk login password)
    1. Variable: WEBDAV_AUTH_PASSWORD Value: Enter the password you want to set (the default is admin, it is recommended to modify it)

Other parameters can be left as they are

image-20220709143635066

Configuration port, local port customization, container port fixed

image-20220709143944973

Then configure the storage space. This is mainly to store some configuration files. It is recommended to put it locally under /docker/aliyun-driver . The loading path must be /etc/aliyundrive-webdav/ :

image-20220709144213145

Then click Finish to execute the application.

You can see that the container has started normally under the container.

image-20220709144523411

Configure Cloud Sync synchronization

After the webdav-aliyundriver started, it listens to the local port (customized when it was configured just now, such as 8999), and then Cloud Sync can be configured.

image-20210813172743676

Configure WebDAV information:

You need to fill in the address http://localhost:8999 (the port is custom), username and password (both are defined during docker configuration)

image-20210813172830632

Then, in the next step, configure the local path and the remote address of the Alibaba Cloud Disk. You can define the folder name and path yourself:

image-20210813173039802

After the configuration is complete, you can try to upload a file to test it, and you can see that the file is synchronized normally.

This article is reprinted from: https://fugary.com/?p=382
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment