feat(mqttx): add MQTTX Web MQTT client script

Static Vue SPA for testing MQTT brokers via WebSocket.
Node.js build of web/ subdir, served with Nginx on port 80.
Category: MQTT & Messaging (18).
This commit is contained in:
CanbiZ (MickLesk)
2026-04-07 10:01:09 +02:00
parent 7869c45042
commit 6eaca2bec7
3 changed files with 149 additions and 0 deletions

60
ct/mqttx.sh Normal file
View 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/emqx/MQTTX
APP="MQTTX Web"
var_tags="${var_tags:-mqtt;iot;messaging}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-1024}"
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/mqttx ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
if check_for_gh_release "mqttx" "emqx/MQTTX"; then
msg_info "Stopping Nginx"
systemctl stop nginx
msg_ok "Stopped Nginx"
msg_info "Updating MQTTX Web"
fetch_and_deploy_gh_release "mqttx" "emqx/MQTTX" "tarball" "latest" "/opt/mqttx"
cd /opt/mqttx/web
$STD yarn install --frozen-lockfile
$STD yarn build
msg_ok "Updated MQTTX Web"
msg_info "Starting Nginx"
systemctl start nginx
msg_ok "Started Nginx"
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}:80${CL}"

49
install/mqttx-install.sh Normal file
View File

@@ -0,0 +1,49 @@
#!/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/emqx/MQTTX
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 \
nginx
msg_ok "Installed Dependencies"
NODE_VERSION="22" NODE_MODULE="yarn" setup_nodejs
fetch_and_deploy_gh_release "mqttx" "emqx/MQTTX" "tarball" "latest" "/opt/mqttx"
msg_info "Building MQTTX Web"
cd /opt/mqttx/web
$STD yarn install --frozen-lockfile
$STD yarn build
msg_ok "Built MQTTX Web"
msg_info "Configuring Nginx"
cat <<'EOF' >/etc/nginx/sites-available/default
server {
listen 80;
root /opt/mqttx/web/dist;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}
EOF
systemctl restart nginx
msg_ok "Configured Nginx"
motd_ssh
customize
cleanup_lxc

40
json/mqttx.json Normal file
View File

@@ -0,0 +1,40 @@
{
"name": "MQTTX Web",
"slug": "mqttx",
"categories": [
18
],
"date_created": "2026-04-07",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 80,
"documentation": "https://mqttx.app/docs/web",
"website": "https://mqttx.app/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/mqttx.webp",
"config_path": "",
"description": "MQTTX Web is an open source MQTT 5.0 browser client tool. It uses WebSocket to connect to MQTT brokers directly from the browser, making it easy to test and debug MQTT services without local installation.",
"install_methods": [
{
"type": "default",
"script": "ct/mqttx.sh",
"resources": {
"cpu": 1,
"ram": 1024,
"hdd": 4,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "MQTTX Web connects to MQTT brokers via WebSocket directly from the browser. No credentials are required for the web UI itself.",
"type": "info"
}
]
}