Mount OneDrive in Windows with Rclone

Mount OneDrive as a drive in Windows with Rclone.

Rclone allows us to mount cloud storage in our system, either as a drive or in a folder. This way we can access the cloud storage like a network drive, without the official client and without synchronisation. Rclone is available for different operating systems, so for example OneDrive can be used in Linux.

In this article, we will look at how we can use Rclone on Windows as well.

Video description

Download Rclone

Let’s start with the download. The Windows version comes as a ZIP archive, which we simply have to unpack. In the folder we then find the “rclone.exe”.

Configuring cloud storage in Rclone

We type “cmd” in the Explorer address bar. This opens a command prompt, using “rclone.exe” we start Rclone. A text menu appears. Here we select “n” for “New remote”.

In the first step we enter a name, e.g. “onedrive”. We will need this name later for access and integration into the system.

A long list of supported cloud storages follows. In principle, we can access all cloud storages with rank and name, also Google Drive, Seafile, HiDrive and other cloud services are supported. The basic procedure is the same.

We enter “31”, for “Microsoft OneDrive”.

This is followed by a query for the “client_id” and the “client_secret”. Good for us, we don’t have to enter anything here and confirm both with Enter.

We are then asked where our data is clouded. Here, we simply enter “1” for the region.

Fortunately, we can also simply answer the query for the advanced configuration with “n”, i.e. No. Then the authentication takes place, here we confirm with “Yes”. This opens a browser window. Here we may have to log in to OneDrive to authorise Rclone access.

Once this is done, we enter a “1” for “OneDrive Personal or Business” in “config_type”.

Rclone now suggests the “drives” it has found. Only one entry should appear here, which we confirm with “1”.

Two more confirmations follow, which we confirm twice with “Yes”.

Done! The configuration is now created and appears under “Current remotes” when “rclone.exe” is started.

Integrating OneDrive into Windows with Rclone

The configuration is now created, for access we now need to mount OneDrive. This can be done with one of the following commands:

rclone --vfs-cache-mode writes mount onedrive: *
rclone --vfs-cache-mode writes mount onedrive: X:

The first variant mounts the cloud storage under a free drive letter. The second variant under the default. In this case, “onedrive” is the name we assigned in the configuration.

OneDrive is then available in the new drive. With CTRL-C we can cancel the command in the command prompt, the drive is then disconnected.

It is best to put the command in a batch file so that the long command does not have to be entered each time.

Mount OneDrive in folder

Besides mounting it as a drive, we can also specify a folder:

rclone --vfs-cache-mode writes mount onedrive: C:\_temp\

In this case, OneDrive is mounted below the specified folder.

Conclusion

As we have seen, Rclone is a perfect way to integrate cloud storage into the system. In principle, we don’t need a client. Local storage is also not used, as no files are synchronised locally. Of course, this only works if we also have internet.

The method also works with other cloud systems, only the configuration steps differ slightly.

