Skip to content

Commit f66f43d

Browse files
New Script: Radicale (#1941)
* add radicale script * Update install/radicale-install.sh Co-authored-by: Michel Roegl-Brunner <[email protected]> * Update install/radicale-install.sh Co-authored-by: Michel Roegl-Brunner <[email protected]> * Update install/radicale-install.sh Co-authored-by: Michel Roegl-Brunner <[email protected]> * small fixes * fixes * fixes * fixed json * added update * Update install/radicale-install.sh Co-authored-by: Michel Roegl-Brunner <[email protected]> --------- Co-authored-by: Michel Roegl-Brunner <[email protected]>
1 parent c112edd commit f66f43d

File tree

3 files changed

+166
-0
lines changed

3 files changed

+166
-0
lines changed

ct/radicale.sh

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/usr/bin/env bash
2+
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: tremor021
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://radicale.org/
7+
8+
# App Default Values
9+
APP="Radicale"
10+
var_tags="calendar"
11+
var_cpu="1"
12+
var_ram="512"
13+
var_disk="2"
14+
var_os="debian"
15+
var_version="12"
16+
var_unprivileged="1"
17+
18+
# App Output & Base Settings
19+
header_info "$APP"
20+
base_settings
21+
22+
# Core
23+
variables
24+
color
25+
catch_errors
26+
27+
function update_script() {
28+
header_info
29+
check_container_storage
30+
check_container_resources
31+
if [[ ! -d /opt/radicale ]]; then
32+
msg_error "No ${APP} Installation Found!"
33+
exit
34+
fi
35+
36+
msg_info "Updating ${APP}"
37+
python3 -m venv /opt/radicale
38+
source /opt/radicale/bin/activate
39+
python3 -m pip install --upgrade https://github.com/Kozea/Radicale/archive/master.tar.gz
40+
msg_ok "Updated ${APP}"
41+
42+
msg_info "Starting Service"
43+
systemctl enable -q --now radicale
44+
msg_ok "Started Service"
45+
46+
exit
47+
}
48+
49+
start
50+
build_container
51+
description
52+
53+
msg_ok "Completed Successfully!\n"
54+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
55+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
56+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:5232${CL}"

install/radicale-install.sh

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: Slaviša Arežina (tremor021)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
7+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
8+
color
9+
verb_ip6
10+
catch_errors
11+
setting_up_container
12+
network_check
13+
update_os
14+
15+
msg_info "Installing Dependencies"
16+
$STD apt-get install -y \
17+
curl \
18+
sudo \
19+
mc \
20+
apache2-utils \
21+
python3-pip \
22+
python3.11-venv
23+
msg_ok "Installed Dependencies"
24+
25+
msg_info "Setting up Radicale"
26+
python3 -m venv /opt/radicale
27+
source /opt/radicale/bin/activate
28+
python3 -m pip install --upgrade https://github.com/Kozea/Radicale/archive/master.tar.gz
29+
RNDPASS=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c13)
30+
htpasswd -b -5 /opt/radicale/users admin $RNDPASS
31+
{
32+
echo "Radicale Credentials"
33+
echo "Admin User: admin"
34+
echo "Admin Password: $RNDPASS"
35+
} >> ~/radicale.creds
36+
37+
msg_info "Setup Service"
38+
39+
cat <<EOF >/opt/radicale/start.sh
40+
#!/usr/bin/env bash
41+
source /opt/radicale/bin/activate
42+
python3 -m radicale --storage-filesystem-folder=/var/lib/radicale/collections --hosts 0.0.0.0:5232 --auth-type htpasswd --auth-htpasswd-filename /opt/radicale/users --auth-htpasswd-encryption sha512
43+
EOF
44+
45+
chmod +x /opt/radicale/start.sh
46+
47+
cat <<EOF >/etc/systemd/system/radicale.service
48+
Description=A simple CalDAV (calendar) and CardDAV (contact) server
49+
After=network.target
50+
Requires=network.target
51+
52+
[Service]
53+
ExecStart=/opt/radicale/start.sh
54+
Restart=on-failure
55+
# User=radicale
56+
# Deny other users access to the calendar data
57+
# UMask=0027
58+
59+
[Install]
60+
WantedBy=multi-user.target
61+
EOF
62+
systemctl enable -q --now radicale
63+
msg_ok "Created Service"
64+
65+
motd_ssh
66+
customize
67+
68+
msg_info "Cleaning up"
69+
$STD apt-get -y autoremove
70+
$STD apt-get -y autoclean
71+
msg_ok "Cleaned"

json/radicale.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "Radicale",
3+
"slug": "radicale",
4+
"categories": [
5+
6
6+
],
7+
"date_created": "2025-02-02",
8+
"type": "ct",
9+
"updateable": false,
10+
"privileged": false,
11+
"interface_port": 5232,
12+
"documentation": "https://radicale.org/master.html#documentation-1",
13+
"website": "https://radicale.org/",
14+
"logo": "https://radicale.org/assets/logo.svg",
15+
"description": "Radicale is a small but powerful CalDAV (calendars, to-do lists) and CardDAV (contacts)",
16+
"install_methods": [
17+
{
18+
"type": "default",
19+
"script": "ct/radicale.sh",
20+
"resources": {
21+
"cpu": 1,
22+
"ram": 512,
23+
"hdd": 2,
24+
"os": "Debian",
25+
"version": "12"
26+
}
27+
}
28+
],
29+
"default_credentials": {
30+
"username": null,
31+
"password": null
32+
},
33+
"notes": [
34+
{
35+
"text": "To view the user credentials : `cat radicale.creds`",
36+
"type": "info"
37+
}
38+
]
39+
}

0 commit comments

Comments
 (0)