There are lots of cloud storage solutions available, some of them run by independent companies like Dropbox or Copy, while others come from operating system providers like Google (Google Drive), Apple (iCloud) and Microsoft (OneDrive). Syncing these cloud storage services with Linux can be hit or miss, depending on the level of support provided.
Dropbox has good support for Linux, as does Copy. Traditionally Microsoft’s services are very tightly integrated with its own products, and as such, there isn’t a Linux sync agent provided by Microsoft. We have previously shown you a bypass that allows you to access OneDrive from Linux. Now, thanks to a project called onedrive-d, you can officially sync your OneDrive with Linux.
The first step to installing onedrive-d is to open a terminal window and clone the source code from git using the following command:
git clone https://github.com/xybu92/onedrive-d.git
If you don’t have “git” installed, you can install it with the command:
sudo apt-get install git
Now change directory into the onedrive-d folder:
cd onedrive-dAnd run the install script:
./inst install
Enter your Ubuntu password if prompted. The installation script will download and install any dependencies via “apt-get”. Accept the list of packages to install.

Once the installation has completed, the settings dialog will appear.

Click “Connect to OneDrive.com” to authenticate. Enter your OneDrive username and password on the “Sign in” dialog.

You will then be asked to accept the permissions for onedrive-d so that it can “Access and edit your OneDrive” and “Access your info anytime.” These are necessary for onedrive-d to perform the sync operations.
Next click on “(None)” in the dropdown box just below where it says “The local folder to sync with your OneDrive.” Click “Other…” and use “Create Folder” on the file open dialog to create a new folder called “OneDrive.” Select the “OneDrive” directory as the sync folder.
To finish, click on “Close” and then on “Yes” to confirm that you want to save your preferences. The onedrive-d daemon doesn’t run automatically at system boot, so you need to start it manually by typing the following in a terminal window:
onedrive-d
The output from the process will report what the onedrive-d daemon is doing, and you will get notifications on your desktop when the daemon updates files in your OneDrive folder.

