Setting up iCal Publishing for Mac OS X Server

The new iCal Server in Leopard server is a great tool, but it isn’t the only way to share calendar data on the Internet. In the days before Leopard Server, the way to share your calendar from iCal was to publish it on .Mac (now MobileMe) or a WebDAV share. Mac OS X Server’s web server is fully capable of hosting WebDAV shares and it is quick and easy to set up.

Before we continue, I want to make sure that this is the way you want to share your calendars on the net.

There are 2 ways to share calendars on Mac OS X Server: iCal Server and WebDAV posting.

iCal Server

iCal Server allows for users to do group calendaring with advanced features such as free/busy resolution, room and equipment reservations and calendar delegation. If more than 1 user needs to have read/write access to a calendar then you want iCal Server. You can use iCal Server with iCal under Leopard as well as several other clients (most are open-source and cross-platform).

WebDAV Publishing

WebDAV publishing essentially takes the ics file for a local calendar and makes it available for others to subscribe to in a read/only fashion. With WebDAV publishing you need a web server and users cannot have read/write access to each other’s calendars. You also do not get any of the advanced group calendaring capabilities that iCal Server offers.

For many this is OK and if WebDAV publishing is what you want then read on.

Overview

The basic steps necessary to get WebDAV publishing working with iCal and Mac OS X Server are:

  1. Set up WebDAV on Mac OS X Server
  2. Configure user access to the WebDAV share
  3. Configure iCal to publish to WebDAV
  4. Configure another user’s iCal to subscribe to the calendar

Sounds pretty straightforward, huh?

Disclaimer: Never do test configurations on a production server. Always have an extra server available to test configuration changes on. Always have a backup of your server and be ready to do an immediate restore in the event that Something Bad happens. You take your server’s well-being in your own hands when you change configurations.

This example assumes the server is configured as an Advanced mode server. That means we will be using Server Admin and Workgroup Manager to make changes to server, user and group settings and not using Server Preferences. If your server was set up as a Standard mode server and you are using Server Preferences to configure your server, you can convert your server to Advanced mode by connecting to it with Server Admin. Converting to Advanced mode is one-way and should not result in any data loss or configuration changes.

Always have a backup.

Never change server configs during the working day.

Always test new configs on a test server.

Configuring Mac OS X Server 10.5.4 for WebDAV

In this example I will be using Mac OS X Server 10.5.4. If you are not using Mac OS X Server 10.5.4 your screen may look different and the precise steps may vary.

Step 1: Create a folder for the calendars

Select your server in the pane on the left and choose File Sharing in the toolbar. Choose Volumes and Browse in the top of the volume browser view below the toolbar. Use the volume browser to browse to Library > WebServer > Documents.

Serveradmin-Filesharing-Root

Click New Folder and name the folder calendars.

Serveradmin-Filesharing-Newbutton

In the Permissions section at the bottom of the window, make _www the owner or group for the folder and give it read/write access.

Serveradmin-Filesharing-Davperms

Step 2: Set up your users & group

Crack open Workgroup Manager and connect to your server as your directory administrator. If your server is an Open Directory master (not necessary for this example) choose LDAPv3/127.0.0.1 from the globe popup under the toolbar. If your server is standalone, you can choose Local from that menu.

Wgm-Dir-Ldap

Make sure your have Accounts select in the toolbar and click the groups button above the left-hand list view. Click the New Group button in the toolbar. Name your new group calgroup.

Wgm-Group-Basic

Click the Members tab in the right-hand pane and add some users to your group. Click the plus button on the far right and drag users from the pane that opens on the side of the window.

Wgm-Group-Members

We’re done here so go ahead and quit Workgroup Manager.

Step 3: Configure Web services

Back to Server Admin.

Make sure Web services are visible under your server in the left pane by choosing your server in the left then Settings in the toolbar and finally checking Web under the Settings tab. Now select Web under your server in the left pane.

Serveradmin-Web-Overview

Click Start Web at the bottom left of the window. Go to Sites in the toolbar and make sure that the enabled checkbox is checked for your site. In this example I have a single site and it is the default site for the server.

Serveradmin-Web-Sites-General

The default settings under the General tab will be correct so go to the Options tab and enable WebDAV.

