Nextcloud: Clients cannot find caldav/carddav properties / ".well-known" URL not working

I’ve just struggled with bringing my Nextcloud on Turris Omnia back up again and want to save the information for eternity here (Just in case someone comes around struggling with same problem, including me ;-)):

root@turris:/etc/lighttpd# cat /etc/lighttpd/conf.d/nextcloud.conf 
alias.url += ( "/nextcloud" => "/srv/www/nextcloud" )

$HTTP["url"] =~ "^/nextcloud/(build|tests|config|lib|3rdparty|templates|data)" {
     url.access-deny = ("")

url.redirect += (
	"^/.well-known/caldav"  => "/nextcloud/remote.php/dav",
	"^/.well-known/carddav" => "/nextcloud/remote.php/dav"

I’ve added the url.redirect… to the lighttpd configuration (/etc/lighttpd/conf.d/nextcloud.conf) to make auto discovery for new Nextcloud clients work (again).


Did you check it on different clients? I get this error on firefox clients, but not an safari clients…

You could check if the url is accessible with curl, to see if it‘s a client or server problem…

I had problems with the setup of an Android phone client using DAVx5. The log of the app pointed me to the redirect solution.