Mount Cloud storage on Linux

EVERYTHING IS POSSIBLE

 
Taking advantage of the fact that I have been asked if there is a client for onedrive companies or any way to connect from Linux without web I decided to make the following tutorial. There is no client as such but the answer is Yes, and not only onedrive, we can mount the cloud storage of 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 serve only for some specific cloud storage. This tool can be found on their website rclone.org where it is also very well documented, also has a gui that I do not particularly use but if I test it from time to time to see if they have made more development, but many people can be useful. Well as you will see below its installation is very simple: We download the corresponding package according to distro and install as any package or we make use of their 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 just starting of course we click on the "n" and it will ask us for the name we want to give it, for example OneDrive.
When we hit enter is where we will see the amount of cloud storage options that allows us to
As we are with onedrive we type 20 and enter and 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 in the next screen you can select the advanced options, in this case we give no because we will not get into advanced configurations for this small tutorial.
Depending on your configuration in the next screen we select if we want it to autoconfigure or on the contrary we do it ourselves, as 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 of the service we are implementing in our case onedrive.
Open the link that appears and it will take us to the microsoft login, log in and it will ask for rclone authorization.
We accepted and if everything went well, it will return to us
Now in the next screen select the type, in our case 1
And it will tell us the discs it finds and which one we want to find.
We write the one that has found in this case the 0, it will show us the route and will ask us if everything is correct.
After this it will show us a summary and we tell it again that everything is correct.
You can now see our new album in rclone config
Now we just need to mount it in the folder we want, for example in your home you create the folder onedrive and launch the command
rclone --vfs-cache-mode writes mount OneDrive: ~/onedrive
Of course, each one has the name that he/she has given to it. This command will mount our drive until we close the console or do Ctrl+c so if we want to have it permanent depending on the distro we will have to put it in the startup applications or by 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 told you there is a very easy to implement gui for those who want to try it, simply launch the command
rclone rcd --rc-web-gui --rc-user=<username> --rc-pass=<password> --rc-serve
It is important to set the user and pass that you want and the --rc-serve option will allow us to download files using the gui
It will download the latest version and will start a local web server on port 5572, we open it in the browser and ready we can enter putting the user and pass that we put in the command.
Enjoy...see you soon

Thanks for reading our posts.

No hay comentarios

Comenta la entrada