OneDrive(previously known as SkyDrive) is a popular cloud storage offering from Microsoft. Currently OneDrive offers 7GB free storage for every new signup. As you can imagine, OneDrive is well integrated with other Microsoft software products. Microsoft also offers a standalone OneDrive client which automatically backs up pictures and videos taken by a camera to OneDrive storage. But guess what. This client is available for all major PC/mobile platforms except Linux. OneDrive on any device, any time? Well, it is not there, yet.
Dont get disappointed. The open-source community already has already come up with a solution for you.onedrive-dwritten by a Boilermaker in Lafayette can get the job done. Running as a monitoring daemon,onedrive-dcan automatic sync a local folder with OneDrive cloud storage.
In this tutorial, I will describehow to sync Microsoft OneDrive on Linux by using onedrive-d.
Whileonedrive-dwas originally developed for Ubuntu/Debian, it now supports CentOS/Fedora/RHEL as well.
Installation is as easy as typing the following.
$ ./inst installFirst-Time Configuration
After installation, you need to go through one-time configuration which involves grantingonedrive-dread/write access to your OneDrive account.
First, create a local folder which will be used to sync against a remote OneDrive account.
Then run the following command to start the first-time configuration.
It will pop up aonedrive-ds Settings window as shown below. In Location option, choose the local folder you created earlier. In Authentication option, you will see You have not authenticated OneDrive-d yet message. Now click on Connect to box.
It will pop up a new window asking you to sign in to m.
After logging in to OneDrive.com, you will be asked to grant access toonedrive-d. Choose Yes.
Coming back to the Settings window, you will see that the previous status has changed to You have connected to OneDrive.com. Click on OK to finish.
There are two ways to sync a local folder with your OneDrive storage by usingonedrive-d.
One way is tosync with OneDrive manually from the command line. That is, whenever you want to sync a local folder against your OneDrive account, simply run:
onedrive-dwill then scan the content of both a local folder and a OneDrive account, and make the two in sync. This means either uploading newly added files in a local folder, or downloading newly found files from a remote OneDrive account. If you remove any file from a local folder, the corresponding file will automatically be deleted from a OneDrive account after sync. The same thing will happen in the reverse direction as well.
Once sync is completed, you can kill the foreground-runningonedrive-dprocess by pressing Ctrl+C.
Another way is torun onedrive-d as an always-on daemon which launches automatically upon start. In that case, the background daemon will monitor both the local folder and OneDrive account, to keep them in sync. For that, simply addonedrive-dto theauto-start program listof your desktop.
Whenonedrive-ddaemon is running in the background, you will see OneDrive icon in the desktop status bar as shown below. Whenever sync update is triggered, you will see a desktop notification.
A word of caution: According to the author,onedrive-dis still under active development. It is not meant for any kind of production environment. If you encounter any bug, feel free to file abug report. Your contribution will be appreciated by the author.
Do you want to receiveLinux FAQs, detailed tutorials and tipspublished at Xmodulo? Enter your email address below, and we will deliver our Linux posts straight to your email box, for free. Delivery powered by Google Feedburner.
Did you find this tutorial helpful? Then please be generous andsupport Xmodulo!
The following two tabs change content below.
Dan Nanni is the founder and also a regular contributor of Xmodulo.com. He is a Linux/FOSS enthusiast who loves to get his hands dirty with his Linux box. He likes to procrastinate when he is supposed to be busy and productive. When he is otherwise free, he likes to watch movies and shop for the coolest gadgets.
How to open a TCP/UDP socket in a bash shell
How to enable incremental file sync for many users on Linux
How to build a kernel module with DKMS on Linux
How about using this to sharepoint (office365)?
Really nice article. Currently using it. works like a charm. Was waiting for something like this since so long. Just loving it bro… If any error occurs Ill let u know… 🙂
Not me. File a bug report with them, so that they can look into the issue. 🙂
I notice that it is hard coded for MS OneDrive. How much trouble would it be to give a choice of cloud providers, such as Google Drive?
As the name implies, it is a OneDrive client.
For Google Drive, try these clients:
Thanks for the heads up on this. Readers might be interested that the developer of the popular DropSync for Android devices recently released another app for OneDrive called OneSync. Its getting good ratings at the app store – makes OneDrive a real cross-platform contender.
Now they need to make this for Windows 8.1 too. It seems like everybody except people using the latest version of Windows can access Skydrive / OneDrive. If you didnt know, you cannot access your Skydrive/Onedrive from Windows 8.1 if you are logging into your computer with a local account as opposed to a Microsoft account.
Wonderful ! Syncronize all my [SkyOne]drive easily.
an apt-get install git, git command and just after compilation, the configuration windows popup and a wizard wants that I input my OneDrive login.
What about non apt-get and yum systems? What packages are needed? Why does it need a package manager?
Followed the instructions and it works. Hate to have to use Microsoft ever, however I have workmates that use Microsoft Access, (I use SQLite myself with LibraOffice Base and Python to interface with the database ) and I have to be compatible with them. This allows me to also sync any documents I create in the Microsoft 365 with my beloved xubuntu 12.04.4, THANKS A MILLION
How can i uninstall this application?
1. From the souce directory, you should run the following command
2. If you start onedrive-d service when the system boot, run the following commands.
sudo update-rc.d -f onedrive-d remove
sudo rm /usr/local/bin/onedrive-prefs
4. Remove the configuration file from your home directory.
Thank you. This seems to athenticate to onedrive.com or login.live.com, where I need to athenticate at portal.office.com I made edits to the daemon.py and prefs.py files, but it continues to athenticate at onedrive.com. I would like to know how I can point athentication to portal.office.com where my Microsoft account resides?
Any plans for an Arch/AUR/Manjaro release?
I truly thank you for this. I like running linux but I really like my Windows Phone 8.1 as well. Now I have access to my photos from my phone fairly quickly and with a minimal amount of effort. This is ElementaryOS-Luna. Works flawless.
This is really fantastic. I need to be able to switch between Gnome and WIndows and still access the same documents, and I would prefer to use Asus storage, but they dont seem to have a way of running on Ubuntu yet, so OneDrive wins.
So far, one problem: the auto-start works, but the expected cloud icon doesnt appear on the top bar. (If everything else works, then Im happy, but would like to fix this if possible.)
This works out of the box on Linux Mint (being ubuntu based) with a small change to setup.sh…just add linuxmint to the debianubuntu (line 21) so it looks like this:
Every system reboot it will do a full sync, create new files and renames the files in my local folder, like this:
test.txt (OLDER_1409990135.09) (OLDER_1409990135.09)
test.txt (OLDER_1409990135.09) (OLDER_1409990135.09) (OLDER_1409990135.09)
eboot it will add a new file.
If you dont mind one-way download sync only with Onedrive as master, you can get rid of the older/newer stuff by commenting out some lines of source code in /onedrive-d-master/onedrive_d/component.py;
Comment out Lines 201-204, 207-208 by preceding each line with . Then restart the daemon in terminal with /etc/init.d/onedrive-d restart (or just plain stop then start)
I dont think its ready for 2-way yet.
This is great!!!! You guys are truely incredible!!!!
./inst install is not working with Fedora 20. Is there another command?
I am likewise not seeing an inst command in onedrive-d on Linux Mint. setup.sh, yes. inst no. Following the instructions on the github site, I ran setup.sh inst which executes and looks like it worked, but then tells me I should run onedrive-pref to do the setup (no such file or command exists anywhere on my system after install… I searched in case it was off-path), and onedrive-d to start the daemon (the only onedrive-d that exists anywhere is a folder, not a command). What am I missing here? I would love to get this working.
just trying on Fedora 20 and have the same problem – cannot lauch either onedrive-d nor onedrive-pref. Did you manage to resolve the issue ?
I too was having the same issue but found this following solution on another web site
Thanks for the nice writeup. Installation worked well, although I ended up downloading the zip file with the installation components, changed into directory after extraction, and the rest was the same.
Runs fine up to the initialization step in Ubuntu.
My problem is the nature of the login. I have onedrive storage through an institutional account. On the website for onedrive login, it will recognize the email right away and redirects to an institutional authentication interface before I even try to enter a password.
Is there any way to access an institutional account. At present, it will state that the account does not exist, because it was not established directly by me on onedrive.
May not be possible, but I figure I just check.
.. just found out the issue is known…
Wonder if this will work on myraspberry PiNAS. Would love for this to run in the background syncing files.
Is there any way to setup and configure strictly using the command line – my connection to the server is non GUI.
@GG, yeah after git clone and enter the directory, just start ./install.sh – in my case this was solution.
Doesnt support OpenSuSE 13.2 64-bit. Perfectly useless for me. *sigh*
Nice write-up and highly useful: I installed onenote under Ubuntu via wine. It runs, but does not sync with onedrive. So now, I can have onedrive-d sync and still use onenote.
Slight issue: I have 2 notebooks. For one, it works perfectly. For the other, I get a message: Another OneNote program created it but has not yet uploaded the content.
The notebook that works is MBytes in size, the one that does not gets created but is only about 3KBytes.
Any ideas as to why one works but not the other?
I dont have GUI on my CentOS installation.
Your email address will not be published.Required fields are marked*
Notify me of follow-up comments by email.
How to speed up directory navigation in a Linux terminal
How to configure a Tomcat cluster on Ubuntu
How to find network card driver name and version on Linux
How to export Robinhood transaction data
How to access shell environment variables in Perl script
How to check if AES-NI is enabled for OpenSSL on Linux
How to extract files from an RPM package on Linux
How to install a device driver for Mellanox ConnectX-4 Ethernet card on Linux
How to fix configure: error: pcre.h not found
How to enable and use logging module in Python
How to remove all network namespaces at once on Linux