使用rclone挂载alist到本地磁盘

最近用docker搭建了一个navidrome自己的音乐容器,但是并不想音乐文件放在服务器上,索性就使用rclone把alist上的云盘挂载到本地了,系统是Ubuntu22.04

1.安装
安装 rclone

curl https://rclone.org/install.sh | sudo bash

安装fuse

apt-get install fuse

如果后面挂载出现failed to mount FUSE fs: fusermount: exec: “fusermount3”: executable file not found in $PATH错误。可以使用syslink:

ln -s /bin/fusermount /bin/fusermount3

或者安装fuse3

apt-get install fuse

2.配置

ubuntu@problem-arm:~$ sudo -i

root@problem-arm:~# rclone config

2024/08/02 05:37:06 NOTICE: Config file “/root/.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 #按n创建远程

Enter name for new remote.

name> alist #输入远程名字

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)

3 / Alias for an existing remote

\ (alias)

4 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, ArvanCloud, Ceph, ChinaMobile, Cloudflare, DigitalOcean, Dreamhost, GCS, HuaweiOBS, IBMCOS, IDrive, IONOS, LyveCloud, Leviia, Liara, Linode, Magalu, Minio, Netease, Petabox, RackCorp, Rclone, Scaleway, SeaweedFS, StackPath, Storj, Synology, TencentCOS, Wasabi, Qiniu and others

\ (s3)

51 / Uptobox

\ (uptobox)

52 / WebDAV

\ (webdav)

53 / Yandex Disk

\ (yandex)

54 / Zoho

\ (zoho)

55 / premiumize.me

\ (premiumizeme)

56 / seafile

\ (seafile)

Storage> 52 #这里选择52使用webdav

Option url.

URL of http host to connect to.

E.g. https://example.com.

Enter a value.

url> http://127.0.0.1:45454/dav #输入你的alist地址,地址后面要加一个/dav

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

\ (owncloud)

4 / Sharepoint Online, authenticated by Microsoft account

\ (sharepoint)

5 / Sharepoint with NTLM authentication, usually self-hosted or on-premises

\ (sharepoint-ntlm)

6 / rclone WebDAV server to serve a remote over HTTP via the WebDAV protocol

\ (rclone)

7 / Other site/service or software

\ (other)

vendor> 6 #这里选择6

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 #输入你的alist的用户名

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 #输入y

Enter the password:

password:123456 #输入你的alist账号密码

Confirm the password:

password:123456 #再次输入确认密码

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> #这里也可以直接回车使用默认的

Configuration complete.

Options:

– type: webdav

– url: http://127.0.0.1:65533/dav

– vendor: rclone

– user: AsjiYsaBBhsapmlkH

– pass: * ENCRYPTED *

Keep this “alist” remote?

y) Yes this is OK (default)

e) Edit this remote

d) Delete this remote

y/e/d> y #输入y确认你的信息

Current remotes:

Name Type

==== ====

alist 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 #这里我们已经成功配置好远程了,输入q退出

3.查看是否配置成功

ubuntu@problem-arm:~$ sudo -i root@problem-arm:~# rclone lsd alist:/

-1 2024-08-02 05:32:58 -1 ali

-1 2024-08-02 05:31:08 -1 tianyi

#alist是你刚刚远程配置的名称

这里看到配置是成功的,显示我alist连接了是有两个盘的(阿里和天翼的)

4.挂载

root@problem-arm:~# rclone mount alist:/ /home/remote &

#这里我将alist的两个盘挂载到我的 /home/remote下,&在后台持续挂载

5.取消挂载

root@problem-arm:~# fusermount -qzu /home/remote

暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