Dyon Posted July 27, 2020 Share Posted July 27, 2020 (edited) Welcome to the third Docker Container that I've ever created. owncloud-client. A Docker to synchronize with other ownCloud like environments, a project forked from the GitHub user toughIQ and altered to my wishes, with Unraid in mind. I couldn't find something that did this, thus I made it myself. Overview: This Docker runs an owncloudcmd instance that connects to an ownCloud-like environment and authorises using netrc The reason I created this is because I wanted to sync Trans IP's STACK to my Unraid server. That product is based on Nextcloud/ownCloud. This Docker should therefore work with any of those environments. This Docker can also be used to sync with a Nextcloud server that a friend hosts for example. Base: Debian 10 Automated Build: No Application: https://github.com/owncloud/client Docker Hub: https://hub.docker.com/r/dyonr/owncloud-client/ GitHub: https://github.com/DyonR/docker-owncloud-client Edited July 27, 2020 by Nord Quote Link to comment
vvzvlad Posted March 28, 2021 Share Posted March 28, 2021 (edited) My nextcloud server is running at https://nd.nl.tab.digital/ and has the following WebDAV address: remote.php/dav/files/[email protected]/ So I set "OC_WEBDAV" to "remote.php/dav/files/nextc[email protected]/" and I get the following errors in the logs: 03-28 19:08:11:406 [ info sync.discovery ]: STARTING "" OCC::ProcessDirectoryJob::NormalQuery "" OCC::ProcessDirectoryJob::NormalQuery 03-28 19:08:11:407 [ info sync.accessmanager ]: 6 "PROPFIND" "https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/" has X-Request-ID "af56746b-456d-40ef-a2e5-37c7404e5949" 03-28 19:08:11:407 [ info sync.networkjob ]: OCC::LsColJob created for "https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/" + "/" "OCC::DiscoverySingleDirectoryJob" 03-28 19:08:12:064 [ warning sync.networkjob ]: QNetworkReply::ContentOperationNotPermittedError "Server replied \"405 Method Not Allowed\" to \"PROPFIND https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/\"" QVariant(int, 405) 03-28 19:08:12:065 [ info sync.networkjob.lscol ]: LSCOL of QUrl("https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/") FINISHED WITH STATUS "ContentOperationNotPermittedError Server replied \"405 Method Not Allowed\" to \"PROPFIND https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/\"" 03-28 19:08:12:065 [ warning sync.discovery ]: LSCOL job error "Error transferring https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/ - server replied: Method Not Allowed" 405 QNetworkReply::ContentOperationNotPermittedError They clearly have the wrong address "https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/\" Also, a strange error: "03-28 19:08:11:130 [ info sync.networkjob ]: Redirecting "GET" QUrl("https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/ocs/v1.php/cloud/user?format=json") QUrl("https://nd.nl.tab.digital/apps/dashboard/")" P.S. Using the description "ownCloud Server URL, with, if necessary, with port" for the OC_SERVER field is wrong, because the field requires the server address (nd.nl.tab.digital), not its URL (https://nd.nl.tab.digital/), as stated in the description. Edited March 28, 2021 by vvzvlad Quote Link to comment
Dyon Posted March 28, 2021 Author Share Posted March 28, 2021 3 minutes ago, vvzvlad said: My nextcloud server is running at https://nd.nl.tab.digital/ and has the following WebDAV address: remote.php/dav/files/[email protected]/ So I set "OC_WEBDAV" to "remote.php/dav/files/nextclo[email protected]/" and I get the following errors in the logs: 03-28 19:08:11:406 [ info sync.discovery ]: STARTING "" OCC::ProcessDirectoryJob::NormalQuery "" OCC::ProcessDirectoryJob::NormalQuery 03-28 19:08:11:407 [ info sync.accessmanager ]: 6 "PROPFIND" "https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/" has X-Request-ID "af56746b-456d-40ef-a2e5-37c7404e5949" 03-28 19:08:11:407 [ info sync.networkjob ]: OCC::LsColJob created for "https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/" + "/" "OCC::DiscoverySingleDirectoryJob" 03-28 19:08:12:064 [ warning sync.networkjob ]: QNetworkReply::ContentOperationNotPermittedError "Server replied \"405 Method Not Allowed\" to \"PROPFIND https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/\"" QVariant(int, 405) 03-28 19:08:12:065 [ info sync.networkjob.lscol ]: LSCOL of QUrl("https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/") FINISHED WITH STATUS "ContentOperationNotPermittedError Server replied \"405 Method Not Allowed\" to \"PROPFIND https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/\"" 03-28 19:08:12:065 [ warning sync.discovery ]: LSCOL job error "Error transferring https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/ - server replied: Method Not Allowed" 405 QNetworkReply::ContentOperationNotPermittedError They clearly have the wrong address "https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/remote.php/webdav/\" Also, a strange error: "03-28 19:08:11:130 [ info sync.networkjob ]: Redirecting "GET" QUrl("https://nd.nl.tab.digital/owncloud/remote.php/dav/files/[email protected]/ocs/v1.php/cloud/user?format=json") QUrl("https://nd.nl.tab.digital/apps/dashboard/")" P.S. Using the description "ownCloud Server URL, with, if necessary, with port" for the OC_SERVER field is wrong, because the field requires the server address (nd.nl.tab.digital), not its URL (https://nd.nl.tab.digital/), as stated in the description. I see they offer a free 8GB account, I'll create one and look into it how to configure it. You are right about the OC_SERVER section in the README, I'll update that later. If I figured it out, I'll mention you in a new reply. Quote Link to comment
Dyon Posted March 28, 2021 Author Share Posted March 28, 2021 (edited) @vvzvlad This works for me OC_USER: USERNAME or EMAIL OC_PASS: PASSWORD OC_SERVER: mark.nl.tab.digital (ADDRESS MIGHT BE DIFFERENT FOR YOU, CHECK YOUR URL WHEN ACCESSING THE WEB INTERFACE) OC_URLPATH: / OC_FILEPATH: / RUN_UID: Your Unraid User ID RUN_GID: Your Unraid User's Group ID TRUST_SELFSIGN: 0 - Advanced settings - OC_WEBDAV: rempte.php/webdav OC_PROTO: https SYNC_HIDDEN: 0 SILENCE_OUTPUT: 1 RUN_INTERVAL: 30 Edited March 28, 2021 by Dyon Quote Link to comment
vvzvlad Posted March 29, 2021 Share Posted March 29, 2021 Yes, it was OC_URLPATH, it was set to "/owncloud/", when set to "/" it worked. Quote Link to comment
Sparkiee Posted April 11, 2022 Share Posted April 11, 2022 I just installed the Owncloud-client. When i use it to sync 1 directory, it works fine. I used the OC_Filepath with /TTD 2022-04-11 15:09:02.796140 [INFO] A group with PGID 100 already exists in /etc/group, nothing to do. 2022-04-11 15:09:02.837049 [INFO] An user with PUID 99 does not exist, adding an user called 'occlient user' with PUID 99 2022-04-11 15:09:03.548882 [INFO] Chaning ownership of all files and directories in /ocdata to 99:100 2022-04-11 15:09:03.588270 [INFO] SILENCE_OUTPUT is set to 1, setting run parameter '--silent' 2022-04-11 15:09:03.622686 [INFO] Running owncloudcmd as following: 2022-04-11 15:09:03.653833 [INFO] owncloudcmd --silent -n --non-interactive /ocdata https://rvoncken.stackstorage.com/remote.php/webdav/ But if I want to sync all the directories and use it with "/" it won't work ErrorWarningSystemArrayLogin 2022-04-11 15:09:52.701808 [INFO] A group with PGID 100 already exists in /etc/group, nothing to do. 2022-04-11 15:09:52.757745 [INFO] An user with PUID 99 does not exist, adding an user called 'occlient user' with PUID 99 2022-04-11 15:09:53.659672 [INFO] Chaning ownership of all files and directories in /ocdata to 99:100 2022-04-11 15:09:53.697707 [INFO] SILENCE_OUTPUT is set to 1, setting run parameter '--silent' 2022-04-11 15:09:53.731473 [INFO] Running owncloudcmd as following: 2022-04-11 15:09:53.763963 [INFO] owncloudcmd --silent -n --non-interactive /ocdata https://rvoncken.stackstorage.com/owncloud/remote.php/webdav/ Any sugestions? Quote Link to comment
Dyon Posted April 11, 2022 Author Share Posted April 11, 2022 (edited) 32 minutes ago, Sparkiee said: I just installed the Owncloud-client. When i use it to sync 1 directory, it works fine. I used the OC_Filepath with /TTD 2022-04-11 15:09:02.796140 [INFO] A group with PGID 100 already exists in /etc/group, nothing to do. 2022-04-11 15:09:02.837049 [INFO] An user with PUID 99 does not exist, adding an user called 'occlient user' with PUID 99 2022-04-11 15:09:03.548882 [INFO] Chaning ownership of all files and directories in /ocdata to 99:100 2022-04-11 15:09:03.588270 [INFO] SILENCE_OUTPUT is set to 1, setting run parameter '--silent' 2022-04-11 15:09:03.622686 [INFO] Running owncloudcmd as following: 2022-04-11 15:09:03.653833 [INFO] owncloudcmd --silent -n --non-interactive /ocdata https://rvoncken.stackstorage.com/remote.php/webdav/ But if I want to sync all the directories and use it with "/" it won't work ErrorWarningSystemArrayLogin 2022-04-11 15:09:52.701808 [INFO] A group with PGID 100 already exists in /etc/group, nothing to do. 2022-04-11 15:09:52.757745 [INFO] An user with PUID 99 does not exist, adding an user called 'occlient user' with PUID 99 2022-04-11 15:09:53.659672 [INFO] Chaning ownership of all files and directories in /ocdata to 99:100 2022-04-11 15:09:53.697707 [INFO] SILENCE_OUTPUT is set to 1, setting run parameter '--silent' 2022-04-11 15:09:53.731473 [INFO] Running owncloudcmd as following: 2022-04-11 15:09:53.763963 [INFO] owncloudcmd --silent -n --non-interactive /ocdata https://rvoncken.stackstorage.com/owncloud/remote.php/webdav/ Any sugestions? Your OC_WEBDAV path is incorrect for TransIP Stack, in Unraid edit the owncloud-client docker, and expand the advanced settings at the bottom and set OC_WEBDAV to this (without quotes): "remote.php/webdav" Edit: Nevermind, yours is set correctly. Change the: OC_URLPATH: /owncloud/ to: OC_URLPATH: / Edited April 11, 2022 by Dyon Quote Link to comment
Sparkiee Posted April 11, 2022 Share Posted April 11, 2022 6 minutes ago, Dyon said: Your OC_WEBDAV path is incorrect for TransIP Stack, in Unraid edit the owncloud-client docker, and expand the advanced settings at the bottom and set OC_WEBDAV to this (without quotes): "remote.php/webdav" Edit: Nevermind, yours is set correctly. Change the: OC_URLPATH: /owncloud/ to: OC_URLPATH: / Just did this. The log : 2022-04-11 15:46:35.313420 [INFO] A group with PGID 100 already exists in /etc/group, nothing to do. 2022-04-11 15:46:35.354755 [INFO] An user with PUID 99 does not exist, adding an user called 'occlient user' with PUID 99 2022-04-11 15:46:36.107088 [INFO] Chaning ownership of all files and directories in /ocdata to 99:100 2022-04-11 15:46:36.145682 [INFO] SILENCE_OUTPUT is set to 1, setting run parameter '--silent' 2022-04-11 15:46:36.179586 [INFO] Running owncloudcmd as following: 2022-04-11 15:46:36.210958 [INFO] owncloudcmd --silent -n --non-interactive /ocdata https://rvoncken.stackstorage.com/remote.php/webdav/ But nothing happens. Nothing is downloaded to my server and the data in teh target directory stays the same. Quote Link to comment
Dyon Posted April 11, 2022 Author Share Posted April 11, 2022 (edited) I don't see anything wrong with the other environment variables that you have set. Mine are exactly the same (I also use STACK) Since using "/TTD" works for you, I don't think it's a OC_PASS problem, so I assume you are already using the WebDav App Token from STACK. I suspect there might be a problem with the database that OwnCloud stores for synchronisation, since you switched from "/TTD" to "/" it might have gotten confused. What I would do it: Stop the container. As long as the container is stopped, there is no risk in removing the folder. Remove the folder /mnt/user/data/Ralf/Stack/ from your Unraid. Start the container again, the folder should get created automatically. Edit: These are my environment variables: OC_USER username OC_PASS webdav_app_token OC_SERVER my_ulr_for_stack.stackstorage.com OC_URLPATH / OC_FILEPATH / RUN_UID 1000 RUN_GID 100 TRUST_SELFSIGN 0 Sync Location /mnt/user/STACK/dyonr/ OC_WEBDAV remote.php/webdav OC_PROTO https SYNC_HIDDEN 0 SILENCE_OUTPUT 1 RUN_INTERVAL 30 Edited April 11, 2022 by Dyon Quote Link to comment
Sparkiee Posted April 12, 2022 Share Posted April 12, 2022 I don't know what happend. But yesterday the sync didn't work. After leaving it for the night, this morning all files were synced. And it works both ways. Only if i upload a file from my pc to Stack, it doesnt show up in my folder on Unraid. Maybe I have to be a bit more patient....... Quote Link to comment
Dyon Posted April 12, 2022 Author Share Posted April 12, 2022 2 hours ago, Sparkiee said: I don't know what happend. But yesterday the sync didn't work. After leaving it for the night, this morning all files were synced. And it works both ways. Only if i upload a file from my pc to Stack, it doesnt show up in my folder on Unraid. Maybe I have to be a bit more patient....... As far as I know (for my own experience), owncloud works sequential. So it will download all files first, when that is finished it will start the upload. So, you are saying if you upload a file via the STACK PC Client, it doesn't show up in the Unraid folder? Does it appear on the STACK website? Because I can't imagine it wouldn't sync that file Quote Link to comment
Sparkiee Posted April 12, 2022 Share Posted April 12, 2022 Exactly. Files from my stack are in sync with the folders on my unraid server. If I place something in a map on my Unraid server it will sync with the remote stack. I connected my Stack to a network share on my work pc. If i copy a file from my work pc to my Stack, the files will show up on my stack (logged in on stack to check this) but will not be synced to my Unraid server. Pretty strange. Quote Link to comment
Dyon Posted April 12, 2022 Author Share Posted April 12, 2022 (edited) 1 hour ago, Sparkiee said: Exactly. Files from my stack are in sync with the folders on my unraid server. If I place something in a map on my Unraid server it will sync with the remote stack. I connected my Stack to a network share on my work pc. If i copy a file from my work pc to my Stack, the files will show up on my stack (logged in on stack to check this) but will not be synced to my Unraid server. Pretty strange. That is really strange. As a test, I mounted my STACK in Windows, added a file, and a few moments later it did appear in the STACK folder on my Unraid. So it works for me... There are two things you can do. 1: Check the logs. Set the SILENCE_OUTPUT of the container temporary to "0". This will spam the container log, and not everything would be readable because of that. At the bottom of the spam, error should/could show up. (I haven't implemented something to output the log somewhere, might do that soon though, since it won't be a lot of effort) 2: Start Fresh. There could be an underlying problem that isn't easily visibele. Yes, you would need to redownload/resync everything with Unraid again. Stop the container. As long as the container is stopped, there is no risk in removing the folder. Remove the folder /mnt/user/data/Ralf/Stack/ from your Unraid. Start the container again, the folder should get created automatically. Edited April 12, 2022 by Dyon Quote Link to comment
Sparkiee Posted April 12, 2022 Share Posted April 12, 2022 I'll try bothe of the solutions. Can take a day or so. I'll keep you posted. Quote Link to comment
Sparkiee Posted April 12, 2022 Share Posted April 12, 2022 Shame on me. The log tells me the disk is almost full and downloading files would exceed the "needed" free diskspace. I forgot this test setup had less free disk space in comparison to my server. So i'll change the setting to sync only 1 folder just for testing it. Quote Link to comment
Dyon Posted April 12, 2022 Author Share Posted April 12, 2022 5 minutes ago, Sparkiee said: Shame on me. The log tells me the disk is almost full and downloading files would exceed the "needed" free diskspace. I forgot this test setup had less free disk space in comparison to my server. So i'll change the setting to sync only 1 folder just for testing it. Well, that explains a lot! Glad you found the issue. If you ever run into problems again, let me know! Quote Link to comment
Recommended Posts
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.