Proceed to the Realms tab and click the plus button at the bottom of the left pane under the Realms tab.

Set the Realm Name to calendars, the Authentication to Digest, and Folder to /Library/WebServer/Documents/calendars.

The default permissions for your new realm (AKA WebDAV share, AKA folder…) is Everyone no access. To protect your calendars from just anyone finding them we’re going to protect them by leaving Everyone with no access.

Click the plus button below the Users & Groups pane, click the Groups tab and drag calgroup to the Users & Groups pane.

Serveradmin-Web-Dav-Addgroup

Set the calgroup permissions to Browse and Read/Write WebDAV.

Click Save at the bottom right of the Server Admin window and quit Server Admin.

Step 4: Publish a calendar

Launch iCal (this works for both 10.4 and 10.5 versions of iCal, but I am showing 10.5.4) and select a calendar that you want to make available for other users to subscribe to.

Under the Calendar menu choose Publish… Choose a Private Server in the Publish On popup.

In Publish calendar as, enter a descriptive name without any spaces or punctuation.

For Base URL put in the DNS name for your server followed by /calendars

Ical-Publish-Private

The checkboxes below the Base URL box deserve some explanation.

  • Publish changes automatically does pretty much what you would think it does.
  • Publish titles and notes allows for a little bit of privacy while still showing others your availability.
    If you publish a calendar with this unchecked and see this:

    Ical-Publish-Week
    Anyone subscribed to your calendar will see this:
    Ical-Publish-Private2
    They’ll see blocked time but not the title or notes about the event.

  • Publish To Do items, Publish alarms, and Publish attachments work as I suspect you would expect (subject to the subscriber’s settings, more later)

When you click Publish iCal will send a copy of your calendar to the server and offer to send an announcement email for others to subscribe to your calendar. Go ahead and have iCal get your announcement mail ready.

Step 5: Subscribe to your published calendar

In Mail you will see a new message titled “Subscribe to my calendar on the Web”. In there will be a webcal:// URL.

Mail-Subscribeoffer

Select and copy the URL to the clipboard then go back to iCal.

Choose Calendar in the menu bar and the Subscribe…

Paste your calendar’s URL into the sheet that pops down and press return. You will be presented with an authentication dialog box. Enter your username and password as requested.

Ical-Subscribe-Auth

Once iCal verifies the calendar you will be presented with a list of options for your subscription:

Ical-Subscribe-Opts

I recommend leaving all three options under Remove checked unless you really trust the person whose calendar you are subscribed to. There are potential security issues with not stripping alarms or attachments and you likely don’t care what other people have in their to do lists.

Also, you will probably want to change Auto-refresh to something other than No.

Done!

Finishing notes

Please take note that it would be possible for one user to overwrite another user’s calendar in the unlikely event that they publish their calendars with the same name. I suggest telling users to publish their calendars with their names as the title in the Publish calendar as box.

As always, your comments are appreciated.

Technorati Tags: , ,

This entry was posted in iCal Server, Mac OS X Server, Server How-To and tagged , , , , . Bookmark the permalink.

