Thursday, October 02, 2008

Quest for a thin CalDAV server

For some time I've talked about setting up a CalDAV server in my home. River won't share her calendar on any service outside the home (including Calgoo) because of her concerns about how secure and private the info is. I respect that.

The really expensive solution is to buy a Mac Mini plus Leopard Server but we're already talking a couple of thousand dollars just for that. So that's out.

I'm now looking into either buying a very cheap diskless PC and running OSAF's Cosmo on it, or installing Cosmo on a PC I already have and just leaving that PC on all the time. I may actually try the latter first to see how it all works. Ultimately I want the CalDAV server to just run 24x7 so it would be great to get one without a hard disk spinning all the time.

This month there's a new release (1.1.0) of the Cosmo server. The installation instructions are not for novices. But for pure LAN-based, widely-interoperable calendar-sharing messing about, it looks like the best game in town, nowhere near as challenging as installing Kerio's mail server or other solutions which might be overkill.

Please let me know if you've tried Cosmo 1.1.0 and what you've experienced.


Anonymous said...

One thing that might not have occurred immediately, but which I use and love, is a virutualized server on a cloud host. I pay $20/mo for a 256m Ubuntu server hosted by Slicehost, with root access. You could pay about half that just in energy costs, which means you break even on the mac mini after 5 years. Plus if you flub the configuration you can regenerate your pristine disk image in a few seconds. I use dyndns for free dns that points to the dedicated IP address you get from Slicehost.

Timon Braun said...

I neglected River's privacy point. You can get good-as-at-home privacy via encryption doing something like this.

Anonymous said...

I set up darwin calendar server on a linux box with this howto a while back:

the setup was pretty easy. for the bits I didn't understand, I just followed the directions very, very carefully... no real troubles that I can recall. and I've had no problems in the meantime.

so long as you're comfortable in linux, I guess...

Anonymous said...

I'd also like to point out that Apple has open sourced the CalDAV server that ships in Leopard, dubbing it the "Darwin Calendar Server":

According to Wikipedia, it has been ported to run on FreeBSD and Linux, but it should also run on the client edition of Mac OS X.

Might be worth a look, if you have a Mac or other UNIX machine at home.

Zoran Kovacevic said...

Have you considered PHP-based DaviCal?

Anonymous said...

I run the Cosmo-based free service at so I've been running Cosmo for a couple years. I've got no hesitations recommending it in terms of stability, install, and other admin-y features. We've got a great many different clients pounding against the Hub successfully.

Sorry if the Cosmo install instructions are scary; we've got quite good feedback that it's pretty trivial. The harder part is finding them in our wiki, unfortunately. It turns into an "untar, run start script" if Java's already installed, simplier than any other package. If you want to point to an external db (mysql/postgres), there are a couple files to touch. The built-in database is fine, but most admins feel more comfortable actually running it against a "regular" database like mysql, since it's easier to get docs on how to backups/etc your data.

I like Darwin's server and Davical too. Darwin's server takes a bit of time and hacking, and make sure you start in a subdirectory or the install will barf python libraries all over your current directory. Davical feels like a regular PHP install; essentially dirt-simple with a file or two needing editing.

I'm not sure any of the solutions will work smoothly on a diskless machine, at least in terms of persistence. It will run fine, assuming you've got a read-write filesystem in RAM, but what happens when the power goes out? This is a solvable problem, but not sure what you intended here.

Daniel Sears said...

You want a cheap, always-on Linux device to run a CalDAV server? Why not use a router running OpenWRT? These devices don't have much memory: the Asus WL-500gP has 4 MB Flash and 8 MB RAM, but it also has two USB ports.

These devices can run all kinds of servers: music and Samba/NFS, etc. So why not use them to run a CalDAV server?

Unknown said...

The advantage of running something like this "in home" is that any machine you'd be looking at using is probably going to have a gigabyte of RAM or more and/or be able to be dedicated to just this task, so the full range of options including the quite-mature JAVA-based Cosmo service is perfectly viable.

My approach is more like that of the person who had replied initially - I'm looking to get all of this setup on a low-cost VPS host at Linode. Memory is at a premium and I'm trying to do not just CalDAV, but the whole range of core mail, web, DNS, & other services which are necessary to operate an Internet domain rather than abdicate to Google.

Of course just like users can access their email from work, home, their cell, their laptop, etc. via IMAP, the same must be true of their calendar.

SabreDAV is a PHP-based WebDAV framework with CalDAV support. A sample php script is provided which implements a CalDAV server using the framework. mysql and sqlite are supported. Client support looks good.

The Radicale CalDAV server is emerging as a stupidly-simple option for CalDAV service on Linux & is probably a good option for those who know that all their users will be leveraging a client on the supported clients list.

Both of the above options are going to have the advantage of being barely-there lightweight.

DaviCal is looking relatively mature and also lightweight but has the pesky postgresql requirement which, unless you can swing all of your other web apps over to postgresql also (many are supporting only mysql), might mean fielding two databases at once.

The Darwin server is probably a best bet for full spec implementation and standards compliance within the realm of what can be squeezed into a tight space. I can't help but feel like the installer owns my whole system though.

Another critical thing which I must provide is a high-quality webmail interface with CalDAV-enabled calendar. These are quite hard to find and Atmail (commercial open source, free up to 5 seats) looks like the best. Unfortunately I've had basically no luck getting its CalDAV client to interoperate with CalDAV servers besides the bundled Darwin server which can optionally be installed with it.

In my opinion, the space is wide open for Roundcube to step up and seize the opportunity to deliver a functional calendar which acts as a CalDAV client.

Thijs said...

About OpenWRT and radicale, see also:

Jérôme Schneider said...

You should have a look at Baïkal. It is lightweight, handles caldav and carddav, is based on sqlite, and weight only 200KB.

See here: