matter-server
This commit is contained in:
60
ct/matter-server.sh
Normal file
60
ct/matter-server.sh
Normal file
@@ -0,0 +1,60 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://github.com/matter-js/python-matter-server
|
||||
|
||||
APP="Matter-Server"
|
||||
var_tags="${var_tags:-matter;iot;smart-home}"
|
||||
var_cpu="${var_cpu:-2}"
|
||||
var_ram="${var_ram:-2048}"
|
||||
var_disk="${var_disk:-4}"
|
||||
var_os="${var_os:-debian}"
|
||||
var_version="${var_version:-13}"
|
||||
var_unprivileged="${var_unprivileged:-1}"
|
||||
|
||||
header_info "$APP"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
check_container_storage
|
||||
check_container_resources
|
||||
|
||||
if [[ ! -d /opt/matter-server ]]; then
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
|
||||
if check_for_gh_release "matter-server" "matter-js/python-matter-server"; then
|
||||
msg_info "Stopping Service"
|
||||
systemctl stop matter-server
|
||||
msg_ok "Stopped Service"
|
||||
|
||||
msg_info "Updating Matter Server"
|
||||
MATTER_VERSION=$(get_latest_github_release "matter-js/python-matter-server")
|
||||
$STD uv pip install --python /opt/matter-server/.venv/bin/python --upgrade "python-matter-server[server]==${MATTER_VERSION}"
|
||||
echo "${MATTER_VERSION}" >~/.matter-server
|
||||
msg_ok "Updated Matter Server"
|
||||
|
||||
fetch_and_deploy_gh_release "chip-ota-provider-app" "home-assistant-libs/matter-linux-ota-provider" "singlefile" "latest" "/usr/local/bin" "chip-ota-provider-app-x86-64"
|
||||
|
||||
msg_info "Starting Service"
|
||||
systemctl start matter-server
|
||||
msg_ok "Started Service"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
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}:5580${CL}"
|
||||
66
install/matter-server-install.sh
Normal file
66
install/matter-server-install.sh
Normal file
@@ -0,0 +1,66 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2026 community-scripts ORG
|
||||
# Author: MickLesk (CanbiZ)
|
||||
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
|
||||
# Source: https://github.com/matter-js/python-matter-server
|
||||
|
||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt install -y \
|
||||
libuv1 \
|
||||
libjson-c5 \
|
||||
libnl-3-200 \
|
||||
libnl-route-3-200 \
|
||||
iputils-ping \
|
||||
iproute2
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
UV_PYTHON="3.12" setup_uv
|
||||
|
||||
msg_info "Setting up Matter Server"
|
||||
mkdir -p /opt/matter-server/data/credentials
|
||||
$STD uv venv /opt/matter-server/.venv
|
||||
MATTER_VERSION=$(get_latest_github_release "matter-js/python-matter-server")
|
||||
$STD uv pip install --python /opt/matter-server/.venv/bin/python "python-matter-server[server]==${MATTER_VERSION}"
|
||||
echo "${MATTER_VERSION}" >~/.matter-server
|
||||
msg_ok "Set up Matter Server"
|
||||
|
||||
fetch_and_deploy_gh_release "chip-ota-provider-app" "home-assistant-libs/matter-linux-ota-provider" "singlefile" "latest" "/usr/local/bin" "chip-ota-provider-app-x86-64"
|
||||
|
||||
msg_info "Configuring Network"
|
||||
cat <<EOF >/etc/sysctl.d/99-matter.conf
|
||||
net.ipv4.igmp_max_memberships=1024
|
||||
EOF
|
||||
$STD sysctl --system
|
||||
msg_ok "Configured Network"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/matter-server.service
|
||||
[Unit]
|
||||
Description=Matter Server
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=root
|
||||
ExecStart=/opt/matter-server/.venv/bin/matter-server --storage-path /opt/matter-server/data --paa-root-cert-dir /opt/matter-server/data/credentials
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now matter-server
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
cleanup_lxc
|
||||
44
json/matter-server.json
Normal file
44
json/matter-server.json
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "Matter Server",
|
||||
"slug": "matter-server",
|
||||
"categories": [
|
||||
17
|
||||
],
|
||||
"date_created": "2026-03-24",
|
||||
"type": "ct",
|
||||
"updateable": true,
|
||||
"privileged": false,
|
||||
"interface_port": 5580,
|
||||
"documentation": "https://github.com/matter-js/python-matter-server",
|
||||
"website": "https://github.com/matter-js/python-matter-server",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/home-assistant.webp",
|
||||
"config_path": "",
|
||||
"description": "Open Home Foundation Matter Server - an officially certified Matter controller serving as the foundation for Matter support in Home Assistant and other projects.",
|
||||
"install_methods": [
|
||||
{
|
||||
"type": "default",
|
||||
"script": "ct/matter-server.sh",
|
||||
"resources": {
|
||||
"cpu": 2,
|
||||
"ram": 2048,
|
||||
"hdd": 4,
|
||||
"os": "Debian",
|
||||
"version": "13"
|
||||
}
|
||||
}
|
||||
],
|
||||
"default_credentials": {
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "The Matter Server exposes a WebSocket API on port 5580 for integration with Home Assistant or other consumers.",
|
||||
"type": "info"
|
||||
},
|
||||
{
|
||||
"text": "For Thread-based devices, ensure IPv6 is properly configured on the host network.",
|
||||
"type": "warning"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user