H
Homarr2mo ago
FloRyuKo

Nextcloud integration fails with "cannot find homeUrl"

I'm self-hosting Homarr in a docker container and Nextcloud with apache (no container) i have a private CA for Nextcloud and others services i host on my rapsberry pi. I uploaded the certificate into Homarr. And I have the env variable NODE_EXTRA_CA_CERTS In my browser (Windows) I can reach https://192.168.1.1/nextcloud/ocs/v2.php/apps/serverinfo/api/v1/info give me 200 status code OK in SSH (raspberryPi) : docker exec -it homarr bash then curl -u nextcloud:password -H "OCS-APIRequest: true" --cacert /appdata/trusted-certificates/private-ca.crt https://192.168.1.1/nextcloud/ocs/v2.php/apps/serverinfo/api/v1/info works too ! a4: Unable to connect to the integration caused by Error: cannot find homeUrl Can provide more info and logs if wanted
10 Replies
Cakey Bot
Cakey Bot2mo ago
Thank you for submitting a support request. Depending on the volume of requests, our team should get in contact with you shortly.
⚠️ Please include the following details in your post or we may reject your request without further comment: - Log (See https://homarr.dev/docs/community/faq#how-do-i-open-the-console--log) - Operating system (Unraid, TrueNAS, Ubuntu, ...) - Exact Homarr version (eg. 0.15.0, not latest) - Configuration (eg. docker-compose, screenshot or similar. Use ``your-text`` to format) - Other relevant information (eg. your devices, your browser, ...)
Frequently Asked Questions | Homarr documentation
Can I install Homarr on a Raspberry Pi?
Manicraft1001
Manicraft10012mo ago
!qa required_data
Cakey Bot
Cakey Bot2mo ago
Thank you for your question. Our support team has noted that your request does not meet the minimum required data so we are unable to answer your question. Please provide: - your Homarr logs - your setup configuration (eg. docker compose, docker run, helm chart, screenshot, ...) - A detailed description of your problem or question with additional images where necessary - Your operating system - Version of Homarr (do not say latest! say 0.15.2, ...) Failure to comply with this will result in a permanent closure of your support request.
Meierschlumpf
Meierschlumpf2mo ago
Seems to be an issue here: https://github.com/natelindev/tsdav/blob/03bc93dd8cd61d9b7777ca285cda37b024fe2443/src/account.ts#L122 I think the problem might be that you are not using the baseurl? can you share the structure of your url that you have set for your nextcloud integration?
GitHub
tsdav/src/account.ts at 03bc93dd8cd61d9b7777ca285cda37b024fe2443 ·...
WebDAV, CALDAV, and CARDDAV client for Nodejs and the Browser - natelindev/tsdav
Meierschlumpf
Meierschlumpf2mo ago
Also I would suggest that you add the env variable DEBUG and set it to * as the tsdav package is using the npm package debug which logs only when DEBUG either includes * or the related pattern
FloRyuKo
FloRyuKoOP2mo ago
Homarr logs : already provided (do you want container logs) Setup configuration : docker run in rasberry pi detailed description : already done OS : Debian 12 (linux 6.12.22) aarch64 Homarr version : 1.27 My Nextcloud URL is : https://192.168.1.1/nextcloud
FloRyuKo
FloRyuKoOP2mo ago
With DEBUG enabled
Meierschlumpf
Meierschlumpf2mo ago
Okay when I analysed the tsdav library we are using correctly, it seems like it is using the wrong path to get the principal url, because it strips away the path you are specifying:
// variables that are passed arround
const accountType = 'basic';
const serviceUrl = 'https://192.168.1.1/nextcloud';

const endpoint = new URL(serverUrl); // endpoint.href -> https://192.168.1.1/nextcloud
const uri = new URL(`/.well-known/${accountType}`, endpoint); // uri.href -> https://192.168.1.1/.well-known/basic
// variables that are passed arround
const accountType = 'basic';
const serviceUrl = 'https://192.168.1.1/nextcloud';

const endpoint = new URL(serverUrl); // endpoint.href -> https://192.168.1.1/nextcloud
const uri = new URL(`/.well-known/${accountType}`, endpoint); // uri.href -> https://192.168.1.1/.well-known/basic
Therfore if it makes the request to https://192.168.1.1/.well-known/basic it just gets a method not allowed back as it is supposed to call https://192.168.1.1/nextcloud/.well-known/basic I don't see a good way on how we can fix this at the library level (at least not right now), so if you find a work arround like proxying the request through a reverse proxy (for example cloud.example.com to 192.168.1.1/nextcloud) it should fix your issue
Meierschlumpf
Meierschlumpf2mo ago
I've created an issue for it on GitHub so we can at some point work on it: https://github.com/homarr-labs/homarr/issues/3597
GitHub
bug: nexcloud integration with subpaths do not work · Issue #3597 ...
Describe the bug For example when having your nextcloud instance at https://example.com/nextcloud, the tsdav library is stripping away the /nextcloud path when calling the discovery url: // variabl...
FloRyuKo
FloRyuKoOP2mo ago
Okay I will try with Apache as reverse proxy like I'm doing for others services I modified my server to access nextcloud at https://cloud.home instead of https://192.168.1.1/nextcloud and now i can have my calendar into Homarr with nextcloud integration !

Did you find this page helpful?