Can't get Thunderbird to sync calendar/contacts w/ Nextcloud

Hi everyone.

I’m having difficulty getting Thunderbird to sync to my NC calendar and contacts.

This used to work, but I recently had a hard drive failure on my workstation and am having to rebuild from scratch.

I’ve attempted to point Thunderbird to my NC calendar as:

https://nextcloud.example.com/remote.php/caldav (redacted)

Thunderbird reports that it can’t find any calendars. When I point a browser at that url, I get a blank screen.

When I got to NC’s admin/overview screen, I see:

There are some errors regarding your setup.

  • Your web server is not yet properly set up to allow file synchronization, because the WebDAV interface seems to be broken. To allow this check to run you have to make sure that your Web server can connect to itself. Therefore it must be able to resolve and connect to at least one of its trusted_domains or the overwrite.cli.url. This failure may be the result of a server-side DNS mismatch or outbound firewall rule.

  • Your web server is not properly set up to resolve .well-known URLs, failed on: /.well-known/caldav For more details see the documentation :up_right_arrow:.

I’m running Nextcloud Hub 10 (31.0.4) in a docker container.

I don’t see any interesting log entries in any of the containers.

I’ve got NC running behind a caddy reverse proxy, fyi.

I guess I need to explore what the “trusted_domains” setting is, and where to set it. Any guidance on that and any further troubleshooting help would be most appreciated.

Mike.

I think there is general problem related to system setup, most likely reverse proxy.
Please review 101: reverse proxy and post config and logs according to support template

Alright, I’m going to post the requested info from the Support Template. Sorry about not doing it “right” the first time. :grinning_face:

Here we go:

I’m having difficulty getting Thunderbird to sync to my NC calendar and contacts.

I’ve attempted to point Thunderbird to my NC calendar as:

https://nextcloud.example.com/remote.php/caldav (redacted)

Thunderbird reports that it can’t find any calendars. When I point a browser at that url, I get a blank screen.

When I go to NC’s admin/overview screen, I see:

There are some errors regarding your setup.

  • Your web server is not yet properly set up to allow file synchronization, because the WebDAV interface seems to be broken. To allow this check to run you have to make sure that your Web server can connect to itself. Therefore it must be able to resolve and connect to at least one of its trusted_domains or the overwrite.cli.url. This failure may be the result of a server-side DNS mismatch or outbound firewall rule.
  • Your web server is not properly set up to resolve .well-known URLs, failed on: /.well-known/caldav For more details see the documentation :up_right_arrow:.

I don’t see any interesting log entries in any of the containers.

I guess I need to explore what the “trusted_domains” setting is, and where to set it. Any guidance on that and any further troubleshooting help would be most appreciated.

So, here is the extra information you asked for:

I’m using Nextcloud Hub 10 (31.0.4) in a Docker container.
The host is running “24.10 (Oracular Oriole)”.
I’m using Caddy 2.6.2 as the reverse proxy.

Here is the applicable caddy config entry: (redacted)

https://nextcloud.example.com {
tls mdiehl@example.com
reverse_proxy 192.168.1.15:11000
}

I’ve had this working before, but I had a hard drive failure and had to rebuild. But I rebuilt with the same script that I used to build it the first time.

sudo docker run
–init
–sig-proxy=false
–name nextcloud-aio-mastercontainer
–restart always
–publish 8080:8080
–env APACHE_PORT=11000
–env APACHE_IP_BINDING=0.0.0.0
–env APACHE_ADDITIONAL_NETWORK=“”
–env SKIP_DOMAIN_VALIDATION=false
–env NEXTCLOUD_DATADIR=“/home/shared/Containers/NextCloud”
–volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config
–volume /var/run/docker.sock:/var/run/docker.sock:ro
nextcloud/all-in-one:latest

My environment is behind Cloudflare, fyi.

Any advise you can give me would be most appreciated. And once again, thank you for your time.

Mike.

you get the calendar URL from calendar-app settings - it looks like https://cloud.mydomain.tld/remote.php/dav.. in my Thunderbird I see a calendar https://cloud.mydomain.tld/remote.php/dav/calendars/{user name}/{calendar name} but this exactly where the caldav setup_warning_wellknown comes into play - read the docs and use search we have many many topics related this issue.

Posted it in the wrong spot earlier

I’m presuming you have the same issue as iOS: CalDav/CardDAV: domain daaccountvalidationdomain / error 100 and How to resove well-know caldav and carddav Security & Set Up Warning

I just fixed this today and the way I determined the issue was to do

curl -v https://[redacted]/.well-known/carddav

In my case before the fix I noticed that the redirect was

Location: http://[redacted]/remote.php/dav

Note it says http rather than HTTPS.

So I modify my Caddyfile to have explicit redirects to the HTTPS

  redir /.well-known/carddav https://[redacted]/remote.php/dav 301
  redir /.well-known/caldav https://[redacted]/remote.php/dav 301
  redir /.well-known/webfinger https://[redacted]/index.php/.well-known/webfinger 301
  redir /.well-known/nodeinfo https://[redacted]/index.php/.well-known/nodeinfo 301

reverse proxy http → https redirect is useful but in general Nextcloud should generate valid https URL itself. review 101: reverse proxy for required settings, especially overwriteprotocol

You would think so but I noticed it didn’t. Here’s the output of my occ command.

07:46 trajano ❯ occ config:system:get overwriteprotocol
https

TBH I found quite a few buggy behaviour on NextCloud, but most of it are on the Web UI itself. For the most part on my use case “family photo sharing” it wasn’t too bad because all the rest of the family had to do was have the sync client and they do everything on their side avoiding the web UI entirely.