Howto sync OC contacts with macOS?

9.1.x

#1

I try to sync a bunch of Mac running the latest macOS (Sierra) operating system with my owncloud addressbooks. The macOS contacts app should be able to handle CardDAV contacts natively (as mentioned in the FAQs here at oc central), but I was unable to make it work, yet.

I tried several settings (with "principals" added on the one or other spot) as recommended on various websites including the standard URL which OC provides for the addressbooks. Either I get a "username/password cannot be authenticated" error, or I can successfully create the account, but no contacts are synced (the local addressbook on the mac just stays empty).

Steps to reproduce
1. On macOS: add CardDAV account
2. Account Type: Extended, Username: , Password: , Serveraddress: myowncloudserver.example.com, Serverpath: /owncloud/remote.php/... (pasted from addressbook URL), Port: , SSL: yes

Expected behaviour
Contacts should be synced down to the Mac

Actual behaviour
Addressbook stays empty

Server configuration
Operating system: Ubuntu 14.04
Web server: Apache
Database: MySQL
PHP version: 7.0.15
ownCloud version (see ownCloud admin page): 9.1.4
Updated from an older ownCloud or fresh install: update
Special configuration (external storage, external authentication, reverse proxy, server-side-encryption): -


#2

Hey,

I use this day to day. I used the "manual" account type and just give the URL to the ownCloud instance.

Cheers,
Tom


#3

Did you set the well-known-redirections for you domain?

Redirect 301 /.well-known/carddav /owncloud/remote.php/dav
Redirect 301 /.well-known/caldav /owncloud/remote.php/dav

https://doc.owncloud.org/server/9.1/admin_manual/issues/general_troubleshooting.html#troubleshooting-contacts-calendar

You should also use ssl by default with a public certificate (e.g. letsencrypt).


#4

Yes, I added the Redirect statements to the .htaccess of the document root and my server does use let's encrypt certificates.

About the redirects: Would it make more sense to add them to an enabled config rather than to the .htaccess?

Thanks,
Marcus.


#5

Put them in the config really does activate them. In .htaccess it depends if you have set your webserver that allows you to change these settings via .htaccess. I would also try with curl or wget if the redirect is working, you easily put such statements at the wrong position.

Does iOS work for you with cardDAV (this is something I tried recently)?


#6

Sorry for the late reply,

Does iOS work for you with cardDAV (this is something I tried recently)?

Yes, iOS works perfectly!

Marcus.


#7

Hi All,

It seems that I have solved the problem today.

I added the following lines to my

/etc/apache2/conf-available/owncloud.conf

file (and not to the .htaccess file):

Redirect /.well-known/carddav /owncloud/remote.php/dav
Redirect /.well-known/caldav /owncloud/remote.php/dav

Then I used the following settings on the Mac:

Account Type: Manual
Username: <username>
Password: <password>
Serveraddress: https://<myserver>/owncloud/remote.php/carddav

Hope this helps anyone with a similar problem!
Marcus.