Hacker News new | past | comments | ask | show | jobs | submit login
Rediscovering CardDAV (jpmens.net)
188 points by jandeboevrie 51 days ago | hide | past | web | favorite | 28 comments



I spent a lot of time last year looking for alternatives to iCloud for local syncing of calendar, notes, and contacts for macOS iOS. It's real easy to spend a lot of time banging your head against a wall trying to get things working.

I learned to be suspicious of any posts that said things like "This should work!" instead of "Here are step by step instructions for what I actually did that worked for me under these conditions on this date." Things that work for Windows don't necessarily work for Macs. Things that work at one time, don't necessarily work at another time.

Sometimes there was just one little detail missing, obvious afterwards but undocumented and costing an hour or two of messing around to find. Sometimes I gave up on a promising solution (such as radicale) because I just couldn't find that one missing step. That's why complete documentation of someone's experience is so valuable for someone trying to recreate another person's success.

Here's what worked for me (on Jan 2019), a setup that used apache, DAViCal, postfix, dovecot on CentOS 7 in VirtualBox on macOS 10.14:

"Replacement of macOS Server: Calendar, Contacts, and Mail" https://7402.org/blog/2019/replacement-macos-server.html

It was broken by the end of year due to changes by Apple, requiring the following fix (as of Dec 2019):

"New self-signed SSL Certificate for iOS 13" https://7402.org/blog/2019/new-self-signed-ssl-cert-ios-13.h...

Good luck. It's satisfying to get one's own server working, but it might take on-going maintenance.


I remember years ago getting mysql, php, nginx, dovecot, postfix and horde to work together to get ActiveSync to my android. Took a long time and lots of reading but in the end it felt great. Then a week later a horde update broke it.

In hindsight it's probably better to spend the money on a hosted solution.


This was useful to me: I've had trouble managing vcard with mutt, and without mutt I'd probably have to give up email. I began using caldav for a similar reason: I'm on Android and my wife is on iOS, and it annoyed me that Android tries desperately to standardize you on Gmail and addressbook, while iOS insists you use iCloud. I like maintaining a degree as independence.

I'm not as clever as the individual who wrote this useful blog, but in my case I set up an account with Fruux, who offers vcard and vcal as a service. It syncs perfectly across several OSes (on Windows I used eMclient, and on Linux as I mentioned I've struggled). Anyone who wants to avoid setting up custom servers, Fruux handles that part easily.

This afternoon I'll try to see if I can get vdirsyncer and khard working. I really wish the likes of thunderbird and kmail offered better carddav and caldav support. Evolution does, but I'm not a huge fan of Evolution (and not sure why).


As far as I know, Android doesn't support CalDAV or CardDAV. Any apps I tried were lacking in some way or another. How did you get Android to sync with Fruux?


I used DAVx5 from Bitfire (available on F-Droid and the Play Store) and it works very well. It is able to sync on multiple devices and from multiple providers.


I have been quite happy with https://dmfs.org/caldav/. There is also a carddav client from the same publisher.


Fastmail also provides syncing of contacts via CardDAV [1].

Works great with iOS and MacOS out of the box, never had issues with it.

[1]: https://www.fastmail.com/help/technical/servernamesandports....


The only issue I’ve had with CardDAV on FastMail is a ridiculously obscure edge case: it doesn’t like the ID strings of rooms on my Matrix server (e.g. !randomcharacters:example.com — it strips out the colon and everything after it). Fortunately, iCloud doesn’t mangle them and and the contacts app on iOS lets you merge contacts from multiple sources.


Have you contacted FastMail support about the escaping/truncation bug you describe? What was their reply?


You know, it didn’t even occur to me to contact them at the time since I was able to find a workaround. But that’s a good idea, I’ll see what they have to say.

Edit: looks like they found and fixed the issue on their own, I just tried it again and it worked.


