How to use AList + RCLONE to mount the network disk locally on macOS

The one I have been in contact with the most before may be Baidu Netdisk. Its free capacity is relatively large. We often use it when downloading and sharing some files. However, if the file is relatively large and the speed limit is added, the user experience is not very good. In fact, apart from downloading files, I seldom use the Baidu network disk to store files, and content such as film and television resources is often harmonized, so I feel that the network disk does not seem to be of much use.

It wasn't until later that everyone started to use Alibaba Cloud disks, saying that Alibaba Cloud disks have no speed limit. The network disk has become our "local hard disk". I tried it and found that the experience of mounting it locally has really improved a lot. First of all, in terms of access, as long as you open the local folder, you can directly read and write the network disk The content is very convenient. Secondly, you can use the local application to directly read the files after mounting them locally. If you don’t have a NAS, mounting the network disk locally is a good solution for insufficient storage space.

Mounting to the local network disk played its due role, and the speed of the Alibaba cloud disk really surprised me. After mounting the 100G video file locally, the playback was very smooth, not only on the computer, but also on the computer. The effect of hanging the Alibaba Cloud disk on Plex is also very good. The reading speed is not much different from that of local files, and the original picture can be played directly. The response of dragging the progress bar is also very fast. I highly recommend everyone to try it.

Let me take macOS as an example to share with you the operation process of mounting the Alibaba Cloud disk to the local.

First of all, we need to mount the Aliyun disk to AList .

1. Install AList

1.1. Please download the latest version of the compressed package from the " Releases " page of the GitHub project of AList. For macOS users, please download "alist-darwin-amd64.tar.gz (Intel chip)" or "alist-darwin-arm64.tar.gz ( M-series chips)".

1.2. After the download is complete, please unzip the file, you will get a Unix executable file of "alist", please move the file to a suitable location. For example, create a new "AList" folder in the application, and move the "alist" executable file into this folder.

1.3. Right-click the folder and select "Services - New Terminal Window at Folder Location".

1.4. Enter "chmod +x alist" in the terminal window and press Enter.

1.5. Enter "touch start.command" and press Enter, and a new "start.command" file will be added in the folder.

1.6. Type "chmod 777 start.command" and press Enter.

1.7. Right-click the "start.command" file and select "Open with - Text Editing", enter "#!/bin/bash", and enter "cd /Applications/AList" in a blank line (the folder where the "alist" executable file is located Path), enter "nohup ./alist server &" in a blank line, save and close the file.

1.8. Double-click to open "start.command", and "the process has been completed" appears, as shown in the figure below, which means the operation is successful. After closing the window, the "alist" process will run in the background. Restart the computer or turn it off and then turn it on again to run it again "start.command" starts "AList", you can drag "start.command" to the quick launch bar and lock it in the dock. (I will introduce how to set up automatic startup after booting)

1.9. Open the previous terminal window. If it is closed, right-click the folder where "alist" is located and select "Services - New Terminal Window at Folder Location", and then enter "./alist admin" to obtain the administrator account and password.

2. Configure AList

2.1. Next, please open the browser to enter the "alist" login page through the IP address of the machine and the port "http://ip:5244", and log in with the administrator account and password.

2.2. After logging in, you can change the password on the "Update Configuration File" page, or you can not change it. If you change the password, please click Save.

2.3. Click the "Storage" tab, click "Add", and select "Alibaba Cloud Disk Open", which is accessed using the officially authorized API.

2.4. Next, please open " Get Aliyundrive Refresh Token " in a new window to obtain the refresh token of Aliyun drive. You can log in to your Aliyun drive account or scan the QR code with the Aliyun drive mobile APP to obtain the refresh token. Please copy the refresh token Card.

2.5. Go back to the "Alibaba Cloud Disk Open" setting page, paste the refresh token on the "Refresh Token" at the bottom of the page, and set the mount path, which is the name of the Alibaba Cloud disk folder displayed locally, in the format of " /Name", other parameters do not need to be changed, click "Add".

2.6. In this way, the Alibaba Cloud disk has been mounted successfully, and you can access your Alibaba Cloud disk by clicking the "Home Page" on the left. If you want to continue to add other network disks, you can refer to the official guide . If you have any questions about the operation of "Alibaba Cloud Disk Open", you can also refer to the official instructions.

3. Mount to other software

If you are an Infuse user, you can directly add the video content in the network disk to the Infuse media library through AList. In Infuse, click "File-New File Source-Add WebDAV", refer to the input in the figure below For your own AList related information, click "Add" to connect successfully.

In fact, you can use the player or software that supports WebDav on any platform to mount the resources on the AList through the above settings. Find and add WebDav in the software and add them according to the above settings. The supported software is as follows .

Windows:Potplayer,Kmplayer,RaiDrive,Kodi,OneCommander,Mountain Duck,Netdrive,RCLONE

macOS:IINA,Mountain Duck,Infuse,Netdrive,RCLONE

