Next Cloud Integration
The NextCloud Integration doesnt work for me. I definetly added the correct URL, Password and Username and Calendar is present in my nextcloud dashboard. I dont know what i am doing wrong but it cant create the integration
Logs, even tough i am 100% sure the credentials are the right ones:
2025-03-23T20:43:13.131Z error: tRPC Error with mutation on 'integration.create': (INTERNAL_SERVER_ERROR) - Invalid credentials
Error: Invalid credentials
at er (/app/apps/nextjs/.next/server/chunks/9745.js:66:11712)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async ei (/app/apps/nextjs/.next/server/chunks/9745.js:66:12989)
at async ed.login (/app/apps/nextjs/.next/server/chunks/9745.js:66:16100)
at async iy.testConnectionAsync (/app/apps/nextjs/.next/server/chunks/5109.js:7:4626)
at async sp (/app/apps/nextjs/.next/server/chunks/5109.js:8:255)
at async /app/apps/nextjs/.next/server/chunks/5109.js:8:3315
at async l.middlewares (/app/apps/nextjs/.next/server/chunks/9745.js:116:1577114)
at async u (/app/apps/nextjs/.next/server/chunks/9745.js:119:68)
at async u (/app/apps/nextjs/.next/server/chunks/9745.js:119:68)
Error: Invalid credentials
Solution:Jump to solution
nvm i got the problem i used my own account and it has 2FA, i dont think homarr can work with that, sorry 😄
20 Replies
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?
Solution
nvm i got the problem i used my own account and it has 2FA, i dont think homarr can work with that, sorry 😄
Thanks for posting the solution. When I implemented the integration, it was not really clear in the Nextcloud docs, whether API keys are also supported. So I guess this is a limitation of the integration for now.
I'll document this on https://homarr.dev.
Homarr documentation
Simplify the management of your server with Homarr - a sleek, modern dashboard that puts all of your apps and services at your fingertips. With Homarr, you can access and control everything in one convenient location. Homarr seamlessly integrates with the apps you've added, providing you with valuable information and giving you complete control....
I was hoping to test if an app password created against my Nextcloud account would work, but it seems the integration is not accepting my server's certificate even though its generator, my local CA's certificate is uploaded to Homarr (which works fine for other integrations)
2025-03-31T11:30:31.495Z error: tRPC Error with mutation on 'integration.create'
....
caused by TypeError: fetch failed
at node:internal/deps/undici/undici:13502:13
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async A (/app/apps/nextjs/.next/server/chunks/9404.js:91:145950)
at async er (/app/apps/nextjs/.next/server/chunks/9404.js:92:11517)
at async ei (/app/apps/nextjs/.next/server/chunks/9404.js:92:12989)
at async eu.login (/app/apps/nextjs/.next/server/chunks/9404.js:92:17985)
at async iG.testConnectionAsync (/app/apps/nextjs/.next/server/chunks/5537.js:134:4626)
at async nc (/app/apps/nextjs/.next/server/chunks/5537.js:134:21116)
at async /app/apps/nextjs/.next/server/chunks/5537.js:134:24176
at async l.middlewares (/app/apps/nextjs/.next/server/chunks/9404.js:137:445831)
caused by Error: certificate has expired code="CERT_HAS_EXPIRED"
at TLSSocket.onConnectSecure (node:_tls_wrap:1679:34)
at TLSSocket.emit (node:events:518:28)
at TLSSocket._finishInit (node:_tls_wrap:1078:8)
at ssl.onhandshakedone (node:_tls_wrap:864:12)
at TLSWrap.callbackTrampoline (node:internal/async_hooks:130:17)
CERT_HAS_EXPIRED sounds pretty clear to me. Update it
It is updated otherwise all my other services would show the same. I've seen the same message generated when the certificate CA was not trusted
I have SABnzbd, qBittorrent, Pi-hole, Home Assistant and Proxmox integrations all accepting certificates generated by the same CA, but of course that only worked once I had upload the CA's certificate to Homarr - which I was glad to see was an option, unlike other projects where I've had to jump through hoops to get my CA into their containers.
Are NextCloud and all the other services using the same CA?
I just double checked, the CA certificate expires 2028, the Nextcloud certificate in 2026
Yes, the same CA
Did you upload a root certificate or the actual certificate of Nextcloud? Just to make sure, you uploaded the public key and not the private key?
I only uploaded the CA certificate, none of the others have needed me to upload their own certificates for them to work

