Setting up Radicale on a raspberry pi

… so I wanted to escape the monster called Google, that wants all my data but at the same time is so convenient. Setting up radicale for CalDAV was more tricky then expected, since most tutorials are outdated. In particular, there is a package in raspbian available, so there is no longer a need to pip-install. In particular:

sudo apt-get install radicale

And then

sudo vim /etc/default/radicale

remove the # before

#ENABLE_RADICALE=yes

This enables radicale to run as a server.

Next there are some permission issues with the raspbian-package. I don’t remember where I picked up the next lines, but it works:

where localip is the ip of your raspberry within your local network, e.g. 192.168.0.10

The users file is simple:

alice:alicepassword
bob:bobpassword

And the rights file is roughly taken from the documentation:

[allow-everyone-read]
user: .*
collection: .*
permission: r

[owner-write]
user: .*
collection: ^%(login)s/.*$
permission: w

The idea is: Everyone can read everyones calendar, but only users themselves can edit.

Now this is not a _secure_ solution at all. When testing, it seems everyone can edit everyone’s calendar… So if you want a secure solution, just add an http proxy inbetween or … I don’t know, use owncloud or something. The important point for me was just that my wife and I have two separate calendars and we can view each others.

Next I downloaded DAVdroid. DAVdroid is GPL, but if you download from play store you have to donate approx 3 Euro. I instead use F-Droid, and download from the F-Droid store the GPL’ed version for free. Next open DAVdroid, add new account, check „login with URL and username“, then

a) on Alice smartphone, create one account with URL http://your_raspi_ip:5232/alice/calendar.ics/ and username „alice“ and password „alicepassword“, and another account with the URL http://your_raspi_ip:5232/bob/calendar.ics/ and username „alice“and password „alicepassword“.

b) on Bob’s smartphone, do the same but with bob’s and alice’s urls and bob’s username and password.

If you sync locally like me, afterwards check settings for each account (the cog-wheel in the upper right), check „sync only via WLAN“ and limit the ssid to your home wlan.

Go to the Android calendar apps, go to settings (in Android 6 it’s the button on the upper left corner), uncheck Google Sync, and instead check „calendar.ics“ both for Alice and Bob.

You can now directly edit within the Android Calendar App, and everything is synced.

A few notes:

The lack of true open source apps for Android is disturbing. It seems everyone is going for the quick buck, either via apps loaded with ads, or by releasing GPL’ed apps for money (i.e. re-licensing via app store). Sure that’s legally perfectly fine, and I can understand it somehow (spend zillion of hours in open source, with zero donations in return) but still, …. where is the open-source spirit?

This whole CalDAV thing sucks big time. I spend a whole day getting radicale to run, the documentation is missing for the crucial things (like the config files), the package on debian is broken, you have to be extremely careful when entering URLs and stuf… seriously, just enabling „sync“ for Google Calendar is way easier. Sure Google then knows again a little bit more about you, your hobbies, everything… but it’s so convenient…

Update: I reverted back to Google Calendar & Contacts. That’s two clicks. In particular:

Radicale seemed to ignore the rights settings no matter what I set, i.e. from_file with my own definitions, owner_write, etc. So anytime Alice could edit Bobs calendar. For me, security wasn’t really a matter, however safety was – I wanted to prevent Alice from accidentally making changes to Bob’s calendar.

DAVDroid would suck too much battery time. At least that was my impression.

Syncing contacts was very annoying. Basically you first have to export your local (or Google stored) contacts and then re-import them. But re-import how and where? I finally managed to find a CardDAV add-on for Thunderbird that somehow worked, but it boiled essentially down to lot’s of manual re-edits. Moreover I couldn’t manage to sync with the add-on and radicale.

Radicale has no web-frontend. That however would be very convenient if one doesn’t want to rely on Thunderbird add-ons.

Radicale seemed to ignore the storage location I specified in the config file. That made backup quite difficult.

I could’ve tried more, maybe I’ll try nextcloud on my shared-hosting box in future. But right now I’ve already wasted almost two days on this, and it seems to me it just isn’t worth the effort… not mentioning the administrative overhead in future. And yes, maybe DAVical or baikal or anything is easier to set up, but I doubt it.

4 Antworten to “Setting up Radicale on a raspberry pi”

Please note that we (DAVdroid developers) have released DAVdroid under GPL from the very first beginning, and we actively support F-Droid distribution of DAVdroid (see related fdroiddata repo commits). What is „true open source“? In my opinion, „true open source“ is when something is published under a „true open source license“, not less and not more. Selling these products (with support, which takes much time) is one method of making a living.

I think it should also be mentioned that we have improved the CalDAV/CardDAV ecosystem, including open-source libraries like ez-vcard, ical4j and okhttp as well as open-source (and proprietary) servers by creating qualified bug reports (which takes much time), sending patches etc…

About the server: Radicale is surely a good choice, but there are others as well, which are often more easy to configure. At the moment we use Baikal for our own contacts/events/tasks 🙂

Well thanks for the feedback. And yes, you perfectly abide to the license terms of the GNU GPL; I understand that’s your business model (and as for me this is more appreciated than some ad-based model) and DAVdroid is likely the least to blame for this annoying experience.

Nevertheless I wonder how many users understand that in this case the GNU GPL implies that there is a choice to pay (for convenience to get the binary via Play Store) or not to pay (less convenience, i.e. having the hassle of compiling yourself or in this case downloading another app-store). If all users who paid had a clear understanding that there is this choice available, than that’s perfectly ok. For example I did understand that since I wasn’t just browsing through the various CalDAV adapter apps in PlayStore but reading more deeply into everything, and I chose to not pay before I was sure that I have a running and stable setup, and whether the whole setup works for me and is more convenient than Google Contacts and Calendar.

Nevertheless I really do appreciate your developing efforts. Maybe I will give the whole thing another try using Baikal if time allows…

Note that I also improved various open-source projects and the whole eco-system of applications in certain domains by creating qualified bug reports which took me a lot of time, sending patches etc. I still don’t charge for my apps. But I also don’t do this for a living.

Interesting. I have used OwnCloud for testing, but had big problems with Japanese names, so at the end I gave up (there is an open feature request for phonetic name support, without any progress last time I checked). Other than that, the OwnCloud Cal/CardDAV worked nicely with my Android.
I am planning to install nextcloud and see what has changed there.