25 Responses to Setting up iCal Publishing for Mac OS X Server

  1. Joel says:

    Hi Brett…

    I’m guessing that this can be used in addition to iCal server to provide that crucial option to remove notes and headers missing in iCal server. This would allow users to publish Personal calendars on a LAN as a slicker way to check availability…The two won’t conflict?

    Thanks,

    Joel.

  2. brett says:

    @Joel-

    Since this method of calendar publishing uses the Web server exclusively, it works fine in conjunction with the iCal Server. In fact, I am using both methods on my Leopard Server here.

    iCal Server and WebDAV calendar publishing both have their places and can even coexist. The big reason to go with iCal Server over WebDAV publishing is shared read/write access. If you never have a need for more than 1 person to be able to write to a calendar then you may be perfectly happy with WebDAV publishing.

    Of course, once you see how slick room and equipment reservation works and see the conflict resolution panel in action you may want the iCal Server!

  3. ok says:

    good site yqdfsx

  4. Brian says:

    Hi Brett,
    Can this be set up using a 10.4 server?

    Thanks,
    Brian

  5. brett says:

    @Brian

    Absolutely! If you are using 10.4.11 Server then you can use the 10.5 Server admin tools so the process should almost identical.

  6. wildcatherder says:

    This appears to be a simple procedure but I’m stuck at the “make _www the owner or group for the folder”. Even though I have enabled and started the Web service, there is no _www in my “Users and Groups” display, either as a user or a group. I have been able to find out that this is considered a “predefined group”, “system group”, or “hidden group” but NOWHERE can I find how to expose it in Users and Groups in 10.5.5 server.

  7. brett says:

    @wildcatherder (nice handle!)

    In Server Admin, go to Preferences under the Server Admin menu. One of the checkboxes there is labeled “Show system accounts in Users & Groups browser”. Check that and then you will see the _www user. It isn’t checked by default – a fact that I’d forgotten to mention.

    Thanks!

  8. Norman says:

    Hi Brett – nice clean explanation, thank you. However, I came to your site looking for help on calendar locations. I moved my CalendarServer, Collaboration and WebServer folders to a data drive. I used terminal instructions to move with permissions and most things worked. The Wiki and Blog worked and publishing iCals from clients worked although, the calendars were being saved in WebServer/Documents folder. Having followed your instructions up to Step 3, I am now unable to publish iCals 🙂

    So, when the iCal worked, my path in Sites – General was, /Volumes/DriveName/WebServer/Documents

    I notice you added /calendar to this path. Did you add the folder first or is this automatic?

    My realm name was automatically set to Calendar (Upper case C and no s). In your screen grab you block the realm name so I can’t see if you added calendar. (lower case c and an s)

    The next section is where I think I lost access. I noted your tip above, i.e. Show system …. and set this but, I am still unable to see calgroup, only calendar_calendar. I changed the Everyone to none and tried setting calendar_calendar to Browse and Read/Write but now, I guess, I’m back to square one except, no matter what I do, I can’t even a publish an iCal with the calendar going into WebServer/Documents

    Any observations would be really appreciated and if iCals from clients are stored in WebServer/Documents – what’s stored in WebServer/Documents ?

    If you have any helpful links that would be great.

    Again, very nice step by step guide.

    Regards, Norman

  9. brett says:

    I’m glad you enjoyed the writeup.

    I added the calendar folder myself. It was necessary to set up the special Web Realm. The name isn’t important, as when you add the Realm you can choose the Realm’s folder (which has to exist first).

    An important thing is that the _www user has to be able to at least read all of the folders leading up to the Realm’s root and has to be able to read & write into the Realm’s folder.

    I created the calendar group for my convenience (it doesn’t exist by default) and it is necessary for the authentication from the Web side.

    Look in the Web server’s logs (using Server Admin) to see if you’re getting read/write errors.

  10. Bryan says:

    I seem to set everything up right but I’m getting this error :
    [Thu Mar 19 16:38:10 2009] [error] [client xx.xx.xx.xx] mod_digest_apple: Request for URI /calendars/work01.ics does not contain Authorization header
    [Thu Mar 19 16:38:11 2009] [error] [client xx.xx.xx.xx] mod_digest_apple: Access to /calendars/work01.ics failed, reason: user ‘userid’ does not meet ‘require’ments for user/valid-user to be allowed access

    I have replaced my ‘userid’ and IP, but it seems to connect to the server and everything just wont stick up the calendar.

    Also have you thought about access for users to subscribe to the calendar who are not listed in the server as a user id? I guess i would do it with a normal .htaccess file, but apple doesn’t really make all this stuff so simple.

  11. brett says:

    You don’t need to hand-edit the htaccess files because Server Admin does things for you. You can set the permissions for Everyone to read-only if you want to enable anonymous access.

    To test that the WebDAV realm is working, you can try to connect to the share through the Finder.

    The important things are:
    – read/write access to the folder for the _www user
    – set up the realm to the folder’s path
    – set read/write permissions for the necessary users/groups
    – configure permission for ‘Everyone’

  12. Bryan says:

    It is weird, it started to work when i changed from digest to basic authentication.

    Thanks for the tutorial and the help!

  13. Bill says:

    hi brett. i’m brand new to the whole OS X server. as i have an existing mobile me account, is there a way of publishing calendars to that from the server? the option to publish is greyed out in ical.

    thanks for the writeup.

  14. brett says:

    With iCal, you can only publish your calendars to one location: MobileMe, a WebDAV share, or a CalDAV server. If you want your calendars posted to both MobileMe and your WebDAV server then you’ll have to script something to do this. If I were to do it, I would publish to my WebDAV server and have a script that puts the resulting .ics file onto MobileMe.

  15. David says:

    I’d like to second the comment that Bill made – what do you do when the option to publish is grayed out? Can I only publish my home calendars, or can I also publish calendars that I’ve imported?

  16. Reece says:

    I’ve just set up a new server for the first time using Snow Leopard Server and everything appears to be fine with iCal. I followed your directions but I keep getting the same message when attempting to publish “The calendar http://studentx@x2.local/calendars/publishing%20x.ics was not found on the server. Make sure the URL is correct.” My server is known locally as “x2” via bonjour so it’s my understanding that this should work. Do you think the reason it can’t find calendar folder has something to do with the permissions or placement?

  17. brett says:

    It is important to make sure that the user ‘www’ has read/write access to the folder on your web server.

    You can also test that the WebDAV publishing works by trying to connect to the server from the Finder using Connect to Server from the File menu. Use http://x2.local/calendars as the address.

    Also note that everything is case-sensitive.

  18. jerdog says:

    This is a great walkthrough, but I must be missing something here. I have a caldav calendar added in ical (for my user on the server) and I followed all the steps here, to a “t” but the publish option is greyed out for the caldav calendar. It is available for the local calendars in ical however.

    _www has read and write on the share and webdav publishing is working, I tried the test and the finder window reveals a bunch of folders.

    stuck on this one. I’ve been trying at this all day (not your tutorial, just in general)

  19. jerdog says:

    disregard.

    I was doing this just to connect ical to Gmail so that I could sync between ical server, gmail and my new droid X.

    Google supports calDAV now and it’s pretty simple. You just add your google mail account to ical, then delegate your osx calendar and the google calendar.

    Events sync from my ical osx calendar to gmail, then my droid picks it up. Works great in both directions. I can modify or delete the same event on my droid and google mail picks it up and it updates in ical as well.

    Thanks,

  20. Hi Brett. This is more a question than a comment.

    Do you know if there is a way to delegate a room to a group so a user in the group can display the calendat of the room in his iCal client.

    We use the latest version of the OS X server and Ical.

    I apologize for my bad english, I am fron Montréal, Québec, and my main language is French.

    Thank’s

  21. chris says:

    Hi Brett,

    I am in NEED! I have a mac mini server running 10.6 that is hosting my small business’s calendaring. I have to get the events posted to the internet so people can see when they need to show up. The publish option is grayed out, which I think is because the calendars exist on the server, not on the clients.

    So…

    How can I get this information to the web so anyone can check it? I would love for it to post ‘read only’ in a WebDAV way through Google or something. Why can’t it do this? How can I make it do this? Everyone I talk to wants me to switch over to Exchange and Windows in general because they say I have to in order to get this functionality. Is this true? I don’t wanna!

    Please help!

  22. brett says:

    @chris

    iCal does not allow you to publish a CalDAV calendar via WebDAV as well.

    Depending on what else you want from your calendar, using simple WebDAV publishing may better suit your needs than CalDAV sharing does. There are scripts that will make an ics file visible on a web page which is what it sounds like you’re after. If you don’t need collaborative scheduling then WebDAV publishing may, indeed be what you should do.

    If you want to use both CalDAV and WebDAV you could use an AppleScript to keep your main (CalDAV) calendar in sync with another (WebDAV published) calendar. You could also dig into the iCal Server’s web interface and determine where your calendar’s ics file lives and sync that up to a WebDAV share. Neither of these options is simple, however.

  23. @Chris: Take a look at BusyCal. It does what you want. You can publish (sync publish to Google).

  24. David says:

    Hello Chris
    Is it possible to only publish Titles, without the Notes? I have some confidential stuff in my Notes and would like the subscriber to only see the title of an event.
    Thanks
    david

  25. brett says:

    iCal only allows you to publish either titles & notes or free/busy.

Comments are closed.