Print this article Edit this article

Using rclone

These instructions follow the instructions from linuxuprising.com

It is replicated here in case that page ever goes away.

This assumes you are using your Purdue OneDrive, but the steps are still valid for other OneDrive accounts.

  1. Install rclone
    1. rclone should already be installed on all Purdue IT-supported Linux hosts.
    2. If it is not, https://engineering.purdue.edu/support
  2. Add a new OneDrive remote to rclone
    1. Run rclone config
      1. Any existing remotes will be listed along with a list of other actions
      2. Enter n to create a new remote
      3. You will be prompted for the name of the new remote. OneDrive should work
      4. Now the type of storage to configure is chosen
        1. Look through the list for the number next to "Microsoft OneDrive."
        2. Enter that number and hit enter
        3. You can enter without entering any information for the next two options
          1. There is no need to enter the Microsoft App Client ID or Secret
        4. Say n (no) to edit advanced config
        5. For autoconfig, most folks can select y (yes)
        6. This should open a tab in your default browser.
          1. This is asking you to give rclone access to your OneDrive account. Allow it and close the tab.
        7. Enter the account type, 1 (one, or whatever OneDrive Personal or Business)
        8. You will then say the accounts listed. The first choice, 0 (zero, typically), is what you want to enter
        9. You should see something like below, enter y (yes)
          Found drive 'root' of type 'personal', URL: https://onedrive.live.com/?cid=0f119f51f000000
          Is that okay?
          y) Yes
          n) No
          y/n> y
        10. Then something like below is shown (tokens and other info for your OneDrive configuration):
          [onedrive]
          type = onedrive
          token = {"access_token":"GoKSt5YMioiuCWX1KOuo8QT0Fwy+Y6ZeX7M","token_type":"bearer","refresh_token":"7OMvoEAO3l*8BbhS2AMxpTbJW0Y6np9cdql!bwEdYAhJ6XBG0tnR0UK","expiry":"2018-07-26T15:15:13.696368366+03:00"}
          drive_id = f119f51f0a00000
          drive_type = personal
          --------------------
          y) Yes this is OK
          e) Edit this remote
          d) Delete this remote
          y/e/d> y
        11. Finally, enter q (quit) to exit rclone
  3. Create a folder. OneDrive works
    1. This folder needs to be on a file system that is "local" to the host you are on
  4. Mount OneDrive
    rclone --vfs-cache-mode writes mount onedrive: ./OneDrive

    1. If you get an error about write access or problems with permissions, then submit a support request.
  5. Now the folder acts like a folder that contains your OneDrive contents.
  6. When you are done, you can Ctrl-C in the terminal/window you ran the rclone command to unmount OneDrive

Last Modified: Nov 26, 2025 11:24 am US/Eastern
Created: Dec 13, 2022 9:50 am US/Eastern by gizmo
JumpURL: