背景简介
使用 Rclone 挂载WebDAV。
前置信息
- Rclone v1.71.1 【Rclone - Ubuntu安装】
详细信息
第一步: 配置 Rclone 连接 WebDAV
- 配置 Rclone 使用 root 权限配置
sudo rclone config
- 输入 n 新建一个远程配置
2025/10/15 23:43:33 NOTICE: Config file "/home/henrylin/.config/rclone/rclone.conf" not found - using defaults
No remotes found, make a new one?
n) New remote
s) Set configuration password
q) Quit config
n/s/q> n
- 输入远程配置名称,例如:quark
Enter name for new remote.
name> quark
- 根据提示选择连接类型,例如:58 WebDAV 连接 AList 提供的 WebDAV服务
Option Storage.
Type of storage to configure.
Choose a number from below, or type in your own value.
1 / 1Fichier
\ (fichier)
2 / Akamai NetStorage
\ (netstorage)
******
\ (ulozto)
56 / Union merges the contents of several upstream fs
\ (union)
57 / Uptobox
\ (uptobox)
58 / WebDAV
\ (webdav)
59 / Yandex Disk
\ (yandex)
60 / Zoho
\ (zoho)
61 / iCloud Drive
\ (iclouddrive)
62 / premiumize.me
\ (premiumizeme)
63 / seafile
\ (seafile)
Storage> 58
- 输入 url,例如:
http://localhost:30076:dav
Option url.
URL of http host to connect to.
E.g. https://example.com.
Enter a value.
url> http://localhost:30076:dav
- 选择供应商信息,例如: 8 Other
Option vendor.
Name of the WebDAV site/service/software you are using.
Choose a number from below, or type in your own value.
Press Enter to leave empty.
1 / Fastmail Files
\ (fastmail)
2 / Nextcloud
\ (nextcloud)
3 / Owncloud 10 PHP based WebDAV server
\ (owncloud)
4 / ownCloud Infinite Scale
\ (infinitescale)
5 / Sharepoint Online, authenticated by Microsoft account
\ (sharepoint)
6 / Sharepoint with NTLM authentication, usually self-hosted or on-premises
\ (sharepoint-ntlm)
7 / rclone WebDAV server to serve a remote over HTTP via the WebDAV protocol
\ (rclone)
8 / Other site/service or software
\ (other)
vendor> 8
- 输入用户名,例如: admin
Option user.
User name.
In case NTLM authentication is used, the username should be in the format 'Domain\User'.
Enter a value. Press Enter to leave empty.
user> admin
- 输入密码
Option pass.
Password.
Choose an alternative below. Press Enter for the default (n).
y) Yes, type in my own password
g) Generate random password
n) No, leave this optional password blank (default)
y/g/n> y
Enter the password:
password:
Confirm the password:
password:
- token 留空即可
Option bearer_token.
Bearer token instead of user/pass (e.g. a Macaroon).
Enter a value. Press Enter to leave empty.
bearer_token>
- 暂不修改高级设置
Edit advanced config?
y) Yes
n) No (default)
y/n> n
- 最终确认
Configuration complete.
Options:
- type: webdav
- url: http://localhost:30076:dav
- vendor: other
- user: admin
- pass: *** ENCRYPTED ***
Keep this "quark" remote?
y) Yes this is OK (default)
e) Edit this remote
d) Delete this remote
y/e/d> y
- 完成后退出即可
Current remotes:
Name Type
==== ====
quark webdav
e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> q
第二步: 手动挂载夸克网盘
- 创建挂载盘
sudo mkdir /mnt/quark
sudo rclone mount quark:/quark /mnt/quark --daemon --vfs-cache-mode writes --allow-other
- 查看挂载路径
ls /mnt/quark/
夸克网盘功能介绍.jpg 夸克网盘功能介绍.mp4 夸克网盘功能介绍.pdf 来自:分享
可选-第三步: 使用 systemd 服务配置自动挂载
- 配置
/etc/systemd/system/rclone-quark.service
[Unit]
Description=Rclone Mount for Quark (as root)
Wants=network-online.target
After=network-online.target
[Service]
Type=notify
# 以 root 用户身份运行
User=root
Group=root
# 核心挂载命令
ExecStart=/usr/bin/rclone mount quark:/quark /mnt/quark \
--config /root/.config/rclone/rclone.conf \
--vfs-cache-mode writes \
--allow-other \
--buffer-size 2560M \
--dir-cache-time 12h \
--log-file /var/log/rclone-quark.log \
--log-level INFO
# 进程崩溃后自动重启
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
- 启动服务
systemctl enable rclone-quark --now
- 查看状态
systemctl status rclone-quark
● rclone-quark.service - Rclone Mount for Quark (as root)
Loaded: loaded (/etc/systemd/system/rclone-quark.service; enabled; preset: enabled)
Active: active (running) since Thu 2025-10-16 14:55:36 CST; 8min ago
Main PID: 1065507 (rclone)
Status: "[15:03] vfs cache: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)"
Tasks: 22 (limit: 154283)
Memory: 13.7M (peak: 17.1M)
CPU: 251ms
CGroup: /system.slice/rclone-quark.service
└─1065507 /usr/bin/rclone mount quark:/quark /mnt/quark --config /root/.config/rclone/rclone.conf --vfs-cache-mode writes --allow-other --buffer-size 2560M --dir-cache-time 12h --log-file /var/log/rclone-quark.log --log-lev>
10月 16 14:55:36 henrylin-desktop systemd[1]: Starting rclone-quark.service - Rclone Mount for Quark (as root)...
10月 16 14:55:36 henrylin-desktop systemd[1]: Started rclone-quark.service - Rclone Mount for Quark (as root).
以上便是本文的全部内容,感谢您的阅读,如遇到任何问题,欢迎在评论区留言讨论。