<h2>Radicale CalDAV/CardDAV Server - Key Points</h2>

<h3>Installing</h3>

<pre>
zypper install radicale
# Creates radicale:radicale system user automatically
</pre>

<h3>Configuration `/etc/radicale/config`</h3>

<p>Key active settings:</p>

<pre>
[server]
hosts = localhost:5232

[auth]
type = htpasswd
htpasswd_filename = /etc/radicale/users
htpasswd_encryption = autodetect

[storage]
filesystem_folder = /srv/radicale/collections
</pre>

<h3>Critical systemd override</h3>

<p>Default service restricts writes to `/var/lib/radicale/` &mdash; must add `/srv/radicale/` to allowed paths. Copy service file to webstack and add:</p>

<pre>
ReadWritePaths=/var/lib/radicale/collections /srv/radicale/
</pre>

<h3>Storage setup</h3>

<pre>
mkdir -p /srv/radicale/collections
chown -R radicale:radicale /srv/radicale
chmod 755 /srv/radicale
chmod 755 /srv/radicale/collections
</pre>

<p>**Critical &mdash; directories need 755 not 644!**</p>

<h3>Collection structure</h3>

<pre>
# Create directory structure
mkdir -p /srv/radicale/collections/collection-root/lsces/calendar
mkdir -p /srv/radicale/collections/collection-root/lsces/contacts

# Props files &amp;mdash; collection-root needs one too!
echo &amp;#39;{}&amp;#39; &amp;gt; /srv/radicale/collections/collection-root/.Radicale.props

cat &amp;gt; /srv/radicale/collections/collection-root/lsces/.Radicale.props &amp;lt;&amp;lt; &amp;#39;EOF&amp;#39;
{&amp;quot;D:displayname&amp;quot;: &amp;quot;lsces&amp;quot;}
EOF

cat &amp;gt; /srv/radicale/collections/collection-root/lsces/calendar/.Radicale.props &amp;lt;&amp;lt; &amp;#39;EOF&amp;#39;
{&amp;quot;C:supported-calendar-component-set&amp;quot;: &amp;quot;VEVENT,VJOURNAL,VTODO&amp;quot;, &amp;quot;D:displayname&amp;quot;: &amp;quot;Personal Calendar&amp;quot;, &amp;quot;tag&amp;quot;: &amp;quot;VCALENDAR&amp;quot;}
EOF

cat &amp;gt; /srv/radicale/collections/collection-root/lsces/contacts/.Radicale.props &amp;lt;&amp;lt; &amp;#39;EOF&amp;#39;
{&amp;quot;D:displayname&amp;quot;: &amp;quot;Personal Contacts&amp;quot;, &amp;quot;tag&amp;quot;: &amp;quot;VADDRESSBOOK&amp;quot;}
EOF

chown -R radicale:radicale /srv/radicale/collections
</pre>

<h3>Create user</h3>

<pre>
htpasswd -B -c /etc/radicale/users lsces
</pre>

<h3>Enable and start</h3>

<pre>
systemctl daemon-reload
systemctl enable radicale
systemctl start radicale
systemctl status radicale
</pre>

<h3>nginx reverse proxy</h3>

<pre>
location /dav/ {
proxy_pass http://localhost:5232/;
proxy_set_header X-Script-Name /dav;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_pass_header Authorization;
proxy_set_header Authorization $http_authorization;
}
</pre>

<p><strong>Both Authorization headers needed &mdash; nginx strips it without explicit passthrough!</strong></p>

<h3>Migrating from Nextcloud</h3>

<p><strong>Calendar export </strong>&mdash; Nextcloud UI:<br />
Calendar &rarr; Edit &rarr; Export &rarr; saves `.ics`<br />
Radicale requires **one event per file** &mdash; split the export:</p>

<pre>
import re, os

