- Install Radicale using
pip
python3 -m pip install --upgrade radicale
- Create configuration files for Radicale
mkdir ~/.config/radicale touch ~/.config/radicale/config touch ~/.config/radicale/users
- Install Apache
htpasswd
, then create a user and a passwordsudo apt-get install apache2-utils #For Debian-based htpasswd -c ~/.config/radicale/users user1
- Update the
config
file with the following content[server] # Bind all addresses hosts = 0.0.0.0:5232, [::]:5232 [auth] type = htpasswd htpasswd_filename = ~/.config/radicale/users htpasswd_encryption = md5 [storage] filesystem_folder = ~/.var/lib/radicale/collections
- Create Radicale service with
systemd
touch ~/.config/systemd/user/radicale.service
- Update the file
radicale.service
with the following content[Unit] Description=Radicale server [Service] ExecStart=/usr/bin/env python3 -m radicale Restart=on-failure [Install] WantedBy=default.target
- Start the Radicale server
systemctl --user enable radicale systemctl --user start radicale systemctl --user status radicale
- Optional: Import existing calendar and contacts (for user1)
curl -u 'user1:password' -X PUT http://localhost:5232/user1/calendar --data-binary @calendar.ics curl -u 'user1:password' -X PUT http://localhost:5232/user1/addressbook --data-binary @contact.vcf
Note:
- When importing existing contacts (
vcf
file), make sure that every record containsFN:
. If not, radicale returns "Bad request" error message.
Next steps:
- Setup Apache configuration or nginx configuration for the Radicale service.
- Add calendar and contacts to clients using Radicale CalDav and CardDav.
Back to Memo