====== Information ====== * Radicale ((http://radicale.org)) * Provides CardDav and CalDav services ===== Prerequisites ===== * [[distros:ubuntu_server | Ubuntu Server]] ====== Dependencies ====== **** sudo apt install radicale python-pampy && sync ====== Firewall ====== * 5232/tcp is Radicale sudo -e '/etc/ufw/applications.d/custom' && sudo ufw allow 'radicale-custom' [radicale-custom] title=radicale-custom description=Radicale ports=5232/tcp ====== Config ====== sudo mkdir -p '/var/lib/radicale/.config/radicale' && sudo chown -R 'radicale':'radicale' '/var/lib/radicale' && sudo -u 'radicale' -e '/var/lib/radicale/.config/radicale/config' [server] hosts = 0.0.0.0:5232, [::]:5232 [auth] type = PAM ====== Service ====== ====== Fix ====== * TODO: Figure out why this is set by-default... ((this causes the systemd service not to start)) sudo sed -i 's/'#ENABLE_RADICALE'/'ENABLE_RADICALE'/g' '/etc/default/radicale' ====== Service ====== **** sudo systemctl enable 'radicale' --now ====== Evolution ====== ===== Calendar, Tasks, Memos ===== **** http://192.168.1.153:5232/espionage724/calendar.ics/ ===== Contacts ===== **** http://192.168.1.153:5232/espionage724/contacts.vcf/ ====== DAVdroid ====== ===== Base URL ===== **** http://192.168.1.153:5232/espionage724/ ====== Services ====== ===== Backup ===== * This backs up an archive to the local disk and [[distros:ubuntu_server#nas_backups | to a NAS]] ==== Service ==== mkdir -p ~/'backups' && sudo -e '/etc/systemd/system/radicale-fb.service' && sudo sed -i 's/CHANGEME/'$USER'/g' '/etc/systemd/system/radicale-fb.service' [Service] Type=oneshot WorkingDirectory=/var/lib ExecStart='/bin/bash' -c '"/bin/tar" -cvzf "/home/CHANGEME/backups/radicale-files-auto-"$$(date +%%Y-%%m-%%d)".tar.gz" "radicale"' ExecStartPost='/bin/sync' ==== Timer ==== * TODO: Set a dedicated time for this as 1:05 is used already sudo -e '/etc/systemd/system/radicale-fb.timer' && sudo systemctl daemon-reload && sudo systemctl enable 'radicale-fb.timer' --now && sudo systemctl start 'radicale-fb' && sudo systemctl status 'radicale-fb' -l [Unit] Description=Radicale Files Backup [Timer] OnCalendar=*-*-* 01:05:00 Persistent=true [Install] WantedBy=timers.target ====== Backup ====== ===== Server ===== ==== Backup Collections ==== **** cd '/var/lib' && sudo tar -cvzf ~/'radicale-files-manual-'$(date +%Y-%m-%d)'.tar.gz' 'radicale' && cd ~ && sync ===== Client ===== ==== Transfer Archive To Client ==== **** scp espionage724@192.168.1.153:~/'radicale-files-'*'.tar.gz' ~/'Downloads' && sync ====== Restore ====== ===== Client ===== ==== Transfer Archive To Server ==== **** scp ~/'Downloads/radicale-files-'*'.tar.gz' espionage724@192.168.1.153:~ ==== Remove Archive ==== **** rm ~/'Downloads/radicale-files-'*'.tar.gz' && sync ===== Server ===== ==== Remove Previous Folder ==== **** sudo rm -Rf '/var/lib/radicale' ==== Restore Folder ==== **** cd '/var/lib' && sudo tar -xvzf ~/'radicale-files-'*'.tar.gz' 'radicale' && sudo chown -R 'radicale':'radicale' '/var/lib/radicale' && cd ~ && sync ==== Start Service ==== **** sudo systemctl start 'radicale' ==== Remove Archive ==== * Verify that CalDAV and CardDAV clients can successfully read and sync before running sudo rm ~/'radicale-files-'*'.tar.gz'