[SUPPORT] Bversluis/ Onedrive


Recommended Posts

Support thread for unraid docker template.

 

This docker image was already created by the developer. I've just created the unraid template for it using driveone/onedrive:latest.

 

GitHub: https://github.com/abraunegg/onedrive
DockerHub: https://hub.docker.com/r/driveone/onedrive
 

Installation instructions:

  1. Before installing the Onedrive docker container, make sure you created a configuration and data folder first (see template for more information).
  2. Create the Onedrive docker container using the template.
  3. Stop the container and find the container ID. (In the right upper corner of the docker page, switch over from Basic view to Advanced view. Now you can see the Container ID for your newly made container (for example 72409c107bd0). Copy this number.
  4. Open the Unraid terminal and type: docker start your_container_ID --interactive (use right mouse paste to paste your container ID in the terminal)
  5. Press enter and the container starts in an interactive mode and a link to Microsoft is shown in the terminal. You open this link by clicking on it (or copy it to your browser) and log in with the Microsoft credentials of the Onedrive account you want to add. If successful, a blank page is shown. Copy the full address of this page and past it (right mouse and paste) in the terminal as the response URL and press enter. If the link is accepted, the client immediately starts downloading your files.
  6. You can close the terminal, restart the container and everything should be working from now on.
  7. For every Onedrive account you want to sync with Unraid, you need to create a new docker container with a different folder for the configuration and data files.

 

 

Alternative installation instructions for installation with docker compose in:

 

In case you may encounter permission errors when trying to access your downloaded files when using onedrive multiple accounts, check the solution below by Cholzer:

 

 

Edited by BVersluis
Additional information
Link to comment

This is awesome, thanks so much. Struggled getting rclone working but this works a treat. 

 

edit: I would like to sync / backup my onedrive share using rsync or vorta. I am getting permissions error since I assume the permissions are for each user. Should I rsync to another location? I have a backup folder under /data 

Edited by kri kri
  • Like 1
Link to comment
On 1/28/2023 at 2:28 AM, kri kri said:

Could this GUI addon be added? GitHub - bpozdena/OneDriveGUI: A simple GUI for OneDrive Linux client, with multi-account support.

Sorry, but there is no existing docker image as far as I know with the GUI installed. You could try install it in your docker container using the installation instructions, but there is no easy way. Creating a new fork/docker image is beyond my capabilities... If you want to solve your permission errors and want a GUI, it might be easier to create a linux VM instead of a docker container and follow the installation instructions from abraunegg and bpozdena to install the onedrive client and GUI. A docker container is more convenient and simple to use, but has it's limitations...

Edited by BVersluis
Link to comment
17 hours ago, kri kri said:

I am getting an error on one of my dockers:

 

ERROR: A database consistency issue has been caught. A --resync is needed to rebuild the database.

** Press ANY KEY to close this window ** 

 

Any ideas how to fix?

https://github.com/abraunegg/onedrive/blob/master/docs/USAGE.md look under resync for possible causes and how to fix. Alternatively you can just remove the container and the content of the related data folder and reinstall...

Edited by BVersluis
Link to comment

Currently running this onedrive application in an ubuntu VM and want to move over to docker.

As I am using webhooks for realtime updates so I need to set webhook_enabled, webhook_public_url and the webhook_listening_port in the conf.
But where is the config for this docker located?
It is not in the /conf folder that has to be configured. 😅

 

*edit* I figured it out. :)
 

1. ideally you do this before you even add the onedrive docker template to your unraid server
2. create the configuration folder as described in the unraid onedrive docker manual
3. download the original config file from here https://raw.githubusercontent.com/abraunegg/onedrive/master/config

4. store that config file in the configuration folder of the onedrive docker

5. remove the # ONLY infront of the settings you want to change, and change the setting accordingly (in my case webhook_enabled, webhook_public_url and the webhook_listening_port as well as set sync_dir_permissions = "777" and sync_file_permissions = "777")

6. do not touch any of the other settings you dont want to change! (i.e. do not change the _dir paths!)
7. follow the rest of the onedrive docker manual

This way your changes also survive a docker restart.

Edited by cholzer
Link to comment
  • 1 month later...

Thank you so much for this! I've been waiting for an elegant solution to sync to OneDrive. Like @kri kri, I tried getting rclone to work and failed miserably.

 

One issue I did encounter was that I didn't have permission to access any of the folders that were downloaded from OneDrive to my server from my Windows client machine. I ran the permission fix in settings and seems to have fixed the current ones. I'm hoping it's a permanent fix and that I don't have to fix the permissions every time a new folder is created on the server. Has anyone else encountered this issue?

Link to comment
  • 1 month later...

