Calendarserver

From Segfault
Jump to navigation Jump to search

Installation

This is mostly covered in the CalendarServer Installation Howto already, but we'll go through the most important steps here once again:

apt-get install calendarserver                       # Debian, Ubuntu

Make sure /var/spool/caldavd resides on a filesystem that supports extended attributes. EXT2, EXT3 and ReiserFS needs to be mounted with user_xattr. EXT4[1], JFS and XFS seem to support xattrs out of the box.

Now we need to add accounts.xml and sudoers.plist:

cp /usr/share/doc/calendarserver/examples/*.{xml,plist} /etc/caldavd/

We'll set the permissions more tightly:

chmod 0750 /etc/caldavd /var/spool/caldavd /var/run/caldavd
chmod -R a+r /usr/lib/python2.5/site-packages/twisted/plugins/
chown -R caldavd:caldavd /var/run/caldavd/
chown -R root:caldavd /etc/caldavd
chmod 0640 /etc/caldavd/*.{xml,plist}

In accounts.xml we'll change:

  • accounts realm
  • uid
  • password
  • name
  • cuaddr

Maybe you want to also change the group and location elements.

After all that, we make sure caldavd gets started:

$ grep -E '^start|^D' /etc/default/calendarserver 
start_calendarserver=yes
DAEMON_OPTS="-u caldavd -g caldavd"

Finally start caldavd:

/etc/init.d/calendarserver start

Clients

In Thunderbird/Lightning, we can create a new (remote) calendar with the following URL

http://localhost:8008/calendars/users/user/calendar/

In iCal we have Subscriptions and Accounts. A Subscription can be a remote calendar as well, but it's read-only. I have not really found out what this would be good for. To add a subscription click "Calendar" and "Subscribe..." and enter, e.g.:

http://localhost:8008/calendars/users/user/calendar/

An "Account" enables one to really use a remote calendar. Click "Preferences", "Accounts", "Add...":

  • Account Type: CalDAV
  • Username: user
  • Password: password
  • Server address: 127.0.0.1

iCal will then automatically search for (accessible) calendars. Under "Server Settings" we can see the "Server Path" our caldavd has created internally:

 /principals/__uids__/a4a78191-5b76-569b-9dd0-68a46e64400a/

On the server, this looks something like this:

/var/spool/caldavd/calendars/__uids__/a4a78191-5b76-569b-9dd0-68a46e64400a
/var/spool/caldavd/calendars/__uids__/a4a78191-5b76-569b-9dd0-68a46e64400a/calendar
/var/spool/caldavd/calendars/__uids__/a4a78191-5b76-569b-9dd0-68a46e64400a/calendar/b12a..-..c19.ics
/var/spool/caldavd/calendars/__uids__/a4a78191-5b76-569b-9dd0-68a46e64400a/calendar/.db.sqlite
/var/spool/caldavd/calendars/__uids__/a4a78191-5b76-569b-9dd0-68a46e64400a/inbox
/var/spool/caldavd/principals/__uids__/a4a78191-5b76-569b-9dd0-68a46e64400a
/var/spool/caldavd/principals/__uids__/a4a78191-5b76-569b-9dd0-68a46e64400a/calendar-proxy-write
/var/spool/caldavd/principals/__uids__/a4a78191-5b76-569b-9dd0-68a46e64400a/calendar-proxy-read
/var/spool/caldavd/principals/__uids__/a4a78191-5b76-569b-9dd0-68a46e64400a#calendar-proxy-write
/var/spool/caldavd/principals/__uids__/a4a78191-5b76-569b-9dd0-68a46e64400a#calendar-proxy-write/calendar-proxy-write
/var/spool/caldavd/principals/__uids__/a4a78191-5b76-569b-9dd0-68a46e64400a#calendar-proxy-read
/var/spool/caldavd/principals/__uids__/a4a78191-5b76-569b-9dd0-68a46e64400a#calendar-proxy-read/calendar-proxy-read

Security

TBD...

Links

References