Syncing calendars and contacts using ownCloud

Recently I had to cope with some appointment collisions due to the fact that I’m using several devices (notebooks, handsets). Though I love my job, I tend to separate private and business data. This made the situation even worse :) .

Many people use cloud services to synchronise PIM data across their devices. Services used include iCloud or Google’s. I was looking for a solution, though, where I control the infrastructure.

ownCloud

I posted about ownCloud recently. Today I’ll focus on calendar and contacts.

The data can be accessed via ownClouds web interface using any browser. Additionally ownCloud exposes the data via CardDav and CalDav. Any client capable of using those protocols can be used to access the data of your ownCloud installation.

ownCloud can import both contacts as well as calendar data.

For contacts, choose a vcf file from your local computer. Apple’s address book can create such a file by selecting all contacts and exporting it as vCard.

For calendar data, upload an ics file to the file section of ownCloud. Click on this file from ownClouds web interface. ownCloud will offer to import the file into an existing calendar or to create a new one:

iCal can export such calendards by right clicking on one of the calendars of its calendar list:

iCal

iCal provides built-in support for CalDav. Do not attempt to subscribe to your calendars via its subscription menu command. Instead, visit iCal’s preferences and add an CalDav account as described in yesterday’s posting:

Address Book

Enter the ownCloud CardDAV data source via its preference pane:

Thunderbird Contacts

You first need to download and install the SOGo-connector add-on:

After restarting thunderbird, open its address book. From the menu »File« point to »New« and choose »Remote Addressbook«:

The required URL can be retrieved from ownClouds web interface:

Thunderbird Lightning Calendar

The calendar is an add-on the user can install directly via the add-on manager of thunderbird. After the installation, a restart is required. Then choose the calendar pane, add a new calendar, choose network, choose CalDav and enter the URL.

In case you are using ownCloud as the calendar server, it provides the required URLs via its web interface. Do not use the base URL for all calendars. Use the URLs for each individual calendar instead:

Android Contacts

Install CardDAV-Sync free beta or CardDAV-Sync beta (in case you want to use the extra features) by Marten Gajda.

Via the system preferences, add a new carddav account:

That’s it. The synchronised contacts should automatically appear in your contacts editor.

Some editors seem to have problems using this approach. Marten Gajda thus wrote an extra »Contact editor« to circumvent the issues. Both free and pro versions should do the job.

Android Calendar

CalDAV-Sync by Marten Gajda is required. Once again, via the system preferences, add a new caldav account:

That’s it. The synchronised events should automatically appear in your calendar application.

Some editors seem to have problems in Jelly Bean. Marten Gajda thus wrote an extra piece of code called »JB Workaround CalDAV-Sync« to circumvent the issues.

Limitations

The calendar sync only syncs calendar events. I haven’t tried to set up Task respectively ToDo sync.

What’s still missing is to sync to the N900 as described by Thomas Tanghus.

What I’m still missing is the synchronisation of other data, like bookmarks or RSS feeds. ownCloud can’t help with this at the moment. I’m eagerly waiting for the next releases :) .

Hints

ownCloud had problems to read the calendar file I exported from iCal. I fixed it by removing some recurring events from within iCal before the export.

Now that ownCloud imported the file, iCal was trying to sync the calendar all night. I fixed this by creating an empty calendar in owncloud. Then I moved the events to the online calendar from within iCal manually. This was painful, but I used the occasion to purge my calendar so it was worth the effort :) .

Conclusion

Now that I have a working setup I am quite content with the results. Contacts and Calendar events do no longer reside on one machine alone, but are ubiquitous. Additionally I have access from any place where a web browser and an internet connection is available.

However, it took my some hairs to figure out the bits to get everything up and running.