Ubuntu安装radicale服务

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         # 开机自启
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容