$ rclone config 2026/05/12 03:07:56 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>
Option client_id. OAuth Client Id. Leave blank normally. Enter a value. Press Enter to leave empty. client_id>
Option client_secret. OAuth Client Secret. Leave blank normally. Enter a value. Press Enter to leave empty. client_secret>
Option region. Choose national cloud region for OneDrive. Choose a number from below, or type in your own string value. Press Enter for the default (global). 1 / Microsoft Cloud Global \ (global) 2 / Microsoft Cloud for US Government \ (us) 3 / Microsoft Cloud Germany \ (de) 4 / Azure and Office 365 operated by Vnet Group in China \ (cn) region> 1
client_id 和 client_id 留空。region 选择 1
1 2 3 4 5 6 7
Use auto config? * Say Y if not sure * Say N if you are working on a remote or headless machine
y) Yes (default) n) No y/n>
这里选择n,因为服务器上没办法完成这步骤授权
获取 access_token
1 2 3 4 5 6 7 8 9 10
Option config_token. For this to work, you will need rclone available on a machine that has a web browser available. For more help and alternate methods see: https://rclone.org/remote_setup/ Execute the following on the machine with the web browser (same rclone version recommended): rclone authorize "onedrive" Then paste the result. Enter a value. config_token>
auto config 选择 no 后,服务器交互会停止在让你输入 config_token 的步骤。 请找一个能打开浏览器能互动的PC,再次下次rclone。比如我在用Windows,就下载rclone的exe版本。 也需要打开终端,运行rclone authorize "onedrive"。
浏览器会自动被打开,然后会弹出微软的Oauth的登录界面,登录你的MS账户。
1 2 3 4 5 6 7 8 9 10
PS C:\Users\ame\Desktop\rclone-v1.72.0-windows-amd64> ./rclone authorize "onedrive" 2026/05/12 03:18:12 NOTICE: Config file "C:\\Users\\ame\\AppData\\Roaming\\rclone\\rclone.conf" not found - using defaults 2026/05/12 03:18:12 NOTICE: Make sure your Redirect URL is set to "http://localhost:53682/" in your custom config. 2026/05/12 03:18:12 NOTICE: If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth?state=ABCD-TEST-2333 2026/05/12 03:18:12 NOTICE: Log in and authorize rclone for access 2026/05/12 03:18:12 NOTICE: Waiting for code... 2026/05/12 03:19:17 NOTICE: Got code Paste the following into your remote machine ---> {"access_token":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","expiry":"2026-05-12T04:19:17.8699885+08:00","expires_in":3599} <---End paste
Option config_type. Type of connection Choose a number from below, or type in an existing string value. Press Enter for the default (onedrive). 1 / OneDrive Personal or Business \ (onedrive) 2 / Root Sharepoint site \ (sharepoint) / Sharepoint site name or URL 3 | E.g. mysite or https://contoso.sharepoint.com/sites/mysite \ (url) 4 / Search for a Sharepoint site \ (search) 5 / Type in driveID (advanced) \ (driveid) 6 / Type in SiteID (advanced) \ (siteid) / Sharepoint server-relative path (advanced) 7 | E.g. /teams/hr \ (path) config_type>
选择config_type,我这里选择1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Select drive you want to use Choose a number from below, or type in your own string value. Press Enter for the default (b!dMIrcdg7R0aKl4ZLqlcvdFEjzBS_SqNJod05zHQSsZ7QnBRAAAAAAA. 1 / AAAAAAA-CFF8-4E2A-89C6-03841FF83500 (personal) \ (b!dMIrcdg7R0aKl4ZLqlcvdFEjzBS_SqNJod05zHQSsZ7QnBRIkcAAAAAAA) 2 / AAAAAAA-d5e3-4e02-ab10-ae3d0d18680d (personal) \ (b!dMIrcdg7R0aKl4ZLqlcvdFEjzBS_SqNJod05zHQSsZ47DFLSyAAAAAAA) 3 / ODCMetadataArchive (personal) \ (b!dMIrcdg7R0aKl4ZLqlcvdFEjzBS_SqNJod05zHQSsZ5pnriJhAAAAAAA) 4 / Bundles_AAAAAAAAAAAAAAAAAAAAAAAAAAAA (personal) \ (AAAAAAAC93F75) 5 / AAAAAAA-AAAAAAA-45F9-BF47-A403283F090E (personal) \ (b!dMIrcdg7R0aKl4ZLqlcvdFEjzBS_SqNJod05zHQSsZ5tm5VAAAAAAA) 6 / OneDrive (personal) \ (AAAAAAAC93F75) config_driveid>