《群晖》Rclone 安装配置教程 - 连接 OneDrive
不悔过去_不畏将来
编辑于 2022年04月14日 13:56

前言

Rclone 是一个的命令行工具,支持在不同对象存储、网盘间同步、上传、下载数据。并且通过一些设置可以实现离线下载、服务器备份等非常实用的功能。这里以OneDrive为例子,进行连接配置,其它网盘的操作类似。由于是交互式配置选项,只要能看懂基本没有任何难度。

安装 Rclone

官方提供了一键安装脚本:

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

配置 Rclone

因为 RCLONE 会时不时进行更新,当你看到这篇教程时菜单选项可能已经发生了略微的改动,但大致思路不会变,不要无脑照搬操作

第一步:配置 config rclone

交互式配置选项

第二部:选择新建,起名字,这个随意填写

第四步:选择存储类型,根据实际情况选择

1 / 1Fichier

   \ (fichier)

 2 / Akamai NetStorage

   \ (netstorage)

 3 / Alias for an existing remote

   \ (alias)

 4 / Amazon Drive

   \ (amazon cloud drive)

 5 / Amazon S3 Compliant Storage Providers including AWS, Alibaba, Ceph, Digital Ocean, Dreamhost, IBM COS, Lyve Cloud, Minio, RackCorp, SeaweedFS, and Tencent COS

   \ (s3)

 6 / Backblaze B2

   \ (b2)

 7 / Better checksums for other remotes

   \ (hasher)

 8 / Box

   \ (box)

 9 / Cache a remote

   \ (cache)

10 / Citrix Sharefile

   \ (sharefile)

11 / Compress a remote

   \ (compress)

12 / Dropbox

   \ (dropbox)

13 / Encrypt/Decrypt a remote

   \ (crypt)

14 / Enterprise File Fabric

   \ (filefabric)

15 / FTP Connection

   \ (ftp)

16 / Google Cloud Storage (this is not Google Drive)

   \ (google cloud storage)

17 / Google Drive

   \ (drive)

18 / Google Photos

   \ (google photos)

19 / Hadoop distributed file system

   \ (hdfs)

20 / Hubic

   \ (hubic)

21 / In memory object storage system.

   \ (memory)

22 / Jottacloud

   \ (jottacloud)

23 / Koofr, Digi Storage and other Koofr-compatible storage providers

   \ (koofr)

24 / Local Disk

   \ (local)

25 / Mail.ru Cloud

   \ (mailru)

26 / Mega

   \ (mega)

27 / Microsoft Azure Blob Storage

   \ (azureblob)

28 / Microsoft OneDrive

   \ (onedrive)

29 / OpenDrive

   \ (opendrive)

30 / OpenStack Swift (Rackspace Cloud Files, Memset Memstore, OVH)

   \ (swift)

31 / Pcloud

   \ (pcloud)

32 / Put.io

   \ (putio)

33 / QingCloud Object Storage

   \ (qingstor)

34 / SSH/SFTP Connection

   \ (sftp)

35 / Sia Decentralized Cloud

   \ (sia)

36 / Storj Decentralized Cloud Storage

   \ (storj)

37 / Sugarsync

   \ (sugarsync)

38 / Transparently chunk/split large files

   \ (chunker)

39 / Union merges the contents of several upstream fs

   \ (union)

40 / Uptobox

   \ (uptobox)

41 / Webdav

   \ (webdav)

42 / Yandex Disk

   \ (yandex)

43 / Zoho

   \ (zoho)

44 / http Connection

   \ (http)

45 / premiumize.me

   \ (premiumizeme)

46 / seafile

   \ (seafile)

第五步:填写Client ID,Client secret

OneDrive API​

第六步:选择地区

第七步使用默认配置,选择N

第八步:选择获取token方式,选择N

第九步:输入token,电脑上获取,下方有教程

第十步:选择类型

第十一步:确认网盘

第十二步:确认设置,选择Y

设置完成!

获取 token

https://rclone.org/downloads/

在本地 Win­dows 电脑上下载 Rclone,然后解压出来,解压后进入文件夹,在资源管理器地址栏输入 ,回车就会在当前路径打开命令提示符。输入以下命令:

自行替换"Client_ID&#​34; "Client_secret&#​34;

rclone authorize "onedrive&#​34; "Client_ID&#​34; "Client_secret&#​34;

接下来会弹出浏览器,要求你登录账号进行授权。授权完后命令提示符窗口会出现以下信息:

复制token,去第九步粘贴

群晖设置

  • 配置自动挂载脚本

下载地址https://www.aliyundrive.com/s/KsKwyJfgqUv

上传到群晖任意文件夹

  • 修改配置文件

REMOTE=Rclone第二步名称

LOCAL=需要挂载到的群晖文件夹

  • 创建挂载文件夹

  • 创建计划任务,运行命令填写自己脚本所在位置

  • 运行一次任务

  • 查看文件

结束!可以去媒体库挂载了