Skip to main content

4. Fixing "Caldav" and "Carddav Errors"

On almost every nextcloud installtion via docker so far, I have seen this error pop up. This may cause issues when trying to sync contacts or calendar events through apps. For this reason, we need to edit a text file to fix the error



How to Fix This Error:

In order to fix this error, we are going to have to execute into the nextcloud container. Enter the following commands:

docker exec -it nextcloud /bin/bash

You should observer your terminal change into something like this: root@f78959f71f14:/var/www/html#

Then enter:

cd /etc/apache2/sites-enabled
apt update
apt install nano
nano 000-default.conf

You should see a text file like so:


Underneath <\VirtualHost>, copy and paste the following ENSURING you change to your own domain

Redirect 301 /.well-known/carddav
Redirect 301 /.well-known/caldav
Redirect 301 /.well-known/webdav
Redirect 301 /.well-known/webfinger
Redirect 301 /.well-known/nodeinfo

It should then look something like this:


Then enter Ctrl + X,y and Enter

Type exit to return to your host terminal.

To start nextcloud again enter docker restart nextcloud

And this time when you check the overview page, there should be no errors! There might be an error complaining about /.well-known/webfinger and /.well-known/nodeinfo but they do not affect any functionality and can thus be safely ignored. Proceed to the next page, for increasing the maximum size limit when uploading files.