14 comments

  1. Thanks, very useful tutorial. Just a few comments:
    – you did not mention that WinFsp needs to be installed first
    – for an inexperienced user (like myself πŸ˜‰ it would be helpful to explain what you need to do with the Cmd window after the message “The service rclone has been started”. Should you just close the window, or will this end the rclone service?
    – if you put the mount command in a batchfile, shouldn’t you put the full path to rclone in the command?

    1. Thanks for your feedback. You are right about the things you mentioned. For the WinFsp thing, I had this already installed somehow and did not know that this was also required. Will do better! πŸ™‚

  2. useful information, the problem is i am not able to make it run in the background with a bat file to start the gui and mount the drive at system startup.
    I have tried different techniques like using nssm or powershell script, but the mount is not working while using these. It works fine when i run my batch file directly, the only problem i see annoying command prompt. can you create a tutorial to show how i can setup auto start the gui and auto mount onedrive when system reboot, all done in background ?
    Also would appreciate if you can do a tutorial on using this rclone to mount onedrive and use it with portainer and nextcloud. Thanks!

  3. Hi, Tanks for the video!
    I have one problem trying to mount:
    ‘cannot find winfsp’:
    —————————————
    C:\Users\berts\Downloads\rclone-v1.64.0-windows-amd64\rclone-v1.64.0-windows-amd64>rclone –vfs-cache-mode writes mount onedrive: *
    2023/09/17 11:27:52 NOTICE: Assigning drive letter “Y:”
    2023/09/17 11:27:52 Fatal error: failed to mount FUSE fs: mount stopped before calling Init: mount failed: cgofuse: cannot find winfsp
    ———————————————–
    So what’s missing?

  4. Good morning, thanks for the video and this blog where to ask questions, I hope you can help me even if 2 years have passed. I followed several guides on Rclone, even in Italian, I also used the web-gui, but I always get the same error. I can create the link with OneDrive but when I try to mount it it always gives me the same error, I tried from the command line and using the “rclone rcd -rc–web-gui”, the result is always the same error:

    “C:\Programmi portable\rclone>rclone –vfs-cache-mode writes mount PortatileHP: X:
    2025/03/08 07:53:32 ERROR : symlinks not supported without the –links flag: /
    The service rclone has been started.”

    I have already installed WinFSP, but it doesn’t change the error, I read on rclone that the error could be because you have to give it the flag: / ” –network-mode, so I gave the command, “rclone –vfs-cache-mode writes mount HP Laptop: X: –network-mode”, but it returns the same error. If you can help me I would be grateful and sorry for my terrible English.

    1. Sorry the command line is

      rclone –vfs-cache-mode writes mount PortatileHP: X: –network-mode

      Google translated even what it shouldn’t have

    2. Hi Gio, it looks like Rclone is complaining about symlinks. Try adding the `–links` flag to your command like this:

      “`
      rclone –vfs-cache-mode writes mount PortatileHP: X: –network-mode –links
      “`

      If that doesn’t work, try mounting to a folder instead of a drive letter:

      “`
      rclone –vfs-cache-mode writes mount PortatileHP: C:\RcloneMount –links
      “`

      Also, make sure WinFSP is properly installed and run the command with `-vv` for more details. Hope this helps! πŸš€

      1. Ciao, thanks for the reply, I copied and pasted, but it gives me this error. Is it the wrong syntax?

        C:\Programmi portable\rclone>rclone -vfs-cache-mode writes mount PortatileHP: X: -network-mode -links
        Error: unknown command “writes” for “rclone”
        Run ‘rclone –help’ for usage.
        You could use ‘rclone selfupdate’ to get latest features.

        2025/03/09 18:39:20 NOTICE: Fatal error: unknown command “writes” for “rclone”

        C:\Programmi portable\rclone>

        1. I also tried to use the GUI but the error is the same, for the gui it is mounted but the prompt gives this error:

          C:\Programmi portable\rclone>rclone rcd –rc-web-gui
          2025/03/09 19:06:05 NOTICE: Web GUI exists. Update skipped.
          2025/03/09 19:06:05 NOTICE: Serving Web GUI
          2025/03/09 19:06:05 NOTICE: Serving remote control on http://127.0.0.1:5572/
          2025/03/09 19:15:39 ERROR : symlinks not supported without the –links flag: /
          The service rclone has been started.

          In the gui there are many parameters that I could change but I don’t know what to change except the Cache mode in full

          1. Hi, finally solved the problem, your command line was not completely wrong, but writing here in the blog the syntax is changed by the blog formatting. This is the command that works for me:

            rclone mount onedrive: x: –vfs-cache-mode full –links

      1. Good morning, no I’m just an enthusiast who tries to make the most of technologies. Being able to access cloud space directly from explorer, without logging in is very convenient. Furthermore, we all have different emails and we do not consider all the cloud space made available for free but not used. It would be interesting to be able to unite multiple cloud spaces into a single one that automatically manages large files (like a backup), dividing it into parts or segments like P2P automatically, without user intervention.

Leave a Reply to Talha Cancel reply

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