1
0
mirror of https://github.com/community-scripts/ProxmoxVE.git synced 2025-03-08 13:19:05 +00:00

New Script: Element Synapse (#1955)

* add element synapse script

* Update install/elementsynapse-install.sh

Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>

* Update install/elementsynapse-install.sh

Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>

* fixes

* fixes v2

---------

Co-authored-by: Michel Roegl-Brunner <73236783+michelroegl-brunner@users.noreply.github.com>
This commit is contained in:
Slaviša Arežina 2025-02-03 13:09:49 +01:00 committed by GitHub
parent b4a0b74bfd
commit fb8f911c49
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 126 additions and 0 deletions

49
ct/elementsynapse.sh Normal file
View File

@ -0,0 +1,49 @@
#!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: tremor021
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/element-hq/synapse
# App Default Values
APP="Element Synapse"
var_tags="server"
var_cpu="1"
var_ram="1024"
var_disk="4"
var_os="debian"
var_version="12"
var_unprivileged="1"
# App Output & Base Settings
header_info "$APP"
base_settings
# Core
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /etc/matrix-synapse ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
msg_info "Updating $APP LXC"
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
msg_ok "Updated $APP LXC"
exit
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8008${CL}"

View File

@ -0,0 +1,43 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: tremor021
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y
sudo \
curl \
mc \
lsb-release \
wget \
apt-transport-https \
debconf-utils
msg_ok "Installed Dependencies"
msg_info "Installing Element Synapse"
wget -O /usr/share/keyrings/matrix-org-archive-keyring.gpg https://packages.matrix.org/debian/matrix-org-archive-keyring.gpg
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
$STD apt-get update
echo "matrix-synapse-py3 matrix-synapse/server-name string matrix" | debconf-set-selections
echo "matrix-synapse-py3 matrix-synapse/report-stats boolean false" | debconf-set-selections
$STD apt-get install matrix-synapse-py3 -y
sed -i 's/127.0.0.1/0.0.0.0/g' /etc/matrix-synapse/homeserver.yaml
systemctl enable -q --now matrix-synapse
msg_ok "Installed Element Synapse"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

34
json/elementsynapse.json Normal file
View File

@ -0,0 +1,34 @@
{
"name": "Element Synapse",
"slug": "elementsynapse",
"categories": [
4
],
"date_created": "2025-02-02",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 8008,
"documentation": "https://element-hq.github.io/synapse/latest/welcome_and_overview.html",
"website": "https://element.io/",
"logo": "https://element.io/images/logo-mark-primary.svg",
"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.",
"install_methods": [
{
"type": "default",
"script": "ct/elementsynapse.sh",
"resources": {
"cpu": 1,
"ram": 1024,
"hdd": 4,
"os": "Debian",
"version": "12"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": []
}