I have successfully setup this container, and it immediately began to sync my local specified folder in unraid to the root of my personal OneDrive.

I was hoping to be able to specify a SharePoint location like the description suggested was possible. I would like these files to be owned by the organization and not be located and owned in the user's OneDrive folder. Perhaps a heavy Windows VM is the only way to accomplish this?

Link to comment
  • 1 month later...

(EDIT: Since nobody replied yet, let me enrich this)

(EDIT #2: Since nobody replied still  I will update with my own discoveries)

(EDIT #3: This project looks abandoned. Never got replies to #2, #3, #4 and I see other people's questions remain unanswered above. Pity because the project looks all right and for me it seems to work - it still downloads things so I will use it at least for this initial sync, but I am not sure I will keep the container, because an abandoned project is most of the times as good as dead)

 

1) If I close the terminal WHILE it sync, does it keep syncing?

EDIT #2: Well I actually noticed the terminal after a few hours is at the prompt and NOT reporting syncing. I was actually scared it stopped halfway (actually more like 25% of the way), but then refreshed a few times the folder size calculation in UNRAID and it kept increasing. Plus seeing the logs of the container actually still scrolls files synced, so it DOES work!
Of course I am not sure what happened and the terminal returned to prompt (and I couldn't scroll upwards to see history of the window, like it got "reset").

 

2) Does it implement the "monitor" parameter (installing a daemon to actively sync).

 

3) Starting according to instructions (with the copy paste of the login URI etc.), will it survive server reboots? Is it working from now on? Or after reboot I need to redo the whole thing?

 

4) If I reboot the whole server before initial sync finishes (and assuming it actually runs by itself after reboot), will it resume ok afterwards?

Edited by NLS
Link to comment
  • 2 weeks later...
On 6/8/2023 at 9:47 AM, NLS said:

(EDIT: Since nobody replied yet, let me enrich this)

(EDIT #2: Since nobody replied still  I will update with my own discoveries)

(EDIT #3: This project looks abandoned. Never got replies to #2, #3, #4 and I see other people's questions remain unanswered above. Pity because the project looks all right and for me it seems to work - it still downloads things so I will use it at least for this initial sync, but I am not sure I will keep the container, because an abandoned project is most of the times as good as dead)

 

1) If I close the terminal WHILE it sync, does it keep syncing?

EDIT #2: Well I actually noticed the terminal after a few hours is at the prompt and NOT reporting syncing. I was actually scared it stopped halfway (actually more like 25% of the way), but then refreshed a few times the folder size calculation in UNRAID and it kept increasing. Plus seeing the logs of the container actually still scrolls files synced, so it DOES work!
Of course I am not sure what happened and the terminal returned to prompt (and I couldn't scroll upwards to see history of the window, like it got "reset").

 

2) Does it implement the "monitor" parameter (installing a daemon to actively sync).

 

3) Starting according to instructions (with the copy paste of the login URI etc.), will it survive server reboots? Is it working from now on? Or after reboot I need to redo the whole thing?

 

4) If I reboot the whole server before initial sync finishes (and assuming it actually runs by itself after reboot), will it resume ok afterwards?

Sorry for the late replies. Just to be clear, I'm not a developer and rarely visit the forum. Before I switched from a xpenology NAS to Unraid at the beginning of this year, I never worked with Linux or docker. However, I was in need of a Onedrive client for Unraid to replace Synology's CloudStation and couldn't find it (only others asking for it too). Using Abraunegg's client and docker image, which is certainly not dead and receives regular updates, I managed to sync Onedrive with my new Unraid NAS. I have described my method and offered it in the app store, because I encountered many requests. It works for me now and I hope it works for others too, but I don't have the time, knowledge and resources to provide further support for this and test things.

Link to comment
  • 1 month later...

Hay!

I am trying to use this as a back-Up Solution.

I want a network Share, that is ONLY Upsynced wit a specific Onedrive Folder. is this Possible?

 

I already found this in the Documentation. https://github.com/abraunegg/onedrive/blob/master/docs/USAGE.md#performing-a-one-way-upload-sync

I guess that i need to replace the default Docker Startscript with this command?

 

I really Appreciate your Help!

Link to comment
  • 4 weeks later...

Hello,

 

I am having trouble with permissions and hoping someone can help me.   I setup the onedrive docker and it is downloading fine however the files are set to 

UNKNOWN   drwx------

Which does not let me shared user access them or another docker to access them to back it up.

 

My goal is to have onedrive always syncing down, then another docker backing it up with versioning.  I am testing FreeFileSync for the versioning part but it can't access the files either. 

 

If I run the Docker Safe New Perms tool it is fine until new files are added which is of course all the time.

 

