2020-06-10 Radicale for Calendar and Contacts

So, in an attempt to further degoogle my life, I installed Radicale. It’s a small but powerful CalDAV (calendars, to-do lists) and CardDAV (contacts) server written in Python. It comes with Debian.

Sadly, things aren’t as smooth as I would want them.

The first problem was that authentication via Apache didn’t work. It was weird. When I didn’t have the password file, Apache complained. When I had it, with a user and a password, Apache would let me in but I’d get to the Radicale login box, and there no login worked.

I guess what happened is that somehow Radicale either did not receive the username from Apache, or looked it up and didn’t find it, so I don’t know.

I decided to use Radicale directly, based on the page on the Debian Wiki. That seemed to work.

The second problem is that I could add the CalDAV and CardDAV accounts to my iOS device, but when I used the Contacts or Calendar app, these new accounts still did not show up. All I got is my work account (Exchange) and Gmail. None of that self-hosted stuff.

OK, next morning, checking the debug log, I see some activity from my iOS devices – and Calendar integration seems to work! When I set it up, I used https://example.org/radicale/ and that allowed me to set it up but not to use it. Then I tried https://example.org/radicale/alex and that seems to be working, with alex being my username, or my collection name, or both. Oh dear.

The documentation has the following to say:

Many clients do not support the creation of new calendars and address books. You can use Radicale’s web interface (e.g. http://localhost:5232) to create and manage address books and calendars.

In some clients you can just enter the URL of the Radicale server (e.g. http://localhost:5232) and your user name. In others, you have to enter the URL of the collection directly (e.g. http://localhost:5232/user/calendar10min).

So now I can choose my new calendar in the Calendar app.

It still doesn’t seem to work for Contacts, though. But to be honest, I don’t think I need those as much. I’ve had a text file with ten addresses for a year or two…

I’ll keep looking for the correct setup info.



I’ve been using Radicale instead of iCould on my iDevices as well - I can confirm that the collection URL setup worked for both contacts and calendars.

Creating repeating events on Radicale calendar is one of the things that I have varying degrees of success depending on the client I use: it works fine on iOS, but rather finicky in evolution seemingly due to part of CalDav spec being unimplemented.

shimmy1996 2020-06-10 12:24 UTC

Ah! There’s hope! Thank you. 🙂

– Alex Schroeder 2020-06-10 16:24 UTC

After what feels like endless re-configuring, trying to get the right URL, the right account, waiting before trying to save, setting the port again, setting https again, and on and on... it finally worked! 👍

– Alex Schroeder 2020-06-10 16:40 UTC

When I added a second user to radicale, I was unable to log in.

htpasswd /etc/radicale/users somebody
New password: 
Re-type new password: 
Adding password for user somebody

But tail /var/log/radicale/radicale.log says:

2020-07-03 11:48:21,963 - [7fe996f01700] ERROR: An exception occurred during PROPFIND request on '/': Invalid htpasswd file '/etc/radicale/users': not a valid bcrypt hash

Ah! grep encrypt /etc/radicale/config says:

# Htpasswd encryption method
htpasswd_encryption = bcrypt

So now I wonder what htpasswd uses... Here’s what htpasswd --help 2>&1 | grep encrypt says:

 -m  Force MD5 encryption of the password (default).
 -B  Force bcrypt encryption of the password (very secure).
 -d  Force CRYPT encryption of the password (8 chars max, insecure).
 -s  Force SHA encryption of the password (insecure).
 -p  Do not encrypt the password (plaintext, insecure).

I guess I forgot the -B option! Going to retry with htpasswd -B /etc/radicale/users somebody. Now it works! 😀

– Alex Schroeder 2020-07-03 09:55 UTC

Please make sure you contribute only your own work, or work licensed under the GNU Free Documentation License. Note: in order to facilitate peer review and fight vandalism, we will store your IP number for a number of days. See Privacy Policy for more information. See Info for text formatting rules. You can edit the comment page if you need to fix typos. You can subscribe to new comments by email without leaving a comment.

To save this page you must answer this question:

Just say HELLO