Moving your Contacts and Calendar Away from Google
For the past few years I have used Google Contacts to store my contacts and Google Calendar to store my calendars. These services really are excellent, particularly because they allow me to keep my data synchronized between my Android phone and numerous instances of Thunderbird on PCs and Laptops. Unfortunately, I have had issues with my contacts becoming duplicated and even disappearing altogether. I figure that out of roughly 500 contacts I have lost around 200. This really got me thinking, I mean, should I really rely on somebody else to look after my data?
I don't know exactly why Google run these services but that is part of the problem. They are an advertising company, after all, and the more data they can collect about me and the people I know the better they can target me with their adverts. Maybe I am paranoid but now that they are dropping Google Reader I just don't trust them to the extent that I once did.
Don't get me wrong, I am not a Google hater, I truly believe that their search engine is excellent and that nothing else comes close to providing such accurate search results, at least when I am not logged in. There are a number of services that allow this kind of synchronization but I have chosen to use ownCloud as it appears to be the most capable open source solution. I have included installation instructions here for the good of the web.
Installing ownCloud
If you own your own server
Follow the instructions here.
Shared hosting
- In your hosts control panel select the latest version of PHP, for JustHost this is in CPanel under PHP Config.
- Right-click here and save the file to your computer.
- Copy the file to https://yourdomain.com/setup-owncloud.php
- Open https://yourdomain.com/setup-owncloud.php in your browser.
- Add a username and password but do not click "Next."
- Click Advanced and select your database options. A MySQL DB will be way faster than a SQLite DB.
- Accept the default options.
Exporting Contacts from Google Contacts
At the time of writing, exporting contacts from Google Contacts as a .vcf file only exports one name, phone number and email address per contact. Fortunately, if you export your contacts from an Android phone you will keep all of your contact information including mugshots. To do this:
- From a Home or All Apps screen, touch the People icon.
- Select Menu → Import / Export.
- Select Export to storage.
- Touch "OK" to confirm.
A file with the .vcf extension will be saved to the root directory of your phone's internal storage. This file contains all of your contacts including their photos. Transfer this file to your computer via a USB cable or email.
- Go to https://yourdomain.com/owncloud/
- Click Contacts → Import.
- Select the file .vcf file that you copied to your computer and click OK to import.
Importing Calendar to ownCloud
- Go to https://www.google.com/calendar/
- Click ⚙ → Settings → Calendars → Export Calendar.
- Save the .ics file to your computer.
- Go to https://yourdomain.com/owncloud/
- Click Files and drag the .ics file into the files window in order to upload it.
- Click on the .ics file.
- In the Import calendar dialog that appears select "Default calendar" and click import.
- When the calendar has been imported close the dialog and delete the .ics file.
Configure Thunderbird
Configure Calendar
- Uninstall the Provider for Google Calendar add-on.
- Install SOGo Connector.
- Install MoreFunctionsForAddressBook.
- Install the Lightning extension.
- In your owncloud calendar copy your calendar's CalDAV link.
- Back in Thunderbird open the calendar.
- Click File → New Calendar → On the Network → Next → CalDAV.
- Type the following into the location field:
- https://yourdomain/owncloud/remote.php/caldav/calendars/USERNAME/CALENDARNAME (the default calendar name is defaultcalendar).
- Check Offline Support.
- Click Next
- Give your calendar a name and an email address. The email address is used for email notifications.
Configure Contacts
- Uninstall the Google Contacts addon.
- Install SOGo Connector.
- In Thunderbird open the Address Book.
- File → New → Remote Address Book.
- Give your address book a name.
- Type the URL into the appropriate field. The URL is found in your OwnCloud Contacts area, that little Gear symbol in the bottom left of the Contacts View (same symbol as found in the top right in the Calendar view). Click on the little world (CardDAV Link) symbol and it will display the URL you need for your installation to work.
- Click OK.
- Right-click the newly created address book and choose synchronize and your contacts should download.
Configure Android Phone
Clear Current Google Apps
- Go to Application Manager → All
- Google Calendar Sync → Clear Data → OK → Disable → OK.
- Google Contacts Sync → Clear Data → OK → Disable → OK.
Contacts
- Go to People.
- Choose Settings → Accounts → Your Google account.
- Clear the checkbox so that Google Contacts are no longer synchronized.
- Install CardDAV from the Google Play Store. There is a free version CardDAV-Sync free beta and a paid version called CardDAV-Sync beta. The paid version syncs more contact fields. You can start with the free and upgrade later.
- Run CardDAV-Sync and use these settings:
- Server URL: <servername>/owncloud/remote.php/carddav/
- Use SSL: check accordingly.
- Username: your login name.
- Password: your password.
- Click OK.
- Go back to People.
- Choose Settings → Contacts to display → Customize.
- Expand your Google account and clear all of it's checkboxes.
- Expand your CardDAV account and check all of of it's checkboxes.
- Click OK and your contacts will be synchronized.
Calendar
- Install CalDAV from the Google Play Store. There is a free version called CalDAV-Sync free beta and a paid version called CalDAV-Sync beta, both written by Marten Gajda.
- Open Calendar.
- Choose ⚙ → Settings → Your Google account.
- Clear the checkbox so that Google Calendar is no longer synchronized.
- Click Add Account → CalDAV and use these settings.
- Server URL: <servername>/owncloud/remote.php/caldav/
- Use SSL: check accordingly.
- Username: your login name.
- Password: your password.
- Click Next.
- Under "Select accounts to sync" select all appropriate calendars.
- Click Next.
- Enter the email address. The email address is used for email notifications.
- Click OK and your calendar(s) will be synchronized.
- Go to phone Settings → Accounts → Google → Select the Google account with the sync icon next to it → Uncheck calendar.
Congratulations, you now no longer need an external service to synchronize your contacts and calendar. As a bonus there are a bunch of ownCloud add-ons that give you much more power than you previously had.
Written by Mike Ratcliffe who lives and works in England building useful things.