Linux:Davfs2,RCLONE

iOS:Nplayer,Kmplayer,Infuse,Fileball

Android:Nplayer,Kmplayer,ES文件管理器,Kodi,Nova魔改,Rexx,cx 文件管理器,Solid Expore

TV:Nplayer,Kodi,Nova魔改

如果你想在一些不支持 WebDav 的软件里添加 AList 上的资源,比如 Plex、Emby、Jellyfin,或者想通过访达/文件资源管理器直接访问网盘,那你就需要把 AList 挂载到本地。

在 Windows 上可以使用 RaiDrive 挂载,操作和上面的方式基本一致,或者使用 CloudDrive2 等其他软件进行挂载;macOS 上要稍微复杂一些,需要使用 RCLONE 把 AList 挂载到本地,下面分享一下具体操作。

首先是安装 RCLONE,我通过官方的命令无法正常安装使用,所以要通过以下方式进行安装。

4. 安装 RCLONE

4.1. 请在 RCLONE 官网下载对应版本的文件,解压后你会得到一个文件夹,里面有若干文件。

4.2. 请右击该文件夹选择「服务 - 新建位于文件夹位置的终端窗口」,在终端中输入「/bin/bash -c "$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)"」按回车,输入管理员密码按回车,出现「请按回车键(RETURN)继续安装,按其他任意按键取消安装」后再按回车,提示 Homebrew 安装成功进入下一步。

4.3. 在终端中输入「brew install --cask macfuse」按回车,稍等片刻会自动进行安装,中途会要求输入管理员密码,输入密码后按回车,将会提示你「macfuse was successfully installed!」,如果安装失败可能需要进入「系统偏好设置」修改「安全性与隐私设置」后再试。

4.4. 在终端中输入「sudo cp rclone /usr/local/bin」按回车,输入管理员密码按回车。

5. 配置 RCLONE

5.1. 在终端中输入「rclone config」按回车,进入配置选项。

5.2. 输入「n」按回车,创建一个新的远程。

5.3. 输入「远程名称」按回车,也就相当于要把 AList 挂到本地变成本地硬盘,给这个硬盘起个名字,自定义,后续可修改。

5.4. 输入「46」按回车,这一步是选择存储类型,输入「WebDAV」前面的序号,应该是 46,如果你的 46 不是「WebDAV」请输入「WebDAV」的序号。

5.5. 输入「http://ip:5244/dav」按回车,这一步是输入 AList 的 WebDAV 地址,也就是 AList 安装设备的 IP 地址加端口/dav。

5.6. 输入「5」按回车。

5.7. 输入 AList 管理员账号按回车。

5.8. 输入「y」按回车。

5.9. 输入 AList 管理员密码按回车,再次输入密码按回车。

5.10. 接下来的三个项目都直接按回车保持默认设置。

5.11. 输入「q」退出配置。

6. 挂载阿里云盘到本地

6.1. 在终端输入「mkdir 本地挂载路径」按回车,创建挂载到本地的目录。例如「mkdir /Users/x1ao4/Media」意思是会将 AList 挂载至本地用户 x1ao4 目录下的 Media 文件夹上,最后一级的文件夹就是我们要创建的文件夹,所以要保证同级内没有这个名字的文件夹。请设置一个合适位置,今后比如 Plex 之类的要添加网盘资源就要使用这个地址。

6.2. 在终端输入「rclone mount 远程名称:/ 本地挂载路径 --cache-dir /tmp --allow-other --vfs-cache-mode writes --header "Referer:https://www.aliyundrive.com/drive"」按回车,阿里云盘就成功挂载到本地了。

7. 本地访问和调用

现在你就可以通过访达在以下位置访问阿里云盘了,可以在此直接对阿里云盘进行管理,包括上传文件和下载文件,本地挂载的阿里云盘和网络上的阿里云盘会自动同步文件,你现在就可以使用本地应用程序直接调用阿里云盘的上的文件了。

要注意的是,我在 6.1. 这个步骤创建了一个名叫 Media 的文件夹用于挂载 AList,挂载成功后在 macOS 系统中这个文件夹会显示为 x1ao4,也就是我设置的远程名称,文件夹图标会变为 macFUSE 盘符,但在 Plex 中添加挂在 AList 上的网盘资源时目录会显示 Media 也就是自己设置的文件夹名称。

如此我们就可以像使用本地文件一样使用阿里云盘上的文件了,如果你还想挂载其他网盘也可以查看 AList 和 RCLONE 的相关说明,进行设置。

注意

使用本教程操作需要先在电脑上安装最新版的 Python;需要设置 macOS 允许安装任何来源的应用,若未设置请在终端输入「sudo spctl --master-disable」,再输入电脑密码按回车即可;操作过程中有些步骤可能会提示需要授权,请一律选择允许。

Guess you like

Origin blog.csdn.net/u010567698/article/details/129434634