Rédigé par Nerd Aucun commentaire
26 février 2019 Tutoriels Radicale Carddav Caldav opensource Agenda Address book
Installation d'un serveur Radicale pour la synchronisation des contacts et calendriers ( CardDav / Caldav)
Ci-dessous l'installation manuelle, mais il existe un playbook Ansible prêt à l'emploi :
ATTENTION: Avant de vous lancer dans l'installation d'un serveur Radicale pour auto-héberger vos propres données de contacts et calendrier, j'espère que vous avez bien conscience qu'il est de votre responsabilité de faire des sauvegardes régulières de ces données.
sudo apt -y install python3 python3-pip apache2-utils
sudo useradd radicale -m -s /bin/bash
sudo mkdir -p /var/log/radicale/
sudo chown -R radicale:radicale /var/log/radicale
sudo passwd radicale
sudo su - radicale
mkdir -p ~/.config/radicale/
mkdir -p ~/.config/systemd/user/
pip3 install --upgrade radicale radicale[bcrypt] passlib[bcrypt]
htpasswd -B -c ~/.config/radicale/users nom_du_compte1
htpasswd -B ~/.config/radicale/users nom_du_compte(x)
En mettant bien évidemment ce que vous voulez comme user à la place de nom_du_compte1
[auth] type = htpasswd htpasswd_filename = ~/.config/radicale/users # encryption method used in the htpasswd file htpasswd_encryption = bcrypt # Average delay after failed login attempts in seconds delay = 10 [storage] filesystem_folder = ~/.config/radicale/collections [server] # ouvert à toute IP hosts = 0.0.0.0:5232 max_connections = 2 # 1 Megabyte max_content_length = 10000000 # 10 seconds timeout = 10 [logging] config = ~/.config/radicale/logs.conf
/! Pour plus d'option, voir le site officiel
https://radicale.org/configuration/
nano ~/.config/radicale/logs.conf
[loggers] keys = root [handlers] keys = file [formatters] keys = full [logger_root] # Change this to DEBUG or INFO for higher verbosity. level = INFO handlers = file [handler_file] class = handlers.RotatingFileHandler # Specify the output file and parameter for rotation here. # See https://docs.python.org/3/library/logging.handlers.html#logging.handlers.RotatingFileHandler # Example: rollover at 100000 kB and keep 10 files (means 1 MB) args = ('/var/log/radicale/log', 'a', 100000, 10) formatter = full [formatter_full] format = %(asctime)s - [%(thread)x] %(levelname)s: %(message)s
/! Pour plus d'option, voir le site officiel
https://docs.python.org/3/library/logging.config.html#configuration-file-format
sudo nano /lib/systemd/system/radicale.service
[Unit] Description=A simple CalDAV (calendar) and CardDAV (contact) server [Service] ExecStart=/usr/bin/env python3 -m radicale Restart=on-failure User=radicale Group=radicale [Install] WantedBy=multi-user.target
sudo systemctl enable radicale.service
sudo systemctl start radicale
systemctl status radicale
journalctl --unit radicale.service
Ou bien on jette un oeil dans le log
cat /var/log/radicale/log
2019-02-18 22:07:15,414 - [76f75640] INFO: Starting Radicale 2019-02-18 22:07:15,415 - [76f75640] INFO: Authentication type is 'htpasswd' 2019-02-18 22:07:16,612 - [76f75640] INFO: Storage type is 'multifilesystem' 2019-02-18 22:07:16,623 - [76f75640] INFO: Rights type is 'owner_only' 2019-02-18 22:07:16,623 - [76f75640] INFO: Web type is 'internal' 2019-02-18 22:07:16,633 - [76f75640] INFO: Listening to 'jarvis' on port 5232 2019-02-18 22:07:16,634 - [76f75640] INFO: Radicale server ready
Je vous invite à lire l'article concerné sur l'utilisation de Radicale