this is obsolete doc -- see http://doc.nethence.com/ instead

CalDAV with Radicale 

 

 

Introduction 

We're using NetBSD in this guide. 

 

 

Prerequesties 

Make sure you've got python >=2.5 and apache (for htpasswd), 

pkg_info | grep python
pkg_info | grep apache

 

Fix the path, 

cd /usr/bin
ln -s /usr/pkg/bin/python2.6 python

 

 

Installation 

Get Radicale and proceed, 

wget http://www.radicale.org/src/radicale/Radicale-0.4.tar.gz
tar xzf Radicale-0.4.tar.gz
cd Radicale-0.4
./setup.py build
./setup.py install

 

 

Configuration 

Configure a few things, e.g. enable authentication, 

cd /etc
mkdir -p radicale
cd radicale
cat > config <<EOF9
[server]
host =
daemon = True
port = 80
ssl = False

 

[encoding]
request = utf-8
stock = utf-8

 

[acl]
type = fake

 

[storage]
folder = ~/.config/radicale/calendars

 

Note. to enable ACLs, 

[acl]
type = htpasswd
personal = True
filename = /etc/radicale/users
encryption = crypt

 

Note. to enable SSL, 

[server]
...
port = 443
ssl = True
certificate = /etc/openssl/server.crt
key = /etc/openssl/server.key

see http://pbraun.nethence.com/doc/security/openssl_self_signed.html 

 

 

Ready to go 

Launch the Python daemon and check on which port it is listening, 

cd ~/
radicale -d --no-ssl
netstat -an -f inet

 

Enable at boot time, 

vi /etc/rc.local

like, 

echo -n starting Radicale...
/usr/pkg/bin/radicale -d --no-ssl && echo done

 

Eventually deploy this little script to restart the daemon when needed (after configuration changes), 

cd ~/
mkdir -p bin
cd bin
cat > restart_radicale.ksh <<EOF9
#!/bin/ksh
ps ax | grep radicale | grep -Ev 'restart|grep'
kill `ps ax | grep radicale | grep -Ev 'restart|grep' | awk '{print $1}'`
radicale -d --no-ssl
sleep 1
ps ax | grep radicale | grep -Ev 'restart|grep'
EOF9
chmod +x restart_radicale.ksh

 

 

Usage 

If using ACLs, create/modify a user's password (add -c if file doesn't exist), 

cd /etc/radicale
#htpasswd -c users USERNAME
htpasswd users USERNAME

 

You can now connect with e.g. Sunbird to the CalDAV service, 

http: //bsd/USERNAME/calendar/
#https: //bsd:443/USERNAME/calendar/

Note. default port is 5232 but we configured Radicale to spit on port 80 

 

 

References 

http://www.radicale.org/ 

http://www.radicale.org/user_documentation 

http://forums.mozillazine.org/viewtopic.php?t=630743&sid=8eae4ddd744b1e64692b56c28ecaefe9 

/usr/pkg/lib/python2.6/site-packages/radicale/config.py 

http://wiki.davical.org/w/CalDAV_Clients 

https://wiki.mozilla.org/Calendar:QA_CalDAV_Support