-- Leo's gemini proxy

-- Connecting to alexschroeder.ch:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

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.


Radicale


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.


on the Debian Wiki


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:


documentation


> 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.


​#Administration #Radicale ​#Radicale


Comments


(Please contact me if you want to remove your comment.)



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


shimmy1996


---


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


---


I recently upgraded Debian and radicale did not restart. I’ve added the following configuration to my Monit config:


check process radicale matching radicale
  group system
  start program = "/usr/sbin/service radicale start"
  stop  program = "/usr/sbin/service radicale stop"
  if failed host localhost port 5232 then restart
  if 5 restarts with 5 cycles then stop

– Alex 2021-09-10 13:31 UTC


---


Important to note:


1. The Radicale web interface offers links to the ICS files which you cannot use in the Apple world.

2. Once you have set up the CalDAV account in the Apple world, new collections show up automatically, with a delay.


– Alex 2022-07-02 09:36 UTC


---


When setting up a new account:


In Settings → Calendar → Accounts → Add Account → Other → Add CalDAV Account

Server: alexschroeder.ch

Username: alex

Password: *secret*

Description: Alex


The connection fails. Continue without SSL. It still fails. Now you get the option to provide “Advanced Settings”.


Use SSL: on

Port: 443

Account URL: https://alexschroeder.ch/radicale/alex/


https://alexschroeder.ch/radicale/alex/


The account ends with the username and a slash.


If you set it up this way, the calendar gets populated immediately, as far as I can tell.


– Alex 2022-09-30 10:34 UTC


---


Not sure why this was necessary. It turns out my wife had to delete and recreate the calendar definition on her iPhone, too. As if the recent upgrade to 15.7 necessitated some change.


I tried to fix that using a radicale upgrade (installed it in /usr/local using pypi).


– Alex 2022-10-21 17:20 UTC


---


Hi, I just setup a radicale server for myself and added some calendars on my linux evolution calendar successfully. I don’t know why nothing work on ios, I always have the “can’t establish a connection”, I tried as you said but without success. The only difference I see is that I don’t have ssl (because I’m lazy)


– 2022-11-16 13:50 UTC


---


At least I’m not alone…


– Alex 2022-11-16 14:18 UTC


-- Response ended

-- Page fetched on Sun Jun 2 06:51:22 2024