This issue is a recommended Ali cloud disk webdav protocol open source implementation project – Webdav-Aliyundriver.
This project realizes the webdav protocol of Ali cloud disk, and only needs a simple configuration to make Ali cloud disk become the file server of webdav protocol. Based on this, you can mount Ali cloud disk as a disk of Windows, Linux, Mac system, you can do file management or file synchronization through NAS.
Installation use
refreshToken is supported. For details, see the parameter description.
--aliyundrive.refresh-token
refreshToken: See below for Refreshtoken
--server.port
This parameter is mandatory. The port number of the server is 8080 by default
--aliyundrive.auth.enable=true
Whether to enable WebDav account authentication. This parameter is enabled by default
--aliyundrive.auth.user-name=admin
The WebDav account is admin by default
--aliyundrive.auth.password=admin
Password of WebDav. The default value is admin
--aliyundrive.work-dir=/etc/aliyun-driver/
token mounting path (If multiple tokens are available, change this configuration.)
Method of obtaining refreshToken:
1. First open the official website of Alibaba Cloud Disk through a browser (chrome is recommended) and log in: Ali Cloud Disk
2. After successful login, press F12 to open the developer tool, click Application, click Local Storage, and click under Local Storage
https://www.aliyundrive.com/, click on the right side of the token, you can see the inside of the data, which included a refresh_token, its value can be copied out. Format lowercase letters and numbers, do not copy double quotes. Example:
Ca6bf2175d73as2188efg81f87e55f11) < / p >
Run:
- jar package run
Download the jar package:
https://github.com/zxbu/webdav-aliyundriver/releases
java -jar webdav.jar --aliyundrive.refresh-token="your refreshToken"
- Container run
docker run -d --name=webdav-aliyundriver --restart=always -p 8080:8080 -v /etc/localtime:/etc/localtime -v /etc/aliyun-driver/:/etc/aliyun-driver/ -e TZ="Asia/Shanghai" -e ALIYUNDRIVE_REFRESH_TOKEN="your refreshToken" -e ALIYUNDRIVE_AUTH_PASSWORD="admin" -e JAVA_OPTS="-Xmx1g" zx5253/webdav-aliyundriver
# /etc/aliyun-driver/ Mount the volume automatically maintains the latest refreshToken. It is recommended to mount
# ALIYUNDRIVE_AUTH_PASSWORD Indicates the password of the admin account. It is recommended to change
# JAVA_OPTS The maximum memory usage can be modified, for example, -e JAVA_OPTS="-Xmx512m" indicates that the maximum memory limit is 512m
- Docker-Compose
version: "3.0"
services:
webdav-aliyundriver:
image: zx5253/webdav-aliyundriver
container_name: aliyundriver
environment:
- TZ=Asia/Shanghai
- ALIYUNDRIVE_REFRESH_TOKEN=refreshToken
- ALIYUNDRIVE_AUTH_USER-NAME=admin
- ALIYUNDRIVE_AUTH_PASSWORD=admin
- JAVA_OPTS=-Xmx1g
volumes:
- /etc/aliyun-driver/:/etc/aliyun-driver/
ports:
- 6666:8080
restart: always
# "refreshToken" Please obtain it as described below.
# ALIYUNDRIVE_AUTH_USER-NAME and ALIYUNDRIVE_AUTH_PASSWORD indicate the connection user name and password. You are advised to change them.
# "/etc/aliyun-driver/:/etc/aliyun-driver/", can be changed before the colon to the specified directory, Such as "/ homes/USER/docker alidriver / : / etc/aliyun - driver/".
< span class = "HLJS - the comment" > # deleted "/ etc/localtime: / etc/localtime", if there is any need to please add under the environment of synchronization time.
# Port 6666 can be changed according to needs, this port is the WebDAV connection port,8080 is the configuration port in the container, please modify according to your ability.
# It is recommended not to keep these Chinese comments in case of errors, such as QNAP.
Supported functions
- View folders, view files
- File moving directory
- File rename
- File download
- File deletion
- File upload (support automatic batch upload of large files)
- Support large file upload (official limit 30G)
- Support WebDav permission verification (Default password: admin/admin)
- File download breakpoint resume
- Webdav streaming media playback and other functions
Not supported
- Change the file name as you move the file to another directory. For example, moving /a.zip to /b/a1.zip is not supported
- File upload breakpoint resume
You can read more on your own.