Connect “OneDrive for Business” with Rclone on Linux VPS


Rclone is a command line program to sync files and directories to and from kinds of cloud file storage and synchronization service.

Since 12th September 2017, the Rclone have supported the “OneDrive for Business” and covered the main cloud storages. Thanks to the developers!
I will introduce how to config the “OneDrive for Business”, that need to authorize by browser, on the command line interface.
There are two method to finish the process.

  1. Configure on local machine first and copy the config file to vps.
    The path of config file on Windows:C:\Users\***\.config\rclone\rclone.conf
    The path of config file on Linux:~/.config/rclone/rclone.conf
  2. Use the Ngrok to forward the traffic of local port, that is listened to rclone.

    Install Rclone

    Set Up Ngrok

    The Rclone will listen the 53682 port when configuring the “OneDrive for Business”. After run the commands, you can see the ngrok link have forwarded the 53682 port. Record the ngrok link. Press Ctrl+A+D to quit the “screen” or open a new terminal.

    Rclone Config

    Follow the steps until “Waiting for code…”.


    You can get the authorization link “http://127.0.0.1:53682/auth”.
    Change “127.0.0.1:53682” to “b16e00cf.ngrok.io”, that forwards the local port “53682“.
    Visit the “http://b16e00cf.ngrok.io/auth”. Login the office 365 account and authorize. You can get the responce link like this:

    Also, Change “127.0.0.1:53682” to “b16e00cf.ngrok.io”. Visit the changed link on browser to finish authorization.

One Reply to “Connect “OneDrive for Business” with Rclone on Linux VPS”

Leave a Reply

Your email address will not be published. Required fields are marked *