I've been using a similar setup for probably 8+ years now. It started out with an ownCloud instance on a Raspberry Pi B+ (but has since evolved to nextCloud and a VPS, which I also use to run other things). I've been incredibly happy with it. I didn't have to worry about moving my contacts over when I switch to a new device (whether that be laptop or phone) – I just have to add the synchronization to the new device. This, plus calDav (I just `khal` and `todoman` for CLI calendar and to-do lists) have been excellent.


I myself use DAVx^5 with NextCloud for many years and it works fine. But having written quite a bit of client code for CalDAV, let me tell you these are really arcane protocols in dire need of replacement. It's really no fun at all, and I wish "we all" could move to something a bit more modern (which essentially means: something more RESTy). I have no idea how this could work, though...


WebDAV is about as RESTy as you’re likely to ever see. Collections containing different resources, different behaviors based on ContentType, extensible to allow different types of data. Behavior and state determined by hypertext.

Usually when people say they don’t like CalDAV or CardDAV, they mean they don’t like XML, non-GET verbs, and Versit Consortium syntax (none of which are in conflict with REST)?

I’ll admit Versit syntax, with it’s significant whitespace, among other warts, is a bit of a pain.

JMAP is really the same data model as CardDAV and CalDAV, just with different encodings of everything, if that’s what you want.



Yes, I really hope that JMAP succeeds and applaud Fastmail for taking this on. The problem of course is that there's a huge drag in getting new protocols like these established. One problem is that Fastmail works with Cyrus, but Dovecot seems to be much more popular nowadays. Of course, getting a new protocol into Dovecot is a pretty big undertaking, but I hope they will eventually find the time to do this.


there's an excellent easy to setup python carddav/caldav server

https://radicale.org/2.1.html


I've used this for self hosting contacts and calendar for many years now and it had been very low maintenance and good. Shared calendar with SO, synced across all devices. I even copy/paste pics of many contacts to have little icons and stuff in the db. Love it.


Same for me, it was basically set&forget. I recently added the InfCloud integration, which basically is a webclient for caldav/carddav, hosted within the radicale instance, which is very nice if you want to check things without your device.

[1]https://github.com/Unrud/RadicaleInfCloud


This is what I've been using, but it appears to be abandoned now?

I finally got the caldav part of it to work for a group of people using various flavors of Mac, Linux, and Windows -- PCs and phones. It was a huge pain in the ass, because each client accepted a different form of base-url-plus-calendar-locator, and some very non-technical users were on the other side of the planet, and it took weeks of trial and error before we got everything working.

Carddav looks hopeless, I can't even something that works between DavX5 on my android phone, and whatever the hell my wife's iPhone needs, and we're in the same room.


> This is what I've been using, but it appears to be abandoned now?

The last commit to master on their GitHub repo[0] was yesterday[1]

[0] https://github.com/Kozea/Radicale

[1] https://github.com/Kozea/Radicale/commit/27ac0ed0256bf3f5bc8...



The iphone seems to be very particular about which caldav/carddav implementations it works with. I had to move through 2 different email/caldav/cardav providers before landing on mailbox.org, whose implementation sync fine with the iphone ime.


I've been running Radicale for years! I pulled all my Google contacts back in 2013 and have been using it and DavDroid (now DAVx5 in the article) for years. I never bought the app but have sent money to their donation link.

Here's a dockerfile for Radicale if anyone wants to try it:

https://github.com/sumdog/bee2/tree/master/dockerfiles/Radic...

CardBook for Thunderbird is another great plugin. Between all those tools, I have cal/contact sync across my Linux boxes and Android devices.


I've been using mcds as a command line interface to a CardDav server.

https://github.com/t-brown/mcds


Really wish GroupDAV would have gained more traction.


This is perfect timing as I've just moved to Sailfish in my journey away from Google. Moving past Gmail is next, and contacts was something I wanted to self host.


> I can no longer sync iOS’ Contacts with my macOS Catalina’s Finder

I'm not sure I understand what this means; how does Finder access and sync contacts?


The iOS (and iPod) sync portion of iTunes is now built into the Finder in macOS Catalina, now that iTunes has been split up into different apps (Music, Podcasts, etc)




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: