I run an installation of Owncloud 4 for quite some while now. I mainly used it to sync calendars and contacts between my business devices. Recently I retired my beloved Nokia N900, which served me very well for more than 4 years, in favour of an Android device, so syncing my private calendars and contacts is finally possible. Though news feeds are for people living in the past, finally the news reader of owncloud is now accessible by a native Android client. News marked as read on the go using a telephone appear as read on the tablet at home (and on Owncloud’s web interface, of course).
Before updating Owncloud, I simply exported all contacts and calendars from the Address Book and Calendar applications on the Mac. Additionally I moved any files out of the sync folder for easy restoration.
The server update to v6.0.4 was pretty simple. Download the tarball, extract it, name the folder reasonably, log in as admin by entering the correct address in your web browser, choose advanced, enter the correct data path, and Configure user accounts after logging in as an administrator. To prevent headache, I basically used the same configuration as I used in v4.5.
After logging in as a user, I did the following:
- Move the files to sync back to the sync folder on the local machine. The client automatically uplods them to the server. That’s it.
- Import the contacts directly via Ownclouds web interface. That’s it.
- Upload the calendar files via the client’s sync folder. Click on the calendars from Ownclouds web interface. Owncloud will import the calendars. No. You’re doing it wrong. I ignored my very own hint. This will result in Apple’s calendar application trying to sync endlessly. Instead, for each calendar file to import, create an empty calendar in Owncloud manually. Connect via the calendar application from your Mac. Use it to import the calendar files on your local machine, and choose the previously created empty calendars as the destination. That’s it.
CardDAV-Sync free beta or CardDAV-Sync beta by Marten Gajda are no longer necessary. Instead, use the open source tool DAVdroid. That’s it. Configuration is straightforward and works out of the box.
Apple calendar troubleshooting
The configuration of Apple’s calendar application, regardless whether one uses Mac OS X or iOS, is not a straightforward job. On the dektop it might promt you with some weird alert dialogs which are mentioned here for SEO:
- Es konnte keine sichere Verbindung hergestellt werden.
Klicken Sie auf “Fortfahren”, um mit dem Erstellen des Accounts fortzufahren. Bei Bedarf können Sie den Account später in den iCal.app-Einstellungen bearbeiten.
- Beim Konfigurieren des Accounts ist ein Problem aufgetreten.
iCal konnte die Accounteinstellungen für den CalDAV-Server “yourservers.addre.ss” nicht finden.
- Die Anfrage für Account Owncloud ist fehlgeschlagen.
Antwort des Servers “500” an Vorgang CalDAVAccountRefreshQueueableOperation.
Eventually the following steps helped to iron out the issues:
- While configuring the Owncloud-Account in the calendar application, drop the protocol, e.g. instead of entering https://yourservers.addre.ss/owncloud/ just enter yourservers.addre.ss/owncloud/
- In case some hickup remain, try to manually remove some dated configuration files.
- To fix the issue mentioned last, there’s a ticket for Owncloud 6.0.4
which was solved by this commit. Thus I inserted $objectUri = substr($objectUri, 0, (strlen($objectUri) - 4)); before line 312 in lib/sabre/backend.php.
Except for the latter fix, I didn’t do any further magic on the server side. Some posts recommended to create some redirects via some .htaccess files, others recommended to fiddle with the URLs. Neither of them have been necessary to solve the issue for me.
The news feeds entered in Owncloud will per default automatically update each time you log in via a web browser using AJAX. It won’t update in case you try to fetch the latest news via the Android client, so the client won’t provide new news to read. To solve this, create a cron job that invokes cron.php of the Owncloud installation frequently, e.g. after 15 minutes elapsed.
I presumed the update would cause some trouble, and so it did. I didn’t pull my hair since I have to be careful with the few I have remaining. I spent two evenings to get the above issues sorted out. As soon I knew how to do it, it was simple and reproducable – as always :) . I hope this post will help others to configure their own instance of Owncloud (which is a very cool open source product BTW).
The Android news reader alone was worth the effort, since it was the most sought-after feature on my personal Owncloud wish list. Additionally the annoying behaviour that folders created in the root directory of a sync folder in v4 didn’t appear in the Android client is finally gone. v6 can encrypt the files on the server, though the file’s names remain untouched.
What’s still missing in v6 is the possiblity to subscribe to webcal:// calendars.
 Professionals recommend to use services that encrypt the files on the client machine before uploading them to the server (german SPON article).