1. prereqs

source /etc/cid.conf
curl -s http://${rdsserver}/sharel/bin/inst-httpd | sh

2. installation

yum -y install libffi-devel gcc python3-devel python3-pip
python3 -m pip install bcrypt passlib
python3 -m pip install --upgrade radicale

3. configuration

groupadd -g 443 radicale
useradd -r -u 443 -g radicale -s /bin/bash -d /var/lib/radicale/ radicale
mkdir -p /etc/radicale/ssl /var/lib/radicale /var/log/radicale
chown radicale -R /var/lib/radicale/ /var/log/radicale/
touch /etc/radicale/users
source /etc/cid.conf
wget -N -nv http://${rdsserver}/sharel/etc/radicale/config -P /etc/radicale/
wget -N -nv http://${rdsserver}/sharel/etc/radicale/logging -P /etc/radicale/
wget -N -nv http://${rdsserver}/sharel/etc/radicale/rights -P /etc/radicale/
wget -N -nv http://${rdsserver}/sharel/etc/radicale/keys/server.crt -P /etc/radicale/keys/
wget -N -nv http://${rdsserver}/sharel/etc/radicale/keys/server.key -P /etc/radicale/keys/
wget -N -nv http://${rdsserver}/sharel/usr/lib/systemd/system/radicale.service -P /usr/lib/systemd/system/
systemctl daemon-reload
systemctl enable radicale.service
systemctl start radicale.service

4. upm

htpasswd -b -B /etc/radicale/users alain alain
htpasswd -b -B /etc/radicale/users yannick yannick
htpasswd -b -B /etc/radicale/users francis francis
htpasswd -b -B /etc/radicale/users marleen marleen
htpasswd -b -B /etc/radicale/users rudy rudy

5. ssl (renew if needed)

mkdir -p /etc/radicale/keys
openssl req -nodes -newkey rsa:2048 -x509 -days 3650 \
            -keyout /etc/radicale/keys/server.key \
            -out /etc/radicale/keys/server.crt

6. testing

7. upload

curl -v -k -T Downloads/alain.rykaert@gmail.com.ics --user alain:alain https://d01cal.ddns.net:5232/alain/
*   Trying
* Connected to d01cal.ddns.net ( port 5232 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: C=XX; L=Default City; O=Default Company Ltd; CN=me
*  start date: Nov 11 18:24:54 2019 GMT
*  expire date: Nov  8 18:24:54 2029 GMT
*  issuer: C=XX; L=Default City; O=Default Company Ltd; CN=me
*  SSL certificate verify result: self signed certificate (18), continuing anyway.
* Server auth using Basic with user 'alain'
> PUT /alain/alain.rykaert%40gmail.com.ics HTTP/1.1
> Host: d01cal.ddns.net:5232
> Authorization: Basic YWxhaW46YWxhaW4=
> User-Agent: curl/7.66.0
> Accept: */*
> Content-Length: 145615
> Expect: 100-continue
* Done waiting for 100-continue
* We are completely uploaded and fine
* Mark bundle as not supporting multiuse
* HTTP 1.0, assume close after body
< HTTP/1.0 201 Created
< Date: Thu, 28 Nov 2019 18:24:57 GMT
< Server: WSGIServer/0.2 CPython/3.6.8
< ETag: "d9146fc072a2781fab299e57aa5a45b7"
< Content-Length: 0
* Closing connection 0
* TLSv1.2 (OUT), TLS alert, close notify (256):

8. client config

8.1. android

The Android calendar is not able to sync all events with CalDav servers. I installed CalDavSync to add this feature. You can find a CalDavSync App here: CalDavSyncAdapter I’ve tested this app and it works for me.

To sync your Android calendar with the server go to the calendar app and then Settings → Calendar → Add Account → CalDav Sync Adapter Enter the login credentials and the url to your calendar.

8.2. thunderbird

Start Thunderbird and go to File → New → Calendar Choose the option “On the Network” and click Next. Select “CalDav” and enter the address to the calendar, e.g. https://COMPUTERNAME:5232/funkym0nk3y/calendar.ics. If the calendar does not exist, radicale will create it. Click Next and enter the name of the calendar, choose a color and click Next. You will get a message: “Your calendar has been created”. You have to enter the username and the password.

9. references