Using rclone to access MS OneDrive and cloud storage

Last modified by Xwiki VePa on 2024/02/14 09:29

At the moment setting up this configuration from the University Menu is not working. A fix is on the way. 

A fix has now been deployed and the shortcut from the University Menu should work.

If not, let us know via Helpdesk. You can also set this up with these instructions Rclone-MS OneDrive


Rclone is a open source software tool which can be used to access most cloud storage systems, including OneDrive. Rclone is installed by default in all Cubbli Linuxes (later than 18.04. If you have an older installation, you should upgrade). OneDrive cloud storage will work on any network. No VPN is needed. 

University of Helsinki Office365 subscription has 1T of OneDrive storage available by default to all UH users. Helsinki University OneDrive storage can be accessed by University admins. Store all private data in a folder named private. Consider using encryption. More details about University OneDrive is available from Helpdesk. 

OneDrive access with Cubbli

You can use the University menu to configure and access OneDrive in Cubbli. In VDI and Classroom Cubbli hosts you need to the configuration only once:

Select OneDrive from University menu:

image2020-3-26_11-9-37.png

Select Yes to configure OneDrive access.image2020-3-26_11-14-9.png

You need to login with your ad.helsinki.fi account.

image2020-3-26_11-27-4.png

If you don't at first succeed, try again!

image2020-3-26_11-28-53.png

Success!

image2020-3-26_11-32-2.png

Access OneDrive and create the Private folder.

image2020-3-26_11-34-36.png


Boring technical details about the configuration:

  • The script will mount OneDrive at path /run/user/[your uid number]/rclone/onedrive-uh/
  • The path will stay the same. You can use symlinks to create shortcuts there.
  • You can access the directory from command line, just like any other directories. Reading and writing files might be slow though, depending on network conditions and OneDrive load.
  • This is a fuse mount with rclone's mount command and full caching (--cache-mode-full)
  • You can unmount OneDrive with cubbli-rclone-setup umount
  • It is safe to leave the mount on.

If rclone stops working / the shortcut opens an empty folder with nothing in it

  • This might be because the MFA has expired and you need to run the setup again for it to get authenticated
# Run this in a terminal and select "Yes" when prompted.
$ cubbli-rclone-setup setup-onedrive


Using Rclone

You can set up other rclone remotes as you wish and you don't need to use the Cubbli Rclone configuration script. Remember that rclone mounts probably won't work under your AD home directory, so use a temporary directory for them.  Please consult the rclone documentation.