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.
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
:
Install and configure aliyundrive-webdav
First open the Docker
suite, then search the registry for messense/aliyundrive-webdav
and double-click to install.
After the installation is complete, you can configure the startup. Select messense/aliyundrive-webdav
in [Image] and click [Start]
Then configure it in [Advanced Settings].
Entering the advanced configuration environment variables is more important
Configure the parameters to start the container:
- Configure refresh_token
- The refresh_token has been obtained before
- Variable: REFRESH_TOKEN Value: Fill in the value of refresh_token
- Set up WebDAV login
- Variable: WEBDAV_AUTH_USER Value: Enter the username you want to set (default is admin, modify as needed)
- 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)
- 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
Configuration port, local port customization, container port fixed
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/
:
Then click Finish to execute the application.
You can see that the container has started normally under the container.
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.
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)
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:
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.