Skip to content

nextcloud is not properly setup using .well-known for caldav/cardav

When I load up a nextcloud service, I see the following issues with setup when running the internal checks.

Your web server is not properly set up to resolve "/.well-known/caldav". Further information can be found in the documentation.
Your web server is not properly set up to resolve "/.well-known/carddav". Further information can be found in the documentation.

Link: https://docs.nextcloud.com/server/20/admin_manual/issues/general_troubleshooting.html#service-discovery

Solution:

Traefik 1

traefik.frontend.redirect.permanent: 'true'
traefik.frontend.redirect.regex: https://(.*)/.well-known/(card|cal)dav
traefik.frontend.redirect.replacement: https://$$1/remote.php/dav/

Thanks to @pauvos for traefik example.
Traefik 2

[http.middlewares]
  [http.middlewares.nextcloud-redirectregex.redirectRegex]
    permanent = true
    regex = "https://(.*)/.well-known/(card|cal)dav"
    replacement = "https://${1}/remote.php/dav/"
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information