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> n name> remote Type of storage to configure. Enter a string value. Press Enter for the default (""). Choose a number from below, or typein your own value [snip] XX / Microsoft OneDrive \ "onedrive" [snip] Storage> onedrive Microsoft App Client Id Leave blank normally. Enter a string value. Press Enter for the default (""). client_id> Microsoft App Client Secret Leave blank normally. Enter a string value. Press Enter for the default (""). client_secret> Edit advanced config? (y/n) y) Yes n) No y/n> n Remote config Use web browser to automatically authenticate rclone with remote? * Say Y if the machine running rclone has a web browser you can use * Say N if running rclone on a (remote) machine without web browser access If not sure try Y. If Y failed, try N. y) Yes n) No y/n> y If your browser doesn't open automatically go to the following link: http://127.0.0.1:53682/auth Log in and authorize rclone for access Waiting for code... Got code Choose a number from below, or type in an existing value 1 / OneDrive Personal or Business \ "onedrive" 2 / Sharepoint site \ "sharepoint" 3 / Type in driveID \ "driveid" 4 / Type in SiteID \ "siteid" 5 / Search a Sharepoint site \ "search" Your choice> 1 Found 1 drives, please select the one you want to use: 0: OneDrive (business) id=b!Eqwertyuiopasdfghjklzxcvbnm-7mnbvcxzlkjhgfdsapoiuytrewqk Chose drive to use:> 0 Found drive 'root' of type 'business', URL: https://org-my.sharepoint.com/personal/you/Documents Is that okay? y) Yes n) No y/n> y Configuration complete. Options: - type: onedrive - token: {"access_token":"youraccesstoken","token_type":"Bearer","refresh_token":"yourrefreshtoken","expiry":"2018-08-26T22:39:52.486512262+08:00"} - drive_id: b!Eqwertyuiopasdfghjklzxcvbnm-7mnbvcxzlkjhgfdsapoiuytrewqk - drive_type: business Keep this "remote" remote? y) Yes this is OK e) Edit this remote d) Delete this remote y/e/d> y
But if you are installing rclone with OneDriver on ==headless linux server==, you should select n when:
1 2 3 4 5 6 7 8
Remote config Use web browser to automatically authenticate rclone with remote? * Say Y if the machine running rclone has a web browser you can use * Say N if running rclone on a (remote) machine without web browser access If not sure try Y. If Y failed, try N. y) Yes n) No y/n> y
Now, we need a windows computer help us get config token.
Before that, we need install rclone on windows which can use browser.
Option config_type. Type of connection Choose a number from below, or typein an existing value of type string. 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> 1
Option config_driveid. Select drive you want to use Choose a number from below, or typein your own value of type string. Press Enter for the default (94b3d7066fdb10b3). 1 / Bundles_b896e2bb7ca3447691823a44c4ad6ad7 (personal) \ (94b3d7066fdb10b3) 2 / AEEE102E-CFF8-4E2A-89C6-03841FF83500 (personal) \ (b!pALVwCCiEUqNVLynOJWVtiMGN3t1SRxMkEIHYRLVtsaQj5_SK3paRrsGeJjPpvSl) 3 / ODCMetadataArchive (personal) \ (b!pALVwCCiEUqNVLynOJWVtiMGN3t1SRxMkEIHYRLVtsZzzB5vh4uASoakiF1vk10V) 4 / OneDrive (personal) \ (94b3d7066fdb10b3) config_driveid> 4
Drive OK?
Found drive "root" of type"personal" URL: https://onedrive.live.com?cid=94b3d7066fdb10b3&id=01GSBVAON6Y2GOVW7725BZO354PWSELRRZ
y) Yes (default) n) No y/n>
Configuration complete. Options: - type: onedrive - token: {"access_token":"EwCIA8l6BAAUbDba3x2OMJElkF7gJ4z/VbCPEz0AAYzr4oaYb+yMnu8OTvRanPD3ToasCjOnPYJ+AHhQPLy6CDTE5qzgwMmMQ/nmh+xp+g6wP59aHaUAS4wTCZNA9d7fxwgsMsenARUbOZw8OfW0gYQA2i6CQHOcDu4Ca/8PsDBkDzeiI7hTJ6p/qegz6bv8vwKqS/MkZGvz/J2VbsF5HR+EdUSe5+9qK7kjOxHCUdISI0UvqO2tCNLJLmqFJKLHXjXEAuZ1uTo6eM22p5RCKTf5QZ3HXPcX2JNfgXcHvcLj+Fr6wSseEFtJ4TinbOWR9T71weM6oVZn9J5T9n4+kIfA0bsSxmOOL8uhTVOYZtnZuGmG98GXVqW0uyue9RMQZgAAEGohj9BRbICWcxBaiD/VB4dQAsSo6t++izhA1/cSbJ8y9E8ANYWv8FsGXKX8z1Gi8J1zPkjADBOzZnPYonj1APV3NPA5DSzhwExuGaLJVjVp0D2DEyH17O9nQeN2YdAC8MotgevQyBSmxK7KQpclxIoclxR5i0x3exDv+KgWzXlceNmvur074B8BMIkcrchSV89IQUGmY2BpPZ0HfsQcp5ra5dAtjjfIHV8Q/qMjrUpcHw1FUjMcVhK77jWen":"M.C549_SN1.0.U.-CiB2Q6Y0P2A748IEQCufqBUbByQ5MuCCehG3oXgXMykwr!SwoRRbAsTZu84cgP8FAcnTiy36uNBFJGeCxZT65xX!nomA4ePgIVpIQQLEUfjG01WsbLbFWOVUdfq1LyGuqtpl!R2DCcroJcS4X0QqZ0AO!ux9MgYdjt3Ann7foEX1IanadhTZJw6rclTUsNv4UDG!BfTDEL4ED9YfSflRXoYxwdlyYV8VyLcLt!6H!5L28U3EzuGStpnelVSPvWF9!jo5OT1XsHxYK*LLJrCWG!MKoKhMrrEx9G0m3RFkX0PtlmVGcW4fV5JxwktIQemW41Re81OnATtb9Ftk4a5TnsIdbz!nAPuW7nfHsOo9DSpA","expiry":"2025-01-09T03:37:56.2087052+08:00"} - drive_id: 94b3d7066fdb10b3 - drive_type: personal Keep this "onedriver" remote? y) Yes this is OK (default) e) Edit this remote d) Delete this remote y/e/d>
Current remotes:
Name Type ==== ==== onedriver onedrive
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
3. Mount OneDriver to your local folder
1
(base) root@cc2:~$ rclone mount onedriver: ./onedriver/ --vfs-cache-mode writes &
==NOTE:== If you encountered the problem:
1
2025/01/08 09:46:26 Fatal error: failed to mount FUSE fs: fusermount: exec: "fusermount": executable file not found in$PATH
You should check your PATH
1 2 3 4 5
(base) root@cc2:~# which fusermount /usr/bin/fusermount (base) root@cc2:~# which fusermount3 /usr/bin/fusermount3 (base) root@cc2:~#