Skip to content

Commit fb8f911

Browse files
New Script: Element Synapse (#1955)
* add element synapse script * Update install/elementsynapse-install.sh Co-authored-by: Michel Roegl-Brunner <[email protected]> * Update install/elementsynapse-install.sh Co-authored-by: Michel Roegl-Brunner <[email protected]> * fixes * fixes v2 --------- Co-authored-by: Michel Roegl-Brunner <[email protected]>
1 parent b4a0b74 commit fb8f911

File tree

3 files changed

+126
-0
lines changed

3 files changed

+126
-0
lines changed

ct/elementsynapse.sh

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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://github.com/element-hq/synapse
7+
8+
# App Default Values
9+
APP="Element Synapse"
10+
var_tags="server"
11+
var_cpu="1"
12+
var_ram="1024"
13+
var_disk="4"
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 /etc/matrix-synapse ]]; then
32+
msg_error "No ${APP} Installation Found!"
33+
exit
34+
fi
35+
msg_info "Updating $APP LXC"
36+
apt-get update &>/dev/null
37+
apt-get -y upgrade &>/dev/null
38+
msg_ok "Updated $APP LXC"
39+
exit
40+
}
41+
42+
start
43+
build_container
44+
description
45+
46+
msg_ok "Completed Successfully!\n"
47+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
48+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
49+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8008${CL}"

install/elementsynapse-install.sh

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: 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+
sudo \
18+
curl \
19+
mc \
20+
lsb-release \
21+
wget \
22+
apt-transport-https \
23+
debconf-utils
24+
msg_ok "Installed Dependencies"
25+
26+
msg_info "Installing Element Synapse"
27+
wget -O /usr/share/keyrings/matrix-org-archive-keyring.gpg https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg
28+
echo "deb [signed-by=/usr/share/keyrings/matrix-org-archive-keyring.gpg] https://packages.matrix.org/debian/ $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/matrix-org.list
29+
$STD apt-get update
30+
echo "matrix-synapse-py3 matrix-synapse/server-name string matrix" | debconf-set-selections
31+
echo "matrix-synapse-py3 matrix-synapse/report-stats boolean false" | debconf-set-selections
32+
$STD apt-get install matrix-synapse-py3 -y
33+
sed -i 's/127.0.0.1/0.0.0.0/g' /etc/matrix-synapse/homeserver.yaml
34+
systemctl enable -q --now matrix-synapse
35+
msg_ok "Installed Element Synapse"
36+
37+
motd_ssh
38+
customize
39+
40+
msg_info "Cleaning up"
41+
$STD apt-get -y autoremove
42+
$STD apt-get -y autoclean
43+
msg_ok "Cleaned"

json/elementsynapse.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"name": "Element Synapse",
3+
"slug": "elementsynapse",
4+
"categories": [
5+
4
6+
],
7+
"date_created": "2025-02-02",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 8008,
12+
"documentation": "https://element-hq.github.io/synapse/latest/welcome_and_overview.html",
13+
"website": "https://element.io/",
14+
"logo": "https://element.io/images/logo-mark-primary.svg",
15+
"description": "Synapse is an open source Matrix homeserver implementation, written and maintained by Element. Matrix is the open standard for secure and interoperable real time communications. You can directly run and manage the source code in this repository, available under an AGPL license. There is no support provided from Element unless you have a subscription.",
16+
"install_methods": [
17+
{
18+
"type": "default",
19+
"script": "ct/elementsynapse.sh",
20+
"resources": {
21+
"cpu": 1,
22+
"ram": 1024,
23+
"hdd": 4,
24+
"os": "Debian",
25+
"version": "12"
26+
}
27+
}
28+
],
29+
"default_credentials": {
30+
"username": null,
31+
"password": null
32+
},
33+
"notes": []
34+
}

0 commit comments

Comments
 (0)