From f5ddb345dd2bf6b582d82020e1a3778e758e740b Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 21 Mar 2026 02:54:20 +0000 Subject: [PATCH 1/2] Add Open WebUI MCP tool registration hint to Done output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After install, remind users to add the MCP SSE URL in Open WebUI's Admin → Settings → Tools panel (only shown when both MCP and WebUI are selected). https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx --- laptop_full_setup.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/laptop_full_setup.sh b/laptop_full_setup.sh index 45577ca..ddc04d8 100755 --- a/laptop_full_setup.sh +++ b/laptop_full_setup.sh @@ -1287,6 +1287,12 @@ if $INSTALL_AI; then fi echo "" if $INSTALL_AI; then + $SVC_MCP && $SVC_WEBUI && { + echo -e " ${YELLOW}Add MCP to Open WebUI (one-time):${NC}" + echo " Open WebUI → Admin → Settings → Tools → +" + echo " URL: http://$LOCAL_IP:8002/sse" + echo "" + } $SVC_MCP && { echo -e " ${YELLOW}Add MCP to Claude Code:${NC}"; echo " claude mcp add local http://$LOCAL_IP:8002/sse"; echo ""; } echo -e " ${YELLOW}Add API tokens to:${NC} $BASE/.env" $SVC_RAG && echo -e " ${YELLOW}Drop PDFs into:${NC} $BASE/papers/" From 90111df03f7d6a415d09697f290eefdc88efa906 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 21 Mar 2026 03:07:20 +0000 Subject: [PATCH 2/2] Fix Open WebUI FQDN auth and Kiwix 502 on cold start - Add WEBUI_URL to .env template and open-webui compose env so sessions work correctly when served behind Caddy (or any reverse proxy) - Fix Caddyfile.example to pass X-Forwarded-Proto/Host headers for Open WebUI - Wrap kiwix-serve command in a wait loop so the container stays healthy while ZIM files are still downloading (avoids 502 from Caddy) https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx --- laptop_full_setup.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/laptop_full_setup.sh b/laptop_full_setup.sh index ddc04d8..6046dd7 100755 --- a/laptop_full_setup.sh +++ b/laptop_full_setup.sh @@ -701,6 +701,11 @@ if [[ ! -f "$BASE/.env" ]]; then # Local AI Stack — API Tokens # Edit this file, then restart: bash $BASE/start.sh +# Open WebUI — set to your public FQDN when behind a reverse proxy (Caddy etc.) +# Without this, sessions/cookies break when accessed via domain name. +# Example: WEBUI_URL=https://webui.yourdomain.com +WEBUI_URL= + # Gitea — generate at http://$LOCAL_IP:3001/user/settings/applications GITEA_TOKEN=your-gitea-token-here @@ -777,6 +782,7 @@ ${OLLAMA_VOLUME_LINE} - RAG_WEB_SEARCH_ENGINE=searxng - SEARXNG_QUERY_URL=http://searxng:8080/search?q=&format=json - WEBUI_AUTH=false + - WEBUI_URL=${WEBUI_URL:-} depends_on: ollama: condition: service_healthy @@ -876,7 +882,8 @@ ${OLLAMA_VOLUME_LINE} - "0.0.0.0:8181:8080" volumes: - $KIWIX_DIR:/data - command: "*.zim" + entrypoint: ["sh", "-c"] + command: ["until ls /data/*.zim 2>/dev/null; do echo 'kiwix: waiting for ZIM files…'; sleep 60; done && exec kiwix-serve /data/*.zim"] # ── Gitea — Self-hosted Git ───────────────────────────────────────────────── gitea: @@ -1080,7 +1087,12 @@ write_if_new "$BASE/Caddyfile.example" << CADDY # Caddy2 reverse proxy — copy to your proxy machine # Replace yourdomain.com with your actual domain -webui.yourdomain.com { reverse_proxy $(hostname).local:3000 } +webui.yourdomain.com { + reverse_proxy $(hostname).local:3000 { + header_up X-Forwarded-Proto {scheme} + header_up X-Forwarded-Host {host} + } +} invokeai.yourdomain.com { reverse_proxy $(hostname).local:9090 } search.yourdomain.com { reverse_proxy $(hostname).local:8888 } git.yourdomain.com { reverse_proxy $(hostname).local:3001 }