Calendars and address books are among the data we check most every day, yet many people leave them on a commercial service simply because syncing "just works". In fact there are open standards, supported by almost every device, that let you host them at home with a tiny server: CalDAV for calendars and CardDAV for contacts.
The standards in a nutshell
CalDAV and CardDAV are extensions of WebDAV, which is itself based on HTTP. Data travels in well-known text formats: iCalendar (.ics files) for events and tasks, vCard (.vcf files) for contacts. This means a calendar exported today will remain readable by any future program: the risk of being locked into one application is very low.
Choosing the server
For home use you don't need a full suite. Two projects stand out for their simplicity:
| Server | Language | Storage | Features |
|---|---|---|---|
| Radicale | Python | files on disk | minimalist, configured in one file |
| Baïkal | PHP (sabre/dav) | SQLite or MySQL | web administration interface |
If you already run Nextcloud, CalDAV and CardDAV are built into the Calendar and Contacts apps, and you don't need a separate server.
Radicale, the lightest route
Radicale stores each calendar and address book as folders of files on disk. This is a notable advantage: backing up means copying a folder, and the files can even be inspected with an editor. A bare-bones configuration:
[server]
hosts = 0.0.0.0:5232
[auth]
type = htpasswd
htpasswd_filename = /etc/radicale/users
htpasswd_encryption = bcrypt
[storage]
filesystem_folder = /var/lib/radicale/collections
Users are created with the htpasswd tool, choosing the bcrypt algorithm. The built-in web interface lets you create calendars and address books and get the address of each one.
Radicale should sit behind a reverse proxy with HTTPS: credentials are sent with every request, and without encryption they would be readable by anyone intercepting the traffic.
Connecting devices
Android
Android does not include a native CalDAV/CardDAV client. The open source app DAVx⁵ fills the gap: you enter the server address with username and password, and the calendars and address books appear in the system apps as if they were normal accounts. For tasks you can pair it with a compatible app such as Tasks.org or jtx Board.
iPhone and Mac
iOS and macOS both support the protocols natively: in the settings you add a "CalDAV" and a "CardDAV" account, entering server, user and password. If the server supports automatic discovery via the /.well-known/caldav and /.well-known/carddav addresses, the domain name alone is enough.
Computers
Thunderbird handles CalDAV/CardDAV calendars and address books without add-ons. On Linux, the mail and calendar suites of the main desktop environments offer similar support.
The well-known redirect
Many clients try to discover the service automatically. A small rule in the reverse proxy saves you from typing long paths:
/.well-known/caldav -> /radicale/
/.well-known/carddav -> /radicale/
Without this rule some clients show generic connection errors, even though the server works perfectly.
Migrating from a commercial service
Migration is one of the most delicate moments. A cautious procedure:
- export each calendar as
.icsand the address book as.vcffrom the old service; - create calendars and address books on the new server with clear names;
- import the files from a desktop client such as Thunderbird, which copes well with large files;
- check recurring events, reminders and time zones on a sample of entries;
- disable syncing of the old account on phones only after checking, to avoid duplicates.
Recurring events with exceptions (for example a weekly meeting moved once) are the ones that most often break during imports: check them first.
Sharing with the family
A shared family calendar is one of the most appreciated uses. Radicale manages permissions through a rights file: you can give several users read and write access to a common collection while keeping personal calendars private. Baïkal and Nextcloud offer the same feature from their interfaces.
Backup
With Radicale, simply include the collections folder in your backup system. With Baïkal or Nextcloud you need to save the database. In any case, a periodic .ics and .vcf export of the most important data provides a copy that is independent of any server and readable years later.
In short
- CalDAV and CardDAV are open standards with durable text formats.
- Radicale stores everything as files on disk and is ideal for home use; Baïkal offers a web interface.
- Android needs DAVx⁵, while iPhone, Mac and Thunderbird support the protocols natively.
- The well-known redirect simplifies client configuration.
- During migration, check recurring events with exceptions first.