This is an old revision of the document!
Radicale
Radicale is a CalDAV/CardDAV server.
CalDAV is the WebDAV extension to manage Calendars
CardDAV is the WebDAV extension to manage address books and contacts in general.
To add support for both, which will allow your phone to sync contacts and calendars with your home server, i choose to use the great, simple and effective Radicale server.
Please note that Radicale do not provide a user-interface to edit or use calendars or contacts, you need third party apps for that.
To install radicale, of course, you need it's dedicated user, so add user:
useradd -d /data/daemons/radicale -m radicale
Create data folder:
mkdir /data/cardcal chown radicale:radicale /data/cardcal
Radicale uses pip, so as usual enable it on Gentoo for user Radicale by creating the file /data/daemons/deemon/.config/pip/pip.conf with this content:
[global] break-system-packages = true user = true
Install as user radicale:
su - radicale pip install --upgrade radicale
Create the config file ~/.config/radicale/config:
- config
# Bind all addresses hosts = 127.0.0.1:5232 [auth] type = http_x_remote_user #htpasswd_filename = ~/.config/radicale/users #htpasswd_encryption = md5 [storage] filesystem_folder = /data/cardcal </code> then start it: <code bash> su - radicale radicale </code> ==== Reverse Proxy ==== As usual you want it protected by the Reverse Proxy, so create the **radicale.conf** file: <file - radicale.conf> location /radicale/ { # The trailing / is important! proxy_pass http://localhost:5232/; # The / is important! proxy_set_header X-Script-Name /radicale; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_pass_header Authorization; proxy_set_header X-Remote-User $remote_user; # allow automatic authentication using proxy credentials # to prevent timeouts importing huge calendars or contacts lists proxy_send_timeout 600; proxy_read_timeout 600; }
add this config file to NGINX (see The Reverse Proxy concept for more details) and restart nginx.
Now go with browser to http://10.0.0.1/radicale to finish setup.
Autostart
Autostart, put this into /etc/local.d/50-radicale.start and make it executable: <file - 50-radicale.start> #!/bin/bash
start-stop-daemon -b -m -p /var/run/radicale.pid -n radicale -u radicale /data/daemons/radicale/.local/bin/radicale </code>