Roundcube and Google Contacts

The Roundcube logo

The Roundcube logoOne of the reasons I use Roundcube is that when I was shopping for a webmail client, there was a plugin that provided Google Contacts integration. Unfortunately, that plugin hasn’t been updated for over a year and it has rate limiting issues. So, when upgrading my Roundcube installation to 0.8.4 I decided it had to be replaced. Updated for Roundcube 0.9.

Great. Another Roundcube-adventure.

Fortunately, Google Contacts supports CardDAV. Having a standard protocol makes the odds of finding a working plugin a lot bigger. Unfortunately, setting up CardDAV for Google Contacts takes a bit more effort. Fortunately, I decided to write those steps down, so you don’t have to figure out how to do it.

I’ve used the RCMCardDAV plugin. I could not get the latest release at the time of this writing (0.7.0) to work. YMMV, since I did change some configuration settings after seeing the better error messages provided by trunk. In any case, I used the latest SVN revision (rev 261). The repository is at Update October 9th, 2013: RCMCardDAV now has a GitHub repository:

The installation instructions are pretty clear (refer to INSTALL for the latest instructions):

  • Unpack to <roundcube>/plugins
  • Add the name of the plugin folder to the $rcmail_config[‘plugins’] in <roundcube>/config/
  • Run <carddav-plugin>/dbinit/<yourdatabase>.sql in your database-tool of choice

Now all we need to do is configure a CardDAV address book in our account. First, create an application-specific password in your Google Account if you use two-step verification. Then log in to Roundcube:

  • Go to Settings → Preferences → CardDAV
  • Fill in the fields with the following information:
    • Name of the addressbook: any name you want. I used the very original “Google Contacts”. The address book should not need to exist yet. It will be created.
    • Activate CardDAV-Addressbook: keep checked.
    • Username: the full email-address for your Google Account, e.g.
    • Password: if you use two-step verification, your application-specific password. If you don’t, the password to your Google Account.
    • URL: (This is notably different from the iOS CardDAV setup. Google will simply instruct you to use “”. That value does not work here.) Update October 9th, 2013: If you use the latest revision of RCMCardDAV (here), you can simply enter “”. RCMCardDAV now has service discovery. (Tested with Roundcube 0.9.)
    • Update interval (hours): I kept it at “1”. Do as you like.
  • Save

And that’s it. If you go to Address Book, you will see a new address book called “Google Contacts (default)”. Give it a moment if your contacts haven’t shown up yet.

RCMCardDAV stores two log files in your Roundcube log directory (<roundcube>/logs): carddav and carddav.warn. If you have any problems, those two files should be the first place to look if you have any problems. If the files don’t exist, no log messages have been written to it.

Update October 9th, 2013: Updated for Roundcube 0.9 and latest revision of RCMCardDAV.

Update June 17th, 2014: Larry Rosenman writes: “if you have a lot of contacts (I have 4600+), you may need to adjust the timeout in carddave_common.php from 10 to something bigger. I used 120.”