Setup of a CalDAV server (Radicale) and integration with Mozilla Thunderbird
Goal of this article is to document the setup of the CalDAV server “Radicale” for synchronizing calendars between different Thunderbird clients on Ubuntu 22.04.x.
Install the CalDAV server
So, let’s assume we have an Ubuntu 22.04.x installation with running Apache on a remote machine with DNS name caldav.example.org running a ssh server.
First, we become root:
sudo -iNext, we install everything that is needed to run the Radicale 2 server:
apt-get install radicale python3-bcrypt python3-passlib apache2-utils In the configuration file /etc/radicale/config, the following entries have to be modified:
[server]
hosts = localhost:5232
ssl = False
[auth]
type = htpasswd
htpasswd_filename = /etc/radicale/users
htpasswd_encryption = bcryptNow we add a user whose calendar should be synchronized:
sudo htpasswd -c -B /etc/radicale/users user01To avoid acess rights problems, we have to change ownership of the Radicale files to the respective user:
chown -R radicale:radicale /var/lib/radicaleWe can now start the server by executing the command
systemctl start radicale.serviceNow we have a local running Radicale CalDAV server at port 5232:
# netstat -anp | grep 5232
tcp 0 0 127.0.0.1:5232 0.0.0.0:* LISTEN 301430/python3Eveen tough Radicale comes with an option to use SSL certificates, we set up a reverse proxy instead to include the certbot functionality, following the article Generic setup of a https nginx/Apache reverse proxy. Obviously, the settings here are
ServerName caldav.example.org
ServerAlias caldav.example.organd
ProxyPass / http://127.0.0.1:5232/
ProxyPassReverse / http://127.0.0.1:5232/After retrieving the SSL certificates via certbot, we should see a login page with user and password input fields when calling https://caldav.example.org in a browser, and we should be able to login with user01 and the corresponding password that we have created before.
We have two links available, one for creating a new addressbook or calendar and one for uploading an addressbook or calendar. For now, we can leave everything as it is, as we go for the Thunderbird integration, after finally enabling the server for automatic start:
systemctl enable radicale.service Use CalDAV with Thunderbird
UPDATE 2025-11-01: The solution written below is outdated, there’s now a canonical way to use CalDAV with Thunderbird without addons, documented here.
Thanks to Nick for pointing that out to me.
That’s quite easy: Via Tools -> Addons and Themes we install the addons TbSync and Provider for CalDAV & CardDAV.
Then, via Edit -> Synchronization Settings (TbSync) we go to Account actions -> Add new account -> CalDAV & CardDAV. There we choose Manual configuration (since the automatic one does not work with our Radicale server, not sure if this is a server or a Thunderbird bug).
Now we return to our Radicale web frontend where we can either create a new calendar from scratch or by uploading an existing ICS file. In both cases, a new resource entry will be created, that provides an URL of the form https://caldav.example.org/user01/[some UUID]. We copy this URL to the clipboard and paste it into the Thunderbird CalDAV account information mask. Finally, we create an account name and register the user credentials (user01 plus password).
On the General Tab of the TbSync account settings, we can now enable the synchronization of the just created account and trigger a first sync via Synchronize now. After setting the Periodic synchronization to 10 minutes (or whatever you like), the Thunderbird configuration for CalDAV is done. These steps, of course, have to be repeated for every Thunderbird client that should use the calendar synchronization for user01.
That’s it! Now we have set up the CalDAV server “Radicale” for synchronizing calendars between different Thunderbird clients on Ubuntu 22.04.x.