I’ve recently installed OwnCloud 9 to sync my calendar and contacts between my Mac and Android phone. I didn’t want to use iCloud or Google anymore and OwnCloud promised to be a great alternative. The good news: it works really well. The bad news: getting the synchronization up and running is not always as straightforward as expected. I’ll share how I did it, along with some tips and tricks in this blog post.
Obviously, you will need to install OwnCloud first. There is lots of good documentation on this, so I won’t cover the installation here. However, if you’re trying to install OwnCloud at the German webhoster Strato, take a look at my blog post on how to install OwnCloud 9 at Strato (German only).
Installing the OwnCloud apps
In addition to the default OwnCloud installation, you need to install the apps for calendar and contacts. This can be done in the main menu (+ Apps) in the upper left part of the screen. It’s only a matter of a few clicks. Once the apps are installed, you’re already able to use the calendar and adress book via the web interface.
Setting up CardDAV and CalDAV accounts on OS X
To sync contacts and events with your Mac you need to create a new CardDAV (contacts) and a new CalDAV (calendar) account.
- Go to System Prefrences > Internet Accounts > Add Other Accounts and select “CardDAV” account.
- Choose account type “Manual” and enter your username and password for OwnCloud.
- If you have installed OwnCloud in the root folder of your webserver, copy and paste the CalDAV URL into the server adress input field. You can find the CalDav URL for your calendar in the OwnCloud app, you’ve just installed. Click on the cog wheel icon in the bottom left part of the screen and make sure to copy the iOS/OS X address.
- Repeat these steps and create a CalDav account to sync your calendar.
If everything works fine, the accounts show up in the calendar and contacts application on your Mac. You’ll be able to sync data in the same way as with iCloud and Google.
If you’ve installed OwnCloud in a sub directory on your web server, OS X will have trouble finding the proper sync URL. In this case it displays the following error:
Accountname/Password could not be verified.
To work around this, add the following lines to your .htaccess file to redirect to the correct URL (instead of “owncloud” enter your OwnCloud subfolder):
Redirect 301 /.well-known/carddav /owncloud/remote.php/carddav Redirect 301 /.well-known/caldav /owncloud/remote.php/caldav
Then create new CardDAV and CalDAV accounts, as described above, and enter your URL without any subfolders (e.g. http://www.your-domain.com) as the server address.
Transfering all data to OwnCloud
- To transfer an entire calendar from iCloud to OwnCloud, export the iCloud calendar and import it to your OwnCloud calendar.
- To transfer all of your contacts, simply select all of them and drag them into the OwnCloud address book.
Syncing with Android
- Download the apps
- Choose CalDAV / CardDAV respectively
- Enter your credentials and URL (same credentials as for OS X, see above)
- Choose your settings, e.g. the synchronization interval
Congratulations, you’re now able to sync all of your calendars and contacts between you Mac and your Android phone via OwnCloud. You’re one step closer to completely own your data!