Forum Discussion
OneDrive on Linux
I would like to use OneDrive on Ubuntu, May be working with all or some folders. Since there is no office OneDrive client in Linux, I've searched online and found "rclone" but not sure how secure it is or is there any other alternative out there?
- abrauneggIron Contributor
I am the maintainer of the free OneDrive Client for Linux, which supports OneDrive Personal, OneDrive for Business, OneDrive for Office365 and Sharepoint, and fully supports Azure National Cloud Deployments for those that require it. It fully supports shared folders - both OneDrive Personal and OneDrive Business Shared Folders.
For further information & details:
This is an actively maintained client which was originally forked from the 'skilion' client (which unfortunately most of the Internet still references). The 'skilion' client was abandoned in 2018.
- jlgarnierCopper Contributor
Hi abraunegg!
I've stumbled on this post this morning as I'm trying to "mirror" my Win10 laptop to a Linux machine (using Windowsfx disto, to save all my bad habits ).
I've installed your software and managed successfully to sync from OneDrive to the Linux laptop (using onedrive --synchronize --single-directory command) but I'm now wondering:
- if the sync is automatically done in the background when I edit files in the local storage,
- if I have to create and customize the config file,
- if I also need to create the sync_list file,
- if I need to run onedrive as a system service to get automatic sync.
Sorry for the dummy questions, but I'm a bit new to Linux and all those things still look a bit of "magical dust" to me!
Thanks in advance for your help!
- abrauneggIron Contributor
Glad you found the tool useful 🙂
In regards to your questions:
> onedrive --synchronize --single-directory
What this does is perform a single sync, of the single directory specified. Once the sync has finished, thats it.
> 1. If the sync is automatically done in the background when I edit files in the local storage
With your existing command, no - there is no automatic sync occurring. However, if you switch '--synchronize' for '--monitor' this will continually sync until you exit the application - ie - sync automatically.
> 2. If I have to create and customize the config file
Generally you do not need to do this unless you want to change some of the default options. Best read the help / man page for assistance on the configuration options.
> 3. If I also need to create the sync_list file
Generally no - you do not need to create this file, unless you want to be super specific about what needs to be synced
> 4. If I need to run onedrive as a system service to get automatic sync
That is generally the best way to configure automatic and constant sync in the background to occur.
Feel free to create questions on GitHub (https://github.com/abraunegg/onedrive/) as this is where most questions & a wealth of knowledge in closed cases sit.
- vetterworldCopper Contributor
Hey, could you help out a dumb guy like me? How do I change the location that it used on my computer? I need to switch it a different drive. It's mint it's mint 21.1 cinnamon, in case that matters.
- abrauneggIron Contributor
To answer questions like this it is better that you ask your question on GitHub - https://github.com/abraunegg/onedrive under 'Discussions'
- AFAIK, Microsoft has not shared any plans to support Linux in regards of ODFB. However, it seems there is an open source project about OneDrive Consumer support in Linux: https://askubuntu.com/questions/804301/how-to-sync-onedrive-business-office-365-on-linux
- muratkazanovaBrass ContributorThank you, I’ll check it.
- jsmpvCopper Contributor
If you're looking for something a bit more polished and powerful, check out ExpanDrive
It has deb/rpm/AppImage packages and runs on nearly all linux distros. There is a desktop edition as well as a server edition that runs headless. Mounting specific sharepoint sites, remote paths, etc are all supported as well as offline mode and async writes. Also built to withstand reboots, transient networks, etc.
- CNUAUKCopper ContributorYou should mention there is a charge for using your product, not all of us have such instant purchase power
- obrobertsenCopper Contributor
- eeddggCopper Contributorhonestly, rclone is the best solution if you want to mount OneDrive as a directory and only selectively cache files rather than download your whole OneDrive library. rclone is sufficiently secure, it doesn't have its own server code so it can't report your password or drive contents back to the devs or anything. It works almost exactly like on Windows except for the personal vault in my experience
- benhaubeCopper Contributor
muratkazanovamy preferred OneDrive client on Linux is Onedriver. https://github.com/jstaf/onedriver
The info on the GitHub page tells you how to get it installed and set up. Once it's done it mounts it just like any other network drive. I have been using it for 2 years and it works flawlessly. I set up my personal and work OneDrive accounts with it, and told the tool to mount them on boot-up automatically.
- obrobertsenCopper Contributor
I have try them all, this is the only one I like:
https://github.com/jstaf/onedriver
Have 1TB One Drive for Business and One Drive Personal mounted in filesystem on laptop with 128GB
All files is just mounted, and when I click on files then are downloaded and cached.
- Gabi_ManriqueCopper Contributor
- jrlowservicesCopper Contributor
Expandrive has the ability to connect to Onedrive and Sharepoint and create a virtual mounted drive. You do not have to sync files to your computer to use them. It operates like a mapped network drive in Windows (without a drive letter of course) or a mounted drive on a Mac. Expandrive is not free and I have no association with the company. But I do have a license of my own. You can try it for free and even keep using it for free once the trial expires. However, after the trial expires you will only be able to use it for something like 20 minutes and then have to restart it.
Expandrive also connects to may other platforms including SFTP (which allows a Windows client to map a drive letter to a Linux SFTP server). It has Windows, Linux and Mac clients. Even when you have a native client for a specific app (Say OneDrive or Dropbox in Windows), Expandrive can be useful to just create a mapped drive and not have to worry about managing synced folders.
- chanabosCopper Contributor
jrlowservices i prefer to use insync as the software is pretty intuitive. also expandrive would disconnet too often even with the paid version.
- K_StuartCopper Contributor
Example 'null' [do NOT use in production or other than general convenience]
For DEV or Prodo use: Look below at 1 - 3.B.1
null: ============
Download Google Chrome Beta or Dev (keep the paths and SSH key separate- a tmp user account is my usual go to on fedora) In the browser - click you can mount it as a separate drive on your file system. No sudo required. muratkazanova
end null ========
Adv Look: =======
Before that trick and one I still leverage for cloud computation and clusters:
1 Set up a desktop controller, ie. FTP, SQL, Kube, etc. <- you get it ->
2 SharePoint server - Hint SharePoint online works just fine 😃
3.A.0 - Set up a share file with some- python, or- json, or- java, or- etc.
3.A.1 To add security/api's (running a workflow to the 'www')
3.B.0 For local or dev: 'curl' is best practice -
3.B.1 SharePoint_CLI on github - Hint look for ms365 under the topic 'Microsoft'
End Adv Look ========
Close:
If your still out there in the wild working on this - I can dev a framework to fit the use case and tarball it for you but I would need to know the logic just so I could make it useful, mine is pretty "neat-o", I can snap up something fairly quick if needed
Safe travels - KS
- boatguypatCopper ContributorThere is also a really good Office 365 app I use on Ubuntu called "Office365WebDesktop" if you just need occasional access to your onedrive folder (and a huge plus all O365 apps).
- philip_38Copper Contributor
How do I mount a onedrive link on a server without a graphic environment ? I cannot have one. I cann only access the server via ssh, as root.
- zKociCopper Contributor
https://github.com/abraunegg/onedrive its all in CLI - no need for GUI philip_38