Since Nextcloud is the only one not working, can you check what domain names your certificate is for (e.g. my-room-domain.com) and whether your Nextcloud is on a subdomain or subpath of that domain?
Name is, nextcloud.mydomain.com, alternates are nextcloud.mydoman.com & nextcloud
There is no subpath, just https://nextcloud.mydomain.com
The problem is that https://tsdav.vercel.app/, wich is the library that we use, the certificates that were uploaded to Homarr. Can you submit this as a bug report to
homarr-labs/homarr
? I'm not sure whether we can fix this. Perhaps we'll have to request this as a feature from that library.
As a workaround, you could use a certificate from a trusted root CA, not self signed.
See https://github.com/homarr-labs/homarr/blob/944010a7b185119f85dc351fc2727c444334f2e3/packages/integrations/src/nextcloud/nextcloud.integration.ts#L86-L96GitHub
homarr/packages/integrations/src/nextcloud/nextcloud.integration.ts...
A modern and easy to use dashboard. 14+ integrations. 10K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration. - homarr-labs/homarr
Sure, I'll submit a report.
I also just tested with wget in the container and it fails for all my servers that use that CA. Perhaps adding the CA to the main certificate store of the container would work, as this is how I've seen it done for other projects.
Damn, I thought maybe if I uploaded the certificate itself it would work but it doesn't.
Bug report submitted
@Slimekong did you try an app password (in your account Security section) as I am trying to do? I cannot confirm if it works as I have another issue, but for you it might be workable.
Can you try again with the
fix-nextcloud-self-signed-certs
image tag? For me it worked locally
Image is available in 5 minutesSure, I will try it later today and let you know.....
So I made progress, I deployed the new container, it started up as normal. I then tried to add the NC integration and it failed again. The container logged:
2025-04-01T06:34:49.198Z info: SIGTERM
2025-04-01T06:34:49.225Z info: ➖ Connection (1) 1006
2025-04-01T06:34:49.227Z info: ➖ Connection (0) 1006
15:M 01 Apr 2025 06:35:21.032 * 1 changes in 60 seconds. Saving...
15:M 01 Apr 2025 06:35:21.032 * Background saving started by pid 58
58:C 01 Apr 2025 06:35:21.037 * DB saved on disk
58:C 01 Apr 2025 06:35:21.038 * Fork CoW for RDB: current 0 MB, peak 0 MB, average 0 MB
15:M 01 Apr 2025 06:35:21.133 * Background saving terminated with success
So I opened a separate tab to Homarr to watch the log and this time no crash but it logged:
2025-04-01T06:36:27.482Z info: Dispatching request https://nextcloud.mydomain.com/.well-known/caldav (6 headers)
2025-04-01T06:36:27.542Z info: Dispatching request https://nextcloud.mydomain.com/remote.php/dav/ (9 headers)
2025-04-01T06:36:28.144Z error: tRPC Error with mutation on 'integration.create'
at Object.onError (/app/apps/nextjs/.next/server/app/api/trpc/[trpc]/route.js:1:4404)
at Object.onError (/app/apps/nextjs/.next/server/app/api/trpc/[trpc]/route.js:1:3561)
at /app/apps/nextjs/.next/server/chunks/4429.js:107:5071
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async /app/apps/nextjs/.next/server/chunks/4429.js:107:7031
at async /app/apps/nextjs/.next/server/chunks/4429.js:83:785967
caused by Error: Invalid credentials
I then realised this was caused by an incorrect user name, so I tried again. Another container crash and another retry and this time it worked. Not sure what is causing the container issues. but the SSL connection is fine and also confirms that app passwords work.
I'm going to have to revert back to the release container as this test one is still misbehaving and crapping out. I got some more logging which I will go through then post here, but I want to get it stable first.
Back to normal, the log I managed to capture is here: https://pastebin.com/a7kB29mr
Pastebin
Homarr container log - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
I think I'm going to have to restore the data now, as I keep getting these container errors. Was anything else changed other than for the integration?
Seems the data is not the cause of the container error, I reverted to the backup from last night and it's still doing the same. It does complain about network performance and then shuts down
(node:16) [DEP0040] DeprecationWarning: The
punycode
module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ...
to show where the warning was created)
(node:17) [DEP0040] DeprecationWarning: The punycode
module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ...
to show where the warning was created)
15:M 01 Apr 2025 12:28:46.075 * 1 changes in 60 seconds. Saving...
15:M 01 Apr 2025 12:28:46.076 * Background saving started by pid 53
53:C 01 Apr 2025 12:28:46.078 * DB saved on disk
53:C 01 Apr 2025 12:28:46.078 * Fork CoW for RDB: current 0 MB, peak 0 MB, average 0 MB
15:M 01 Apr 2025 12:28:46.176 * Background saving terminated with success
2025-04-01T12:29:01.728Z warn: The callback of 'downloads' succeeded but took 37.72ms longer than expected (1000ms). This may indicate that your network performance, host performance or something else is too slow. If this happens too often, it should be looked into.
2025-04-01T12:29:01.729Z warn: The callback of 'dnsHole' succeeded but took 38.41ms longer than expected (1000ms). This may indicate that your network performance, host performance or something else is too slow. If this happens too often, it should be looked into.
Received SIGTERM. Shutting down...
I changed the log level to just warn so I could more easily see the issues.Received SIGTERM. Shutting down...
Sounds like your host is sending a SIGTERM. This is not something Homarr can fix / do something about. Are you pressing CTRL + C or what happens when this message is logged?No, I'm not doing anything myself, but I think you're right that something outside of the container is sending SIGTERM - I'm still looking for the reason. I have 6 or so other containers all running just fine, so it's specific to just this one.
I found the issue, my server thought the container was still starting and so killed it. I'm going to re-try the Nextcloud fix and see if that now works now that the container isn't randomly killing itself.
🎉 it's working and no more errors from the container being killed. @Meierschlumpf your fix looks good, thanks.