Back to Howto Guides

Install procedure for Ubuntu

Installing Apple's Darwin Calendar Server is fairly trivial... Here are the step in one document.


Log into the server console or via ssh, so you can enter commands(!) and run to get root access:

su -l

Install some software:

apt-get install subversion libkrb5-dev attr curl build-essential libssl-dev python-pysqlite2 bzip2 zope3 python-xml python-pyopenssl python-dateutil python-xattr python-pysqlite2 python-twisted python-vobject python-kerberos python-dev 

We now need to edit our /etc/fstab file and add user_xattr to the options for the partition containing the CalDAV server, / in this case:

vi /etc/fstab 

This is what the /etc/fstab change looks like:

Before: UUID=1234567-1234-4321-9876-12345678 / ext3 defaults,errors=remount-ro 0 1
After : UUID=1234567-1234-4321-9876-12345678 / ext3 defaults,errors=remount-ro,user_xattr 0 1

Remount the file system (to activate user_xattr):

mount -o remount / 

Create a directory for our server to live in:

mkdir /opt/caldavd
cd /opt/caldavd

Let's download the server software itself using subversion:

svn checkout CalendarServer

Subversion has downloaded a lot of software, and created a directory for us, called CalendarServer. Let's change into it:

cd CalendarServer

Run a script to download some necessary packages, configure, etc:

./run -s

Almost ready for action.... Let's copy the configuration:

cp conf/caldavd-test.plist conf/caldavd-dev.plist 

We do need to do a little configuration though:

vi conf/caldavd-dev.plist

First change the hostname for the server. Locate the line:


and change  localhost  to  your-real-hostname 

To make the server available to connections from other computers. Locate this line:

and replace  in  with either nothing or a specific, public ip address for your server.

Create a user and group to give our server an identity of its own, but we don't need a home directory for it:

adduser --system --group caldavd --no-create-home

Set permissions:

chown -R caldavd:caldavd /opt/caldavd

Run the server:

sudo -u caldavd -b /opt/caldavd/CalendarServer/run

That's it! The server is up and running, and you can connect to it with your CalDAV client using  caldav://ADDRESS:8008/calendars/users/admin/calendar to test the server using username  admin  and password  admin 

To work with Apple iCal under Mac OS 10.5, the URI required was simply:  caldav://ADDRESS:8008 

Here is an example init script: /etc/init.d/caldavd

#! /bin/sh

. /lib/lsb/init-functions


test -x $CALDAVD || exit 0

case "$1" in
        log_daemon_msg "Starting Darwin Calendar Server" "$NAME"
        if start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --chuid $CALDAVD_USER --exec $CALDAVD -- $CALDAVD_OPTS; then
            log_end_msg 0
            log_end_msg 1
        log_daemon_msg "Stopping Darwin Calendar Server" "$NAME"
        if start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE; then
            log_end_msg 0
            log_end_msg 1
        log_daemon_msg "Restarting Darwin Calendar Server" "$NAME"
        start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile $PIDFILE
        if start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --chuid $CALDAVD_USER --exec $CALDAVD -- $CALDAVD_OPTS; then
            log_end_msg 0
            log_end_msg 1
        status_of_proc -p "$CALDAVD" "$NAME" && exit 0 || exit $?
        log_action_msg "Usage: /etc/init.d/caldavd {start|stop|restart|status}"
        exit 1

exit 0

And to get it to load on boot and shutdown safely:

update-rc.d caldavd defaults


Have a look in the /opt/caldavd/CalendarServer/conf directory, there you will find all the config files for users, calendars, etc.

The information on this page is a little "re-work" of the page.

" What goes up must come down. Ask any system administrator. " - Anonymous