How do I get the onedrive docker to use a user/permissions so my shared unraid user can access the files over smb and my other docker has permissions to access it?

 

Thank you

 

Link to comment
On 8/2/2023 at 8:33 AM, SilverLuxx said:

Hay!

I am trying to use this as a back-Up Solution.

I want a network Share, that is ONLY Upsynced wit a specific Onedrive Folder. is this Possible?

 

I already found this in the Documentation. https://github.com/abraunegg/onedrive/blob/master/docs/USAGE.md#performing-a-one-way-upload-sync

I guess that i need to replace the default Docker Startscript with this command?

 

I really Appreciate your Help!

Hello I'm backing specific share folder by using bind to mount the share folder I want to backup in to the one Drive folder,
the veritable set to "1"  ONEDRIVE_UPLOADONLY: to upload changes only and use UserScript to make sure it mount and unmount at start up or stop of  Array
Example: Photos
mount --bind /mnt/user/photos  /mnt/user/appdata/onedrive/OneDrive/photos

Link to comment
  • 2 months later...

I am trying to sync a "Sharepoint" location.  I have read the link for the project but it isn't clear how to incorporate that into the docker setup.  I was able to get my Sharepoint ID just trying to see how to allow that to sync with the docker and pull in my Sharepoint.

Link to comment
  • 1 month later...
On 3/10/2023 at 3:40 PM, cholzer said:

yeah, here is the real fix.  ;)

It's only taken me some months to get around to trying your suggestion and I can confirm it works! Anyone that encounters permission issues needs to do this to ensure any documents and folders synced down from OneDrive have the right permissions. So to simplify it for all the other noobs (like me) out there just seeking to sort out permissions, here is what I did on my Windows machine.

  1. Go to https://raw.githubusercontent.com/abraunegg/onedrive/master/config and copy the content into Notepad.
  2. Remove the # to uncomment the following parameters and adjust the permissions to sync_dir_permissions = "777" and sync_file_permissions = "777".
  3. Save the file to the config folder you created in the OneDrive docker container and simply call is 'config'. Note, no extension.
  4. Restart the OneDrive docker container and do a test run by creating a folder in OneDrive, adding a file to it and wait for it to sync to your server. Test that you can open the folder and the file on your Unraid server. At this point, you should be all set!

Thanks to @cholzer for pointing me in the right direction. This has been bugging me for a long time but I usually sync up from my Unraid server to OneDrive rather than the other way, so it didn't bug me enough to do anything about it until now.

Edited by bigrizz
Bad grammar
Link to comment
  • 3 weeks later...

I did set up the onedrive and unraid started to download, however, when trying to access the share from the network access was denied as the owner was root. when I changed the share owner to a different user i get the following error message. 

 

ERROR: The local file system returned an error with the following message:
  Error Message:    Cannot open file `Photos/Pictures/Samsung-Katalog/DCIM/Camera/20180514_114034.jpg.partial' in mode `wb' (Permission denied)

 

Is there a way to fix this or do I need to set up from scratch and make the share owner a user so I get access from the get go. 

Thank you

Link to comment
  • 3 weeks later...

@BVersluis I've run into an issue with your docker app package.  This seems very specific to business accounts and how docker initializes the `onedrive --synchronize` at startup.  Please refer to this github discussion for more information.

 

Here's the tldr;

 

Your app synchronizes personal accounts normally.  It doesn't synchronize business accounts normally - it constantly gets throttled and basically never fully synchronizes.  This seems specific to your startup script.  If I run `onedrive --synchronize` manually in terminal, it runs normally.  Please advise.

Link to comment
On 12/27/2023 at 8:05 AM, Daywalker said:

ERROR: The local file system returned an error with the following message:
  Error Message:    Cannot open file `Photos/Pictures/Samsung-Katalog/DCIM/Camera/20180514_114034.jpg.partial' in mode `wb' (Permission denied)

 

Is there a way to fix this or do I need to set up from scratch and make the share owner a user so I get access from the get go. 

Thank you

 

I had the same error and it seems you need to change (or add) a config for that.

 

That is where I have a problem. I added a "config" and a "sync_list" file (since I only want to sync specific folders as described in the git. Now I get an error, that --resync is necessary. (here is the log)

 

Quote

# Launching onedrive
Configuration file successfully loaded
An application configuration change has been detected where a --resync is required

 

I tried to reinstall the container, inserting the config before the first sync, but the same error occurs. I tried to add the config file before and after authorization. In this case I can access the Onedrive Console, but running the "onedrive --resync" command I get another error message

 

Quote

Application has not been successfully authorised. Please check your URI response entry and try again.

ERROR: Unable to perform a database vacuum: out of memory

 

Has anyone any clue, how to proceed from there? I just want to sync specific directories.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.