1. 安装与配置
pip install --upgrade radicale
2. 验证是否安装成功
python3 -m radicale
3. 修改配置文件
mkdir -p /opt/radicale/data
vim /etc/radicale/config
[auth]
type = none
#htpasswd_filename = /opt/radicale/users
#htpasswd_encryption = autodetect
#htpasswd_encryption = bcrypt
#delay = 1
[server]
hosts = 0.0.0.0:5232
max_connections = 20
# 100 Megabyte
max_content_length = 100000000
# 30 seconds
timeout = 30
[storage]
filesystem_folder = /opt/radicale/data
4. systemctl接管
vim /etc/systemd/system/radicale.service
[Unit]
Description=A simple CalDAV (calendar) and CardDAV (contact) server
After=network.target
Requires=network.target
[Service]
ExecStart=/usr/bin/env python3 -m radicale
Restart=on-failure
[Install]
WantedBy=multi-user.target
5. 常用命令
systemctl start radicale # 启动
systemctl stop radicale # 停止
systemctl restart radicale # 开机自启动
systemctl status radicale # 查看状态
systemctl enable radicale # 开机自启