- 1. Look at Contacts without connecting to the Contacts service
- 2. Setting up the Contacts service
- 3. Connecting to the Contacts service
- 4. If you don’t have a server account set up on your Mac:
- 5. If you already set up an account on your Mac
- 6. Create contacts in your shared directory
- 7. Test your server-hosted contact list
- 8. Bonus directory search
Over the last two weeks we’ve worked with the Server app on macOS Sierra to set up the Calendar service. The Calendar service uses CalDAV, a web standard that allows you to connect to calendar services, add and update events using a variety of calendar apps. In fact, when we were working with the calendar service you could have just as easily added your server’s calendar service to Fantastical or BusyCal because both support the CalDAV standard.
Server’s Contacts service works using a similar standard called CardDAV, which, like CalDAV, allows a variety of contact apps to connect to and update data stored on your server. And, in fact, CalDAV and CardDAV are linked to each other on your server. You can see this link using the Server apps log tools.
- Open the Server app.
- Select Logs in the sidebar of the Server app.
- Locate and select the Calendar and Contacts log.
Note that the two are linked together in the log.
Look at Contacts without connecting to the Contacts service
Server’s Contacts service allows you to provide a centralized database of contacts that can be used by edited and updated by anyone using your server and contact data can be used in any CardDAV capable app.
Before we set the service up on your Mac, let’s look at the Contacts app to see what’s available before we set up and connect to the Contacts service. So, open the Contacts app.
When you open Contacts you should see the Groups sidebar to the left of your list of contacts. If you don’t see the sidebar:
- Open the View menu.
- Select Show Groups.
If you’re using iCloud you’ll see an iCloud group. This is synced across all your iCloud-connected devices.
If you’re aren’t using iCloud you should see an All Contacts group in addition to any other groups you may have created. This syncs only on your local hard drive.
Now, let’s get connected to the Contacts service.
Setting up the Contacts service
Turning the Contacts service on is simple, all you need to do is flip the service’s switch on.
- Select the Contacts service in the sidebar of the Server app.
- Turn the Contacts service on.
Seriously… that simple.
Connecting to the Contacts service
Once the Contacts service is turned on it’s simple to get the contacts app set up with it.
If you don’t have a server account set up on your Mac:
- Open System Preferences.
- Select the Internet Accounts preference.
- Scroll to the bottom of the list of preconfigured accounts.
- Select “Server account.”
- Authenticate as one of the users you created when you set up Open Directory. (Remember, if you haven’t set up Open Directory you’ll need to jump back to our Primer on Profile Manager.)
- Select Contacts from the list of available services on you server.
If you already set up an account on your Mac
As soon as you turn a new service on in the Server app, that service immediately becomes available on any device already connected to your server. But you do need to enable that service on every device you want to have access to that service:
- Open System Preferences.
- Select the account you created in a previous episode.
- Put a check in the box next to Contacts.
- Close System Preferences.
Create contacts in your shared directory
Now go back and look at the sidebar in the Contacts app. You should now see new items in the list which includes contacts stored in your shared directory on your server. If you select that directory in Contacts you should note that there are no contacts listed. To create a contact in your server’s directory:
- Select your server’s directory in the sidebar of the Contacts app.
- Click the + button at the bottom of the Contact window.
- Select .New Contact.
- Enter a first name, last name, and add an email address, then click Done. Note: For testing purposes, enter an email address you know isn’t already in your contacts list, even if that means adding a fake email address
Test your server-hosted contact list
To test the Contacts service:
- Open the Mail app.
- Create a new email message.
- Begin typing the name of the user created in the previous step.
You should see the name of your test user and the new email address you created show up in the Mail App’s autocomplete list.
Additonally, any other devices you use that are authenticated to this server account will have access to contacts created and stored on your server. You can think of it as your own private iCloud-ish contacts list.
Bonus directory search
Server’s Contacts service offers one more directory option that is as simple as putting a check in a box. When you put a check in the box that says, “Allow users to search the directory using the Contacts application allows your users to use information stored in your Open Directory database. So, any users you’ve created or imported into Open Directory that has related contact information will also be made available to anyone connected to your Calendar service.