EVERYTHING IS POSSIBLE
Taking advantage of the fact that I have been asked if there is a OneDrive business client or a way to connect from Linux without a web, I have decided to make the following tutorial.
There is no client as such but the answer is Yes, and not just OneDrive, we can set up cloud storage from many providers thanks to the rclone tool which for my part deserves a big THANK YOU because it has everything and for free, since it is normal to find paid products that only serve for a specific cloud storage.
This tool can be found in its web rclone.org where it is also very well documented, it also has a GUI that I don’t particularly use although I do test it from time to time to see if they have done more development, but it may be useful to many people.
Well, as you will see below, its installation is very simple:
We download the corresponding package according to the distro and install it like any other package or we use its installation scripts:
curl https://rclone.org/install.sh | sudo bash
Once installed to add our first storage:
rclone config
The following options will appear:
As we are starting, of course, we press the “n” and it will ask us for the name we want to give it, for example OneDrive.
When we hit the intro is where we will see the number of cloud storage options that it allows us
Since we are using OneDrive, we type 20 and enter, and in the next 2 steps we press enter, taking the default options.
If you have read all the documentation and you want to make a more advanced configuration, on the next screen you can select the advanced options. In this case, we click on no because we will not go into advanced configurations for this little tutorial.
Depending on your configuration, on the next screen we select whether we want it to auto-configure or, on the contrary, we do it ourselves. Since we have not made any advanced configuration, we select autoconfig.
By selecting Yes rclone will start a web server on localhost on port 53682 to obtain the authentication token for the service we are implementing in our case OneDrive
We open the link that appears and it will take us to the Microsoft login, we log in and it will ask us for rclone authorization
We accept and if everything has gone well, he will return it to us
Now in the next screen we select the type, in our case 1
And he will tell us the records he finds and which one we want.
We write the one that has been found in this case the 0, it will show us the route and ask us if everything is correct
After this, it will show us a summary and we will tell it again that everything is correct.
We will now be able to see our new disk in rclone config
Now we just need to mount it in the folder we want, for example in your home you create the onedrive folder and launch the command
rclone –vfs-cache-mode writes mount OneDrive: ~/onedrive
Of course, each one of us has the name that we have given it
This command will mount our unit until we close the console or press Ctrl+c, so if we want to have it permanently depending on the distro, we will have to put it in the startup applications or through fstab
For example, in startup applications we call it OneDrive with the following command
sh -c “rclone –vfs-cache-mode writes mount onedrive: ~/OneDrive”
As I mentioned, there is a very easy to implement gui for anyone who wants to try it, simply run the command
rclone rcd –rc-web-gui –rc-user=<username> –rc-pass=<password> –rc-serve
It is important to enter the user and password you want and the –rc-serve option will allow us to download files using the GUI.
The latest version will be downloaded and a local web server will be started on port 5572. We open it in the browser and that’s it. We can log in by entering the user and password that we entered in the command.
Enjoy it…see you later
TL
Thank you for reading our posts.
FAQs
Commonly used options include rclone, s3fs, davfs2, and native clients from providers such as Google Drive or Dropbox. Each tool has advantages depending on the type of storage and user needs.
You can also use rclone, allowing you to connect and synchronize files with Google Drive as we did in the article with OneDrive.
Mounting cloud storage allows you to access files as if they were local without downloading them, while syncing (such as rsync or rclone sync) downloads and uploads files based on changes in the file system.
Yes, but it is essential to use encryption with tools like rclone to protect sensitive data, as well as using secure connections (HTTPS or SFTP) and restricting access with API keys or secure credentials.