If you need to change the settings then type the following into a terminal window:
onedrive-prefs
This will display the settings dialog we saw earlier. Among the settings are a set of exclusions. When enabled, these tell onedrive-d not to sync certain types of files:
- Microsoft Windows only files (e.g. “Desktop.ini”)
- Apple Mac OS X only files (e.g. “.DS_Store”)
- Linux temporary files (e.g. “hello.c~”) – note the “~” at the end of the filename marking it as a backup or temporary file.
- Vi temporary files (e.g. “hello.c.swp”)
- Emacs temporary files (e.g. “#hello.c#”) – note the”#” at the beginning and the end of the filename.
There is also a onedrive-d command line tool called “onedrive-cli.” It allows you to perform certain low level file functions on your OneDrive storage. For example, to create a new folder called “important” on your OneDrive, type:
onedrive-cli mkdir importantThis will create the folder directly on your OneDrive, and then as the onedrive-d daemon performs its synchronization, it will also be created in your local OneDrive folder.
To copy a file not in your local OneDrive folder to the “important” folder from above, type:
onedrive-cli put myimportantfile.doc important
Where “myimportantfile.doc” is the name of the file and “important” is the name of the directory from the example above. In time the file will be downloaded into your local OneDrive folder. It will also be accessible from onedrive.com.
Of course, the simplest way to add files to your OneDrive is to copy them into your local OneDrive folder and let onedrive-d upload them to the cloud.
The onedrive-d project is still very much under development, and there were times when I needed to restart the onedrive-d daemon to get it working again. However the basic synchronization seems to be working, and future versions should be more stable.
If you have any trouble with the instructions given above, feel free to use the comments section below to ask a question. If you are having any problems with onedrive-d, there is also an issue tracker where you might find help if other people have encountered the same issue.

With the US government claiming that any files residing on cloud storage company’s (Dropbox) servers are part of the company’s business records and therefore open to governmental inspection, is it advisable to use cloud storage? While the vast majority of cloud users have “nothing to hide” neither do they, or will they, have an expectation of privacy. Why not just have NSA open up their servers for general public’s cloud use and streamline NSA’s data collection process? :-(
Ummm really? grow up who care’s, your just worried they’re gonna find your porn stash….
You don’t need your rights until you do.
That’s the problem with rights, multiplied by like 1000 when you have people born & grown under relatively free & relatively fair societies. They start to assume that this is just the way things are….
Sometimes I almost hope a country like the USA takes a clear authoritarian drift…. “Coz you don’t know what you’ve got, until it’s gone”
The NSA can bore the crap out of each other reading my files if they want, I’m not doing anything that they’d concern themselves with.
You can find a dozen reasons to fire or jail anyone in their files.
Maybe in America you can.
– I followed instructions, but when I type ./inst install
I get:
bash: ./inst: no such file or directory
!!!! how come!!
I opened the newly created ondedrive-d folder in Dolphin, enabled viewing hidden files, no ./inst directory.
what did I do wrong?
the directory is in the dump file so use additional commands as follow
>>cd onedrive-d
>>ls
>>cd dump
>>./inst
then follow the tutorial
I am having the same problem as mohammad but it seems that dump does not exist for me..
Try using
./setup.sh inst
I cded into the onedrive-d and lsed and found that the file was a ./install.sh install not ./inst install. Hope this helps!
Try running
sh setup.sh inst
from within the onedrive_d folder git created for you.
If your distribution is not auto-recognised by the auto-detect, you may wish to edit setup.sh and change line 10 to read DISTRIB_ID=”debian” or whatever version you are using, just make sure that the exact same one is listed in the groups for the case switch regarding $DISTRIB_ID located a few lines underneath.
That said, I can’t get the onedrive-d command to work or onedrive-pref. Can somebody help here, please?
ditto, it says no command found, and a find of / reports
/usr/local/lib/python3.4/dist-packages/onedrive_d-1.0_dev-py3.4.egg/onedrive_d
as the only listing, that directory contains the following:
config.py
daemon.py
__init__.py
live_api.py
logger.py
main.py
observer_gtk.py
pref_cmd.py
pref_gtk.py
pref.py
__pycache__
res
setup.py
test_live_api.py
running any of those gives the following error
Traceback (most recent call last):
File “config.py”, line 7, in
from datetime import timezone, datetime, timedelta
ImportError: cannot import name timezone
different line numbers, but same error from almost all of them.
I’m having an issue that when I hit the button to connect to one drive the link that pops up is blank. I’m not being shown the link to sign in to one drive. Any suggestions?
** Message: console message: https://login.live.com/oauth20_authorize.srf?scope=wl.skydrive+wl.skydrive_update+wl.offline_access&redirect_uri=https%3A%2F%2Flogin.live.com%2Foauth20_desktop.srf&response_type=code&client_id=000000004010C916&display=touch @8: ReferenceError: Can’t find variable: evt_LoginHost_onload
This is message in terminal
Can’t seem to get past the install process and begin syncing. Such a shame.
The author has a new version in development, but it doesn’t work yet.
If you want to use the old version, follow the instructions above : but do
git checkout master
After you do the “git clone” step.
Thanks for the tip, Adrian! I tried to install version 1.0 and ran into exactly the same troubles reported here. Using “git checkout master” I was able to install version 0.85 and it has synced my files from OneDrive. Looking forward to a fully working version 1.0.
worked for me thanks
onedrive just won’t start after ‘./setup.sh inst’
can’t recognize command ‘onedrive-d’
Anyone followed this instruction ever succeed? Could you please give some advice?
Tryed everything can get it working Bash not allowed and so on
“Now, thanks to a project called onedrive-d, you can officially sync your OneDrive with Linux.”
I don’t think ‘officially’ means what you think it means. onedrive-d is not It’s not produced, supported, or endorsed by Microsoft.
linux crapware for hackers and nerds… waste hours battling with these crap applications for an afternoon of sheer frustration.
Windows might have it’s disadvantages: viruses, costs etc… but a lot has to be said for a simple doubleclick on an .exe file
installed
basta-fertig!!
Nope. It’s enough to have a triple digit IQ, then you’d be fine with linux.
The forum is entitled “make tech easier” ? Lots of readers don’t have MENSA IQ’s
Instructions don’t work.
Instructions from comments work (to install v0.85) but it won’t add permissions for onedrive-d to access my OneDrive.
Useless.
Found that you have to log into you Microsoft account, click Yes, it will then reload the login form again, and you have to login again for the permissions to stick. (Makes sense)
Not so useless.
Your title is about “Linux”. What you’re offering might be clearer if you said Ubuntu (since you refer to it) or Debian-like or something.
I would remove the word “officially”.
I would add up front that this is still in development and may need some work. Expectations matter.
I would direct people to a proper bug reporting option and forum; it sounds like you’re generating a lot of complaints.
Drag and drop install.sh into a terminal window and the install should begin…
How is this official? Microsoft has nothing to do with this project as far as I know. Functionality can break any time. Still sticking to dropbox, which has official linux support. What a shame that even google drive lacks it.
I have Linux Mint 17.1 KDE, and my steps to install this were:
Opened the Terminal
I didn’t have the “git” application, so I ran:
sudo apt-get install git
When git was installed, I ran these commands in the following order:
git clone https://github.com/xybu92/onedrive-d.git
cd onedrive-d
./install.sh install
Accepted to install all the dependencies and the application
Ran:
onedrive-pref
“Do you want to autorize sign in with your OneDrive account? [Y/n]” entered Y
Copied the URL in the Terminal (begins with https://login.live.com/oauth20_authorize.srf)
Pasted it into my web browser and logged into my OneDrive account
Copied the URL in my web browser after logging in (begins with https://login.live.com/oauth20_desktop.srf)
Pasted the URL into the Terminal and pressed enter
“Do you want to specify path to local OneDrive repository? [Y/n]” entered Y
Specified path:
/home/your_username_here/OneDrive
“Do you want to change the numeric settings? [Y/n]” entered N because I don’t know what it is
“Do you want to edit the ignore list file? [Y/n]” entered N because I don’t know what it does
Ran:
onedrive-d
This gave me a message about how to start, stop and restart the service as well as how to get the daemon status
Ran:
onedrive-d start
Now the folder /home/my_username_here/OneDrive has the whole file tree from my OneDrive account, which means it works.
Hope this works for you too.
it work on my linux mint too ! thx !
Read directly te GitHub repo and follow the instructions there ! https://github.com/xybu/onedrive-d