Sync UbuntuTouch Contacts & Calendar with ownCloud

Sync UbuntuTouch Contacts & Calendar with ownCloud

November 21,2015 by mahmadz

Sync UbuntuTouch Contacts & Calendar with ownCloud

UbuntuTouch (also called UbuntuPhone) is new and under active development. One usual expectation from any user is to be able to sync data with services. As of today, it comes with the ability sync with Google only. Problem is Google is really deep and evil when it comes to surveillance. So I tried to sync with my ownCloud and here is what I had to do:

Tools Required

  1. ownCloud server running which would be accessible from the Internet with Contacts and Calendar App installed (whichever is required for sync).
  2. SyncEvolution which is now pre-installed in UbuntuTouch.
  3. Terminal App on your device.

Commands to be Executed

  1. Open the Terminal App on your UbuntuTouch device.

  2. Tell SyncEvolution about your ownCloud server and its details:

    syncevolution --configure --keyring=no --template webdav username=USERNAME password='PASSWORD' syncurl="YOURSERVER.COM/owncloud" target-config@owncloud

    If you are using a self signed certificate, you can use the SSLVerifyServer="0" option to ignore its verification (although this is a security risk):

    syncevolution --configure --keyring=no --template webdav username=USERNAME password='PASSWORD' syncurl="YOURSERVER.COM/owncloud" SSLVerifyServer="0" target-config@owncloud

    Another alternate is to download the certificate and place it in on your UbuntuTouch device. Add the SSLServerCertificates switch to specify the location of the certificate:

    syncevolution --configure --keyring=no --template webdav username=USERNAME password='PASSWORD' syncurl="YOURSERVER.COM/owncloud" SSLServerCertificates="/home/phablet/YOURCERTIFICATE.crt" target-config@owncloud
  3. Now tell SyncEvolution about your phone

    syncevolution --configure --template SyncEvolution_Client sync=none syncURL=local://@owncloud username= password= owncloud
  4. To configure synchronization for:

    a. Contacts:

    syncevolution --configure --template webdav database=https://YOURSERVER.COM/owncloud/remote.php/carddav/addressbooks/USERNAME/contacts backend=carddav target-config@owncloud contacts
    syncevolution --configure sync=two-way backend=contacts database=Personal owncloud contacts
    syncevolution --sync slow owncloud contacts

    b. Calendar:

    syncevolution --configure --template webdav database=https://YOURSERVER.COM/owncloud/remote.php/caldav/calendars/USERNAME/personal backend=caldav target-config@owncloud calendar
    syncevolution --configure sync=two-way backend=calendar database=Personal owncloud calendar
    syncevolution --sync slow owncloud calendar
  5. Once the data is synchronized for the first time, you can use the normal commands:

    syncevolution owncloud contacts
    syncevolution owncloud calendar

Note:

I prefer putting all there commands in a script file on my PC and then copy/execute it on the UbuntuTouch device. 👍

I took help from the following links:

  1. http://askubuntu.com/questions/606020/how-to-sync-contacts-and-the-calendar-on-ubuntu-touch-with-owncloud#606021
  2. https://askubuntu.com/questions/616081/ubuntu-touch-add-contact-list-and-calendars/#616296
  3. http://askubuntu.com/questions/601195/how-can-i-add-a-ca-at-an-ubuntu-phone/#603064
  4. http://mitchellreese.id.au/owncloud-sync-on-ubuntu-touch/

Let me know what worked for you 😊