From 0fa17772cc0c4a445d6c57840e6d87961a640b49 Mon Sep 17 00:00:00 2001 From: John Lombardo Date: Tue, 28 Apr 2026 16:53:07 +0800 Subject: [PATCH 01/10] feat: add ESPConnect LXC --- ct/espconnect.sh | 54 ++++++++++++++++++++++++++++++ ct/headers/espconnect | 5 +++ install/espconnect-install.sh | 63 +++++++++++++++++++++++++++++++++++ json/espconnect.json | 44 ++++++++++++++++++++++++ 4 files changed, 166 insertions(+) create mode 100644 ct/espconnect.sh create mode 100644 ct/headers/espconnect create mode 100644 install/espconnect-install.sh create mode 100644 json/espconnect.json diff --git a/ct/espconnect.sh b/ct/espconnect.sh new file mode 100644 index 00000000..e60ebace --- /dev/null +++ b/ct/espconnect.sh @@ -0,0 +1,54 @@ +#!/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: John Lombardo +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://github.com/thelastoutpostworkshop/ESPConnect + +APP="ESPConnect" +var_tags="${var_tags:-iot;esp32;flash}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-512}" +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/espconnect ]]; then + msg_error "No ${APP} Installation Found!" + exit + fi + + if check_for_gh_release "espconnect" "thelastoutpostworkshop/ESPConnect"; then + msg_info "Stopping Nginx" + systemctl stop nginx + msg_ok "Stopped Nginx" + + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "espconnect" "thelastoutpostworkshop/ESPConnect" "prebuild" "latest" "/opt/espconnect" "dist.zip" + + 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}https://${IP}${CL}" diff --git a/ct/headers/espconnect b/ct/headers/espconnect new file mode 100644 index 00000000..b810db97 --- /dev/null +++ b/ct/headers/espconnect @@ -0,0 +1,5 @@ + __________ ____ ______ __ + / ____/ __ \/ __ \/ ____/___ ____ ____ ___ _____/ /_ + / __/ / /_/ / /_/ / / / __ \/ __ \/ __ \/ _ \/ ___/ __/ + / /___/ ____/ ____/ /___/ /_/ / / / / / / / __/ /__/ /_ +/_____/_/ /_/ \____/\____/_/ /_/_/ /_/\___/\___/\__/ diff --git a/install/espconnect-install.sh b/install/espconnect-install.sh new file mode 100644 index 00000000..54e0657b --- /dev/null +++ b/install/espconnect-install.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: John Lombardo +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE +# Source: https://github.com/thelastoutpostworkshop/ESPConnect + +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 \ + openssl +msg_ok "Installed Dependencies" + +fetch_and_deploy_gh_release "espconnect" "thelastoutpostworkshop/ESPConnect" "prebuild" "latest" "/opt/espconnect" "dist.zip" + +msg_info "Configuring Nginx" +mkdir -p /etc/ssl/private +$STD openssl req -x509 -nodes -newkey rsa:2048 -days 3650 \ + -keyout /etc/ssl/private/espconnect-selfsigned.key \ + -out /etc/ssl/certs/espconnect-selfsigned.crt \ + -subj "/CN=ESPConnect" + +cat <<'EOF' >/etc/nginx/sites-available/espconnect +server { + listen 80 default_server; + listen [::]:80 default_server; + + return 301 https://$host$request_uri; +} + +server { + listen 443 ssl default_server; + listen [::]:443 ssl default_server; + + ssl_certificate /etc/ssl/certs/espconnect-selfsigned.crt; + ssl_certificate_key /etc/ssl/private/espconnect-selfsigned.key; + ssl_protocols TLSv1.2 TLSv1.3; + + root /opt/espconnect; + index index.html; + + location / { + try_files $uri $uri/ /index.html; + } +} +EOF +ln -sf /etc/nginx/sites-available/espconnect /etc/nginx/sites-enabled/espconnect +rm -f /etc/nginx/sites-enabled/default +$STD nginx -t +systemctl enable -q --now nginx +msg_ok "Configured Nginx" + +motd_ssh +customize +cleanup_lxc diff --git a/json/espconnect.json b/json/espconnect.json new file mode 100644 index 00000000..48c7abef --- /dev/null +++ b/json/espconnect.json @@ -0,0 +1,44 @@ +{ + "name": "ESPConnect", + "slug": "espconnect", + "categories": [ + 16, + 20 + ], + "date_created": "2026-04-28", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 443, + "documentation": "https://github.com/thelastoutpostworkshop/ESPConnect", + "website": "https://github.com/thelastoutpostworkshop/ESPConnect", + "logo": "https://avatars.githubusercontent.com/u/127616157?s=200&v=4", + "description": "ESPConnect is a zero-installation web application that lets you explore, back up, and manage ESP32 devices from a browser.", + "install_methods": [ + { + "type": "default", + "script": "ct/espconnect.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 4, + "os": "Debian", + "version": "13" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "This installs and serves the static ESPConnect web build from the latest GitHub release.", + "type": "info" + }, + { + "text": "ESPConnect uses the browser Web Serial API, so the container serves HTTPS with a self-signed certificate; accept the certificate warning before using the app.", + "type": "warning" + } + ] +} From a295637aadb0f04063cfad9828165689abc676cf Mon Sep 17 00:00:00 2001 From: John Lombardo Date: Tue, 28 Apr 2026 17:07:44 +0800 Subject: [PATCH 02/10] fix: clarify ESPConnect header --- ct/headers/espconnect | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ct/headers/espconnect b/ct/headers/espconnect index b810db97..3d7235ff 100644 --- a/ct/headers/espconnect +++ b/ct/headers/espconnect @@ -1,5 +1,5 @@ - __________ ____ ______ __ - / ____/ __ \/ __ \/ ____/___ ____ ____ ___ _____/ /_ - / __/ / /_/ / /_/ / / / __ \/ __ \/ __ \/ _ \/ ___/ __/ - / /___/ ____/ ____/ /___/ /_/ / / / / / / / __/ /__/ /_ -/_____/_/ /_/ \____/\____/_/ /_/_/ /_/\___/\___/\__/ + _____ ____ ____ ____ __ +| ____/ ___|| _ \ / ___|___ _ __ _ __ ___ ___| |_ +| _| \___ \| |_) | | / _ \| '_ \| '_ \ / _ \/ __| __| +| |___ ___) | __/| |__| (_) | | | | | | | __/ (__| |_ +|_____|____/|_| \____\___/|_| |_|_| |_|\___|\___|\__| From abae4da5dface7e3c59ea280af65316b77bb4cb0 Mon Sep 17 00:00:00 2001 From: John Lombardo Date: Tue, 28 Apr 2026 17:10:13 +0800 Subject: [PATCH 03/10] style: italicize ESPConnect header --- ct/headers/espconnect | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ct/headers/espconnect b/ct/headers/espconnect index 3d7235ff..96dc44f2 100644 --- a/ct/headers/espconnect +++ b/ct/headers/espconnect @@ -1,5 +1,5 @@ - _____ ____ ____ ____ __ -| ____/ ___|| _ \ / ___|___ _ __ _ __ ___ ___| |_ -| _| \___ \| |_) | | / _ \| '_ \| '_ \ / _ \/ __| __| -| |___ ___) | __/| |__| (_) | | | | | | | __/ (__| |_ -|_____|____/|_| \____\___/|_| |_|_| |_|\___|\___|\__| + __________ ____ ______ __ + / ____/ ___// __ \/ ____/___ ____ ____ ___ _____/ /_ + / __/ \__ \/ /_/ / / / __ \/ __ \/ __ \/ _ \/ ___/ __/ + / /___ ___/ / ____/ /___/ /_/ / / / / / / / __/ /__/ /_ +/_____//____/_/ \____/\____/_/ /_/_/ /_/\___/\___/\__/ From a49f5249e30b4f9f1da8172d008e46eb0e8c41e4 Mon Sep 17 00:00:00 2001 From: John Lombardo Date: Tue, 28 Apr 2026 17:31:30 +0800 Subject: [PATCH 04/10] fix: restart nginx after ESPConnect config --- install/espconnect-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install/espconnect-install.sh b/install/espconnect-install.sh index 54e0657b..371c0d9e 100644 --- a/install/espconnect-install.sh +++ b/install/espconnect-install.sh @@ -55,7 +55,8 @@ EOF ln -sf /etc/nginx/sites-available/espconnect /etc/nginx/sites-enabled/espconnect rm -f /etc/nginx/sites-enabled/default $STD nginx -t -systemctl enable -q --now nginx +systemctl enable -q nginx +systemctl restart nginx msg_ok "Configured Nginx" motd_ssh From 57e212ef696c4e228fb70b252e6428e3b78abfde Mon Sep 17 00:00:00 2001 From: John Lombardo Date: Tue, 28 Apr 2026 17:32:45 +0800 Subject: [PATCH 05/10] fix: honor fork base URL for ESPConnect --- ct/espconnect.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ct/espconnect.sh b/ct/espconnect.sh index e60ebace..32ef1f7c 100644 --- a/ct/espconnect.sh +++ b/ct/espconnect.sh @@ -1,5 +1,6 @@ #!/usr/bin/env bash -source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main}" +source <(curl -fsSL "$COMMUNITY_SCRIPTS_URL/misc/build.func") # Copyright (c) 2021-2026 community-scripts ORG # Author: John Lombardo # License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE From abf2052dfd500a39e1085e7de59fbf9896da847d Mon Sep 17 00:00:00 2001 From: John Lombardo Date: Tue, 28 Apr 2026 17:41:37 +0800 Subject: [PATCH 06/10] test: default ESPConnect helper URL to fork --- ct/espconnect.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/espconnect.sh b/ct/espconnect.sh index 32ef1f7c..015cc8d5 100644 --- a/ct/espconnect.sh +++ b/ct/espconnect.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main}" +COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/programbo/ProxmoxVED/codex/add-espconnect}" source <(curl -fsSL "$COMMUNITY_SCRIPTS_URL/misc/build.func") # Copyright (c) 2021-2026 community-scripts ORG # Author: John Lombardo From b319e478a281e5d554bb78c675d703de0df20aa9 Mon Sep 17 00:00:00 2001 From: John Lombardo Date: Tue, 28 Apr 2026 20:09:29 +0800 Subject: [PATCH 07/10] chore: restore upstream helper URL --- ct/espconnect.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ct/espconnect.sh b/ct/espconnect.sh index 015cc8d5..32ef1f7c 100644 --- a/ct/espconnect.sh +++ b/ct/espconnect.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/programbo/ProxmoxVED/codex/add-espconnect}" +COMMUNITY_SCRIPTS_URL="${COMMUNITY_SCRIPTS_URL:-https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main}" source <(curl -fsSL "$COMMUNITY_SCRIPTS_URL/misc/build.func") # Copyright (c) 2021-2026 community-scripts ORG # Author: John Lombardo From 1ed6dc4f7d91f8df522707aa9334f74996359d72 Mon Sep 17 00:00:00 2001 From: John Lombardo Date: Tue, 28 Apr 2026 22:38:07 +0800 Subject: [PATCH 08/10] fix: restart nginx if ESPConnect update fails --- ct/espconnect.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ct/espconnect.sh b/ct/espconnect.sh index 32ef1f7c..b66e465e 100644 --- a/ct/espconnect.sh +++ b/ct/espconnect.sh @@ -35,7 +35,11 @@ function update_script() { systemctl stop nginx msg_ok "Stopped Nginx" - CLEAN_INSTALL=1 fetch_and_deploy_gh_release "espconnect" "thelastoutpostworkshop/ESPConnect" "prebuild" "latest" "/opt/espconnect" "dist.zip" + if ! CLEAN_INSTALL=1 fetch_and_deploy_gh_release "espconnect" "thelastoutpostworkshop/ESPConnect" "prebuild" "latest" "/opt/espconnect" "dist.zip"; then + msg_error "Failed to update ${APP}; restarting Nginx" + systemctl start nginx + exit 1 + fi msg_info "Starting Nginx" systemctl start nginx From 5b4abb2301efc3dbb093a50d22b11eaed74af857 Mon Sep 17 00:00:00 2001 From: John Lombardo Date: Wed, 29 Apr 2026 11:28:12 +0800 Subject: [PATCH 09/10] Remove unnecessary ESPConnect dependency --- install/espconnect-install.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/install/espconnect-install.sh b/install/espconnect-install.sh index 371c0d9e..6a4a21e2 100644 --- a/install/espconnect-install.sh +++ b/install/espconnect-install.sh @@ -14,9 +14,7 @@ network_check update_os msg_info "Installing Dependencies" -$STD apt install -y \ - nginx \ - openssl +$STD apt install -y nginx msg_ok "Installed Dependencies" fetch_and_deploy_gh_release "espconnect" "thelastoutpostworkshop/ESPConnect" "prebuild" "latest" "/opt/espconnect" "dist.zip" From 290dbd024539407f3000c1d33d576c0dbd9c0083 Mon Sep 17 00:00:00 2001 From: John Lombardo Date: Wed, 29 Apr 2026 12:40:00 +0800 Subject: [PATCH 10/10] fix: align ESPConnect update flow with maintainer guidance --- ct/espconnect.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ct/espconnect.sh b/ct/espconnect.sh index b66e465e..32ef1f7c 100644 --- a/ct/espconnect.sh +++ b/ct/espconnect.sh @@ -35,11 +35,7 @@ function update_script() { systemctl stop nginx msg_ok "Stopped Nginx" - if ! CLEAN_INSTALL=1 fetch_and_deploy_gh_release "espconnect" "thelastoutpostworkshop/ESPConnect" "prebuild" "latest" "/opt/espconnect" "dist.zip"; then - msg_error "Failed to update ${APP}; restarting Nginx" - systemctl start nginx - exit 1 - fi + CLEAN_INSTALL=1 fetch_and_deploy_gh_release "espconnect" "thelastoutpostworkshop/ESPConnect" "prebuild" "latest" "/opt/espconnect" "dist.zip" msg_info "Starting Nginx" systemctl start nginx