with open(&amp;#39;personal.ics&amp;#39;, &amp;#39;r&amp;#39;) as f:
content = f.read()

header = content[:content.index(&amp;#39;BEGIN:VEVENT&amp;#39;)]
footer = &amp;#39;END:VCALENDARn&amp;#39;
events = re.findall(&amp;#39;BEGIN:VEVENT.*?END:VEVENT&amp;#39;, content, re.DOTALL)
os.makedirs(&amp;#39;/srv/radicale/split&amp;#39;, exist_ok=True)

for event in events:
uid = re.search(&amp;#39;UID:(.*?)n&amp;#39;, event).group(1).strip()
with open(f&amp;#39;/srv/radicale/split/{uid}.ics&amp;#39;, &amp;#39;w&amp;#39;) as f:
f.write(header)
f.write(event + &amp;#39;n&amp;#39;)
f.write(footer)

print(f&amp;#39;Split {len(events)} events&amp;#39;)
</pre>

<p>**Contacts export** &mdash; Nextcloud UI: Contacts &rarr; Settings &rarr; Export &rarr; saves `.vcf` Same split needed for contacts:</p>

<pre>
import re, os

with open(&amp;#39;contacts.vcf&amp;#39;, &amp;#39;r&amp;#39;) as f:
content = f.read()

contacts = re.findall(&amp;#39;BEGIN:VCARD.*?END:VCARD&amp;#39;, content, re.DOTALL)
os.makedirs(&amp;#39;/srv/radicale/split_contacts&amp;#39;, exist_ok=True)

for contact in contacts:
uid = re.search(&amp;#39;UID:(.*?)n&amp;#39;, contact)
uid = uid.group(1).strip() if uid else f&amp;#39;contact_{contacts.index(contact)}&amp;#39;
with open(f&amp;#39;/srv/radicale/split_contacts/{uid}.vcf&amp;#39;, &amp;#39;w&amp;#39;) as f:
f.write(contact + &amp;#39;n&amp;#39;)

print(f&amp;#39;Split {len(contacts)} contacts&amp;#39;)
</pre>

<p>**Import via curl:**</p>

<pre>
# Calendar events
for f in /srv/radicale/split/*.ics; do
uid=$(basename &amp;quot;$f&amp;quot; .ics)
curl -s -u lsces:password
-X PUT
-H &amp;quot;Content-Type: text/calendar&amp;quot;
--data-binary @&amp;quot;$f&amp;quot;
&amp;quot;https://rdm1.uk/dav/lsces/calendar/${uid}.ics&amp;quot;
echo &amp;quot;$uid&amp;quot;
done

# Contacts
for f in /srv/radicale/split_contacts/*.vcf; do
uid=$(basename &amp;quot;$f&amp;quot; .vcf)
curl -s -u lsces:password
-X PUT
-H &amp;quot;Content-Type: text/vcard&amp;quot;
--data-binary @&amp;quot;$f&amp;quot;
&amp;quot;https://rdm1.uk/dav/lsces/contacts/${uid}.vcf&amp;quot;
echo &amp;quot;$uid&amp;quot;
done
</pre>

<h3>Client configuration</h3>

<ul>
<li><strong>Thunderbird</strong> &mdash; Add new calendar/contacts:</li>
<li>Network &rarr; CalDAV/CardDAV</li>
<li>
<pre>
URL: https://yourdomain/dav/username/calendar/</pre>
</li>
</ul>

<ul>
<li><strong>DAVx⁵ (Android)</strong> &mdash; Add account:</li>
<li>
<pre>
Base URL:https://yourdomain/dav/username/</pre>
</li>
<li>Auto-discovers both calendar and contacts</li>
</ul>
Page History
Date/CommentUserIPVersion
28 Apr 2026 (12:39 UTC)
—
Lester Caine192.168.1.2548
Current • Source
Lester Caine192.168.1.2547
View • Compare • Difference • Source
Lester Caine192.168.1.2546
View • Compare • Difference • Source
Lester Caine192.168.1.2545
View • Compare • Difference • Source
Lester Caine192.168.1.2544
View • Compare • Difference • Source
Lester Caine192.168.1.2543
View • Compare • Difference • Source
Lester Caine192.168.1.2542
View • Compare • Difference • Source
Lester Caine192.168.1.2541
View • Compare • Difference • Source