Computing and Networks

Using your iCloud address book in Linux

*If you use Thunderbird, the world has moved on and become simpler since I wrote this.  Go to updated Blog
Not just linux but any application that supports WebDAV or CardDAV.

Following on from previous posts about using Apples iCloud services on non Apple devices or operating systems.  See.
Apple CalDAV address…without .plist
Your Apple “secret” CalDAV address

Once you have found the dsid for your iCloud account you will also need to setup two factor authentication for the computer/device you are setting up your address book on.

. Log into you apple accoun management page via to setup TFA

For the next step, I’m using Evolution Mail, but you can use any application that supports CardDAV or WebDAV

If you followed the steps in one of the two links above, you would have you CalDAV addess that looks something similar to:
e.g. https://p10-caldav.icloud/223445234/calanders/home/

Convert this to the iCloud CardDAV address:
e.g. https://p10-contacts.icloud/223445234/carddavhome/card/

So the important information is:
Server: hhttps://p10-contacts.icloud/223445234/carddavhome/card/
User Name: your iCloud login
Password: your iCloud two factor authentication password for the device/computer
Name: iCloud Adressbook (or what ever)

In Evolution Mail (one of a couple very popular linux mail and calendar applications) create a new address book.

File -> New -> Address book
Type: = WebDAV
Name = iCloud
select “Mark as deault address book” (optional)
select “autocomplete with this address book”
select “Copy book content locally for offline operation”
URL: = https://p10-contacts.icloud/223445234/carddavhome/card/ (<-e.g.)
User: = your_iCloud_login

When you first sync to the address book you will be prompted for a password, don’t use your iCloud accound password, this will fail, use the Two Factor Authentication password you setup for the device/computer.

Done, beer and profit.

6 thoughts on “Using your iCloud address book in Linux

  1. I would like to setup my linux (Pop_os variant of Ubuntu 17.04) to connect to my icloud calendar. Very enthused to see the level of work and sharing you put into this. Thanks.
    I don’t quite get your advice on the two factor auth parts. I can loginto icloud from my linux/firefox…it demanded TFA from me and, sent me a text msg on my phone, and all that worked. I succeeded in logging in.
    What I don’t get is, how do I know my TFA password for “this computer”?

  2. ok..I did some self figuring…
    As you hinted, you can create an app specific two factor authentication (TFA) password at
    Security Section:
    click “Generate Password…”
    This will produce a password which you can copy & save and use later when setting up contacts and need to supply the TFA password.

    There is a type-o in your e.g. https://p10-contacts.icloud/223445234/carddavhome/card/
    it should have the .com as in e.g.

    And I suggest, where you say “User: = your_iCloud_login” change that to “User: = your_iCloud_login_full_email_address” (just to be a touch less vague)

    1. Ricky, well done on your success and for the feed back. I’m glade this was some help to you. To be honest, I am surprised that others have come across my blog as its just really a resource for future me.

      I’ll update this post with your suggestions and do a separate one on Apples application password setup as this threw me at the start as well.

      So far I’ve managed to get my iCloud contacts, calendars, to-do/reminders over to Linux. I worked out a horrible solution for notes using IMAP folders. But dropped that and now looking at a cross platform solution to replace Apple notes, Any ideas on that?

  3. Success report!
    I connected my Pop_OS (a Ubuntu17 / Gnome-shell variant distribution) by following these instruction. This is (Trump voice) *huge* for me… icloud-contacts (and synced integration with my ios phone) from my linux side had been one of my major barriers.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.