Commit Graph
73 Commits
Author SHA1 Message Date
Claude 97561c0219 Add IP-Adapter install script and reference-image workflow docs
New script: comfyui-install-ipadapter.sh
- Installs cubiq/ComfyUI_IPAdapter_plus custom nodes
- Downloads CLIP Vision encoders and IP-Adapter models (SDXL/SD1.5)
- Optional --faceid flag for stronger face identity lock
- Skips already-downloaded files, pulls updates on re-run
- Prints wiring diagram and example prompts after install

README:
- Add "IP-Adapter: same face, different settings" section with
  task table, install commands, workflow guide, weight tuning
- Clarify IP-Adapter = ComfyUI direct (not from OWUI chat)
- Add both new scripts to the file listing table

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 21:11:06 +00:00
Claude 40a0b6c1bf Document multi-LoRA chaining and clarify no keyword triggers
- README: Add "Combining multiple LoRAs" section with wiring diagram,
  expand style management table with combo examples, clarify that
  LoRAs are baked into workflows with no chat keyword activation
- Script: Add multi-LoRA tip and clarify no-keyword behavior

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 20:16:54 +00:00
Claude 84afe5c571 Add comfyui-import-lora.sh and LoRA workflow docs
- New script: comfyui-import-lora.sh — copies .safetensors into
  ComfyUI's Docker volume and prints step-by-step instructions for
  wiring it into a workflow and exporting to Open WebUI
- README: Add "Using LoRAs with Open WebUI" section documenting the
  workflow-per-style pattern, multi-LoRA management, and architecture
  compatibility table

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 20:05:24 +00:00
Claude 3bd714960f Convert all setup prompts to whiptail, fix VRAM estimates, add model expectations
Setup script changes:
- All prompts now use whiptail dialogs with text fallback
- Q1b (SSH), Q2 (storage), Q3 (Kiwix), Q4b (firewall), Q5 (models),
  Q6 (download), final confirm all converted
- Model tier selection uses radiolist with recommended tier pre-selected
- Custom model entry uses inputbox with current defaults pre-filled
- Fix speed_label: now shows actual VRAM needed (file size + 2GB overhead)
  instead of misleading "fully in VRAM" for models that don't fit
- qwen3.5-35b-a3b MoE already in tier list (was there, now with accurate
  VRAM estimate shown)

README changes:
- Add "Realistic expectations by model size" table
- 35B MoE highlighted as sweet spot for small GPUs

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 19:39:39 +00:00
Claude b3985ea053 Add code-aware RAG server documentation as prominent section
The stack already has a code-aware RAG server that auto-indexes repos
and retrieves relevant code chunks during chat - but this wasn't
documented clearly enough. Added:

- Architecture diagram showing RAG server data flow
- Three methods to index repos (manual, API, Gitea webhook)
- What gets indexed (file types, AST parsing, smart chunking)
- Comparison table: RAG server vs Knowledge Collections vs Memories
- Updated Local AI vs Claude Code comparison to reflect code awareness

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 19:27:05 +00:00
Claude f48e186080 Add knowledge collection workflows and context window survival guide
- How to create knowledge collections from chat summaries (handoff workflow)
- RAG tuning settings for better retrieval quality
- Community functions for context management (summarization, clipping)
- How Open WebUI handles context overflow (truncation, not summarization)
- Honest comparison table: Local AI vs Claude Code tradeoffs

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 19:22:38 +00:00
Claude 38d103fcc1 Add memory, knowledge, function install, and model sizing docs
- Manual function/action installation without community signup
- Auto Memory setup with Ollama configuration
- Memory vs Knowledge collections comparison (context impact)
- Context window consumption analysis (memories are ~200 tokens fixed,
  conversation history is the real context hog)
- Project-scoped memory workarounds (Knowledge collections recommended)
- System prompt fix for models outputting code instead of natural language
- VRAM reality check table (model file size != inference VRAM needed)
- Qwen 9B does NOT fit in 6GB VRAM despite setup script claiming so

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 19:13:40 +00:00
Claude 8920a61156 Add ComfyUI service + image generation docs for Open WebUI integration
- Add ComfyUI as optional service in setup wizard (alongside InvokeAI)
- Configure Open WebUI env vars for ComfyUI integration when selected
  (ENABLE_IMAGE_GENERATION, IMAGE_GENERATION_ENGINE, COMFYUI_BASE_URL)
- Add ComfyUI docker service (ai-dock/comfyui, port 8188, GPU access)
- Add comprehensive image generation documentation to README:
  - ComfyUI + Open WebUI setup steps (model install, workflow export, node mapping)
  - AUTOMATIC1111 alternative setup
  - Environment variables reference table
  - VRAM considerations for simultaneous LLM + image gen
- Update all touchpoints: UFW rules, Caddyfile, start.sh URLs, volumes,
  compose services, summary output, directory creation
- Note: InvokeAI does NOT integrate with Open WebUI natively (no compatible API)
  ComfyUI is the recommended path for chat-integrated image generation

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 19:02:22 +00:00
Claude 7dac4c5e60 Add all 5 Stack Exchange sites + reorder ZIM list for dev focus
Setup wizard ZIM checklist now includes:
- Stack Overflow, Ask Ubuntu, Super User, Unix & Linux SE, Server Fault
  (was only Stack Overflow before)
- DevDocs and FreeCodeCamp moved up near the top
- List grouped: Dev & Sysadmin → Reference → Other
- Whiptail dialog height increased to fit all 22 items

Both whiptail (GUI) and plain terminal (fallback) lists match.
Download handlers added for all new SE sites.

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 18:40:27 +00:00
Claude 78aa44f323 Fix model selection UI: update descriptions and default to Qwen 3.5
- Option 2 description: "Qwen2.5 · Qwen2.5-Coder" → "Qwen 3.5 (Feb 2026)"
- Default choice: 1 (Western) → 2 (Performance/Qwen 3.5)
- Recommended tier logic: use TOTAL_VRAM and match actual tier names
  (4B/9B/35B/27B for Qwen 3.5, not old 7B/14B/22B/32B)
- Users with 6GB GPUs now see the 4B option marked "fast — fully in VRAM"
  instead of having to pick Custom and type model names manually

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 18:33:20 +00:00
Claude f7ef090d7c Add context awareness: token tracker + compaction + 6GB GPU tier
Context management for local models with limited windows:
- Context Tracker (community function): shows tokens used vs available,
  progress bar, percentage remaining — so you see the cliff coming
- Checkpoint Summarization Filter: auto-summarizes old messages when
  context fills up, like Claude's auto-compaction
- Both added as recommended post-install links in setup output
  (Open WebUI Functions install with one click from the UI)

6GB GPU tier (Quadro P3300, GTX 1060, etc.):
- Qwen 3.5 4B at Q4_K_M = ~2.5GB weights, leaves 3.5GB for KV cache
- With Q8 KV cache: ~32K usable context on 6GB
- Better than squeezing 9B into nothing — more context > slightly smarter

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 18:30:43 +00:00
Claude 67b9f593bd Resolve merge conflict: keep unified search, drop simpler kiwix_search
Main added a basic kiwix_search tool. Our branch already has a unified
search() that does everything kiwix_search did plus: DDG fallback,
freshness detection, structured results, and read_doc() for full articles.
Keep our version, keep the sync tool from our branch.

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 18:21:33 +00:00
Claude b5a749224d Unified search: Kiwix offline + DDG live with freshness detection
Replaced three separate tools (search_docs, web_search, search) with
a smart unified search() that:
- Always hits Kiwix first (instant, offline, no rate limit)
- Checks query for freshness keywords (latest, 2026, release, CVE, etc)
- If time-sensitive: also hits DDG, flags "prefer live results"
- If timeless (algorithms, docs, concepts): Kiwix only, skips web hit
- If Kiwix returns nothing: falls back to DDG automatically

Model sees both result sets with clear guidance on which to trust.
Keeps read_doc() for reading full Kiwix articles and web_search()
for explicit live-only queries when verifying offline currency.

130GB of ZIMs earn their keep on timeless topics (no rate limit,
instant, complete articles). DDG covers everything else.

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 18:17:51 +00:00
Claude ba1c7fd68d Add search layer: Kiwix offline docs + DuckDuckGo web search
The model can now search before it generates:

MCP tools (available via Open WebUI + Claude Code):
- search_docs(query): searches Kiwix ZIM files (Wikipedia, Stack Overflow,
  DevDocs, Arch Wiki) — instant, offline, no rate limits
- read_doc(path): reads full article content from Kiwix results
- web_search(query): DuckDuckGo search, no API key needed

Open WebUI native search:
- ENABLE_RAG_WEB_SEARCH=true + RAG_WEB_SEARCH_ENGINE=duckduckgo
- Switched from SearXNG (not in stack) to DDG (zero config)

Search priority: Kiwix first (offline, fast) → DDG fallback (live web)

All 3 setup scripts updated:
- duckduckgo-search added to mcp_requirements.txt
- KIWIX_URL=http://kiwix:80 added to MCP container env
- curl added to MCP container deps (for sync script)
- Open WebUI DDG search enabled by default

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 18:13:49 +00:00
Claude 8989815afa Wire in GPU optimizations and Gitea↔GitHub sync
Ollama config (all 3 setup scripts):
- Models updated from Qwen 2.5 → Qwen 3.5 series (Feb 2026)
- Auto-detect multi-GPU: TOTAL_VRAM = per-card × count
- KV cache quantization (q8_0) + flash attention enabled by default
- Context windows scaled by total VRAM (4K→128K)
- RAG server CHAT_MODEL now uses detected model variable

Gitea↔GitHub sync (new):
- gitea-github-sync.sh: bidirectional mirror with --init wizard
- Modes: --pull-only, --push-only, --list (dry run), --repo single
- Auto-discovers repos from both platforms via API
- Systemd timer: --install-timer [interval] for scheduled sync
- MCP tool: gitea_github_sync() for on-demand from Claude/WebUI
- Sync script mounted read-only into mcp-server container
- .env gets GITEA_URL variable for sync script
- curl added to mcp-server container deps

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 17:47:05 +00:00
Claude 0f57690692 Add single-card optimization guide — squeeze every byte from 16GB
Six stackable techniques that compound:
1. KV cache quantization (Q8_0 = 2x context, asymmetric K=Q8/V=Q4 = 2.6x)
2. Flash attention (free VRAM + speed, zero quality loss)
3. Host-memory prompt caching (--cram, use the server's 128-384GB RAM)
4. KV to system RAM (-nkvo, last resort, 5-20x slower)
5. Architecture selection (GQA + MoE = tiny KV footprint)
6. NVMe mmap for model loading (fast cold starts, not inference)

Stacked result: single card goes from ~50K to ~130K usable context
with the MoE model. Updated llama.cpp config with all flags.

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 17:36:06 +00:00
Claude 1d78957083 Add practical context windows section — usability not ceilings
VRAM must hold weights AND KV cache. What's left after weights is
your real context window. For a 10K-line project (~100-150K tokens):
- 1 card: 32-100K usable, file-by-file workflow
- 2 cards: 80-180K usable, whole-project-in-one-shot workflow
- This Opus session: 1M tokens (neither setup comes close)

Comparison table vs Claude Opus 1M session for perspective.
Keep Pro for the hard stuff, use local for the daily 80%.

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 17:22:47 +00:00
Claude f775b704ae Fix misleading single vs dual card comparison
Single card table was showing A- for 35B-A3B which undercut the case
for a second card. Restructured to lead with 16GB (start here) at
honest B+ ratings, then show what 32GB unlocks: dense 27B/32B models
that physically can't fit on 16GB and are genuinely A- quality.
The upgrade isn't about 262K context - it's about accessing better
models (27B dense > 35B MoE with 3B active params).

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 17:15:00 +00:00
Claude 6d6a47e028 Honest quality ratings: 35B-A3B is B+ not A-, add reality checks
The 35B-A3B MoE activates only 3B params per token - quality tracks
active params, making it more like a smart 7B than a true 35B. Revised
rating to B+ to A-. The 27B dense model is the real A- but needs 17GB
weights. Also notes: 262K is a VRAM ceiling not a quality guarantee,
Q4 quantization costs something, and context quality degrades at edges.
Practical high-quality context is more like 64-128K.

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 17:11:49 +00:00
Claude 209173e988 Fix: 262K context requires both cards unified, not simultaneous
Both GPUs must be dedicated to the LLM for 262K context window.
Image gen and LLM run one at a time (swap takes seconds).
Simultaneous only possible with smaller context (~64K on one card).

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 17:09:20 +00:00
Claude 5cfd8b2696 Reframe guide around Drop Max / Keep Pro strategy
The real use case: drop Claude Max ($100/mo), keep Pro ($20/mo), offload
bulk codebase work to local. Local handles the 80% (reading 10K-line
projects, routine fixes, boilerplate) with no rate limits. Pro handles
the hard 20% where Opus quality matters. GPU pays for itself in 13 months,
saves $1,596 over 3 years vs Max.

Also adds: NVLink speed reality check, image gen capabilities (SDXL/Flux
included at no extra cost), hardware longevity estimate (3-5 years),
and updated cost comparison tables.

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 17:07:01 +00:00
Claude 1e7b087a5d Add Dell R720/R730 installation guide for dual RTX 5000 + NVLink
Complete shopping list with Dell-specific part numbers:
- GPU power cables: 9H6FV / N08NH (~$10-15 each, need 2)
- GPU Riser 3 required for second GPU slot
- Low-profile heatsinks needed on R720 (usually pre-installed on R730)
- 2x 1100W PSUs mandatory, non-redundant mode for full wattage

Documents riser layout, NVLink bridge clearance in 2U, potential issues
(CPU TDP limits, "unsupported" GPU warning, blower noise), and
R720 vs R730 comparison. Total build cost ~$940-960 with Dell parts.

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 16:57:48 +00:00
Claude 7fa91e9816 Add Quadro RTX 5000 NVLink budget build guide and Qwen 3.5 models
Research and document the $850 budget build: 2x Quadro RTX 5000 (16GB each)
connected via NVLink for 32GB unified VRAM. With Qwen 3.5's Gated Delta
Network architecture (Feb 2026), this setup runs the 35B-A3B MoE model
with full 262K context in ~25GB — the best price-to-capability ratio
for local AI coding available.

Includes:
- Exact NVLink bridge part numbers (RTX 5000 uses unique smaller connector)
- Motherboard/PSU requirements and slot spacing guidance
- llama.cpp and Ollama multi-GPU configuration
- VRAM budget calculations for all Qwen 3.5 model sizes
- Phased build plan (start with 1 card at $400, add second later)
- Updated model table with full Qwen 3.5 family specs
- Cost comparison vs RTX 8000, RTX 3090, Claude Max, and API pricing

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 15:57:24 +00:00
Claude 8646dca2bb Fix RTX 8000 pricing: $2,000-2,900 realistic, not $750
The $750 listing was a single outlier. Actual market price for
Quadro RTX 8000 Passive 48GB is $2,000-2,900 on eBay. Updated
all recommendations and cost comparisons accordingly.

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 14:32:28 +00:00
Claude a14a45bce6 Major update: 48GB GPU analysis with RTX 8000 as best value
- Added full 48GB GPU market comparison (RTX 8000, A40, A6000, L40, RTX 6000 Ada)
- Quadro RTX 8000 Passive at $750-1,400 is 4-5x cheaper than alternatives
- Added RTX 8000 LLM benchmarks (34 t/s on 30B models at 8K context)
- Explained why 48GB >> 24GB for coding: context window is the bottleneck
- Added 2026 coding model landscape (Qwen3.5 27B, Qwen3-Coder, etc.)
- Revised recommendations: RTX 8000 as primary, dual P40 as budget alt
- Updated config notes for 48GB (32K context, higher quantization options)
- All prices verified from real listings as of March 22, 2026

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 14:29:58 +00:00
Claude a4e0ebc1bd Update GPU research with real March 2026 prices and 32B model analysis
- Corrected all GPU prices to actual eBay/Newegg listings as of March 22, 2026
- Added analysis of 32B coding models (Qwen2.5-Coder 32B, Qwen3.5 27B) on 24GB VRAM
- Added honest comparison of local LLM quality vs Claude Code
- Revised recommendations: dual P40 ($400-500) or P40+T4 ($400-550)
- Added configuration notes for 32B models, dual-GPU, and newer Qwen3 models
- RTX A4000 at $700+ is too expensive for this build

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 14:21:02 +00:00
Claude 14da24c02b Add GPU setup research for rack server AI workloads
Research comparing P40, A2000, T4, and M40 GPUs for LLM inference
and image generation in Dell R720/R730 rack servers. Includes
benchmarks, compatibility notes, pricing, and recommendations.

https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu
2026-03-22 14:12:46 +00:00
Claude d7a1db7c99 Add Aider as local Claude Code-equivalent coding assistant
- Add aider Docker service (paulgauthier/aider) with GUI on port 8080
  pointing at local ollama code model (auto-detected by VRAM tier)
- Add aider.sh CLI wrapper: cd into any git repo and run files through
  aider terminal mode against the same local model
- Add port 8080 to UFW firewall rules
- Surface Aider UI URL in start.sh output and final install summary

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-22 05:06:30 +00:00
Claude 83d8406d1a Add Ollama model auto-updater with systemd timer
ollama pull compares digests server-side so no download happens if
a model is already current. Timer runs monthly offset 2h from kiwix.
install.sh updated to handle all units generically.

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 23:09:18 +00:00
Claude 95ff8779db Replace cron suggestion with systemd timer for kiwix updates
User units in systemd/ with an install.sh that symlinks and enables.
Persistent=true means missed runs (machine off) catch up on next boot.
Logs via journald: journalctl --user -u kiwix-update.service

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 22:54:14 +00:00
Claude 199fd4069a Add kiwix_update.sh — auto-updater for ZIM files
Compares what's on disk against the mirror, downloads newer versions,
removes old ones, and restarts Kiwix if anything changed. Safe to cron.

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 20:05:27 +00:00
Claude 15eccd7e46 Add Stack Exchange ZIMs and wire Kiwix search into MCP server
- kiwix_download.sh: add Ask Ubuntu, Super User, Unix & Linux SE, Server Fault
- mcp_server.py: add kiwix_search tool — models can now query all offline ZIMs
- local-ai-setup.sh: pass KIWIX_URL env to MCP container, add kiwix dependency

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 19:58:57 +00:00
Claude f0eca342a7 fix kiwix 502: map host:8181 to container:80 (kiwix default port)
kiwix-serve binds to port 80 by default; the previous mapping to 8080
caused a 502. Change port mapping to 8181:80 and drop --port flag.

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 18:53:33 +00:00
Claude 9306fe312e fix kiwix 502: bind to port 8080 to match docker port mapping
kiwix-serve defaults to port 80 but the compose mapping is 8181:8080,
causing a 502. Add --port 8080 to the serve command.

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 18:46:40 +00:00
Claude 2912208f87 fix kiwix crash-loop when no ZIM files present
Replace subshell ls expansion (which produces no args when /data is empty)
with a conditional: serve ZIM files if they exist, otherwise sleep infinity
so the container stays up gracefully until ZIM files are added.

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 18:25:04 +00:00
Claude 799fc84875 remove SearXNG entirely; fix Kiwix cold-start
SearXNG:
- Dropped from both setup scripts and docker-compose (Google/Startpage
  block self-hosted instances by IP — not reliable enough to include)
- Removed all interactive safe-search and engine-selection prompts
- Removed Open WebUI RAG web-search env vars (ENABLE_RAG_WEB_SEARCH,
  SEARXNG_QUERY_URL, etc.)
- Removed port 8888 from UFW rules, start.sh URLs, done output, and
  the Caddyfile template
- Removed searxng/ from .gitignore (directory no longer created)
- configure-searxng-safesearch.sh kept in repo for optional manual use

Kiwix:
- Replace the blocking wait-loop (`until ls *.zim`) with a one-liner
  that passes whatever ZIM files exist (or none) directly to kiwix-serve,
  so the container starts immediately and shows an empty library page
  rather than hanging until ZIMs are downloaded

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 18:15:56 +00:00
Claude 5bfedf2cee consolidate everything into the repo folder; add compose management comments
All scripts now default BASE to their own directory (SCRIPT_DIR) instead
of ~/docker/ai-stack, so after a git clone the user never needs to change
folders — docker-compose.yml, .env, settings, and data dirs all live next
to the scripts.

configure-searxng-safesearch.sh and configure-storage.sh do the same for
standalone use (still honoured when called with BASE= from a parent script).

docker-compose.yml (generated by both setup scripts) gains a comment block
at the top listing the everyday docker compose commands:
  up -d / down / restart / stop / logs -f / pull / ps
so the file itself is the reference for managing containers.

.gitignore added to exclude generated files (docker-compose.yml, .env,
requirements.txt, helper scripts) and data directories (workspace/, kiwix/,
searxng/, gitea/, etc.) from git tracking.

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 15:38:20 +00:00
Claude a4f2adc50a fix mcp-server crash and Kiwix FQDN resolution
mcp_server.py / local-ai-setup.sh:
  FastMCP.get_asgi_app() was removed in mcp 1.x — replace with
  sse_app(), which returns the same Starlette ASGI app for SSE
  transport.  Fixes the crash loop the container was stuck in.

laptop_full_setup.sh Caddyfile:
  $(hostname).local requires mDNS (Avahi/Bonjour) to resolve from a
  proxy machine, which is often not available on all LAN clients.
  Replace every occurrence with $LOCAL_IP (the machine's LAN IP)
  so the generated Caddyfile.example works reliably regardless of
  mDNS support.

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 15:03:27 +00:00
Claude ed315999b1 Add LoRA import script and InvokeAI usage guide
Adds invokeai-import-lora.sh to copy LoRA .safetensors files directly
into InvokeAI's Docker model volume, bypassing the greyed-out UI upload
buttons. Also adds README documentation for LoRA usage and troubleshooting.

https://claude.ai/code/session_01RU7NQuTbA8S8NRoWojvhR5
2026-03-21 14:12:45 +00:00
Claude 0eac82e06e lock safesearch preference when level is moderate or strict
SearXNG's preferences.lock list prevents users from changing a setting
via the UI — it greys out the option. Without this, safe_search in
settings.yml was only a server default that users could still override
in their preferences page.

For moderate/strict, add:
  preferences:
    lock:
      - safesearch

For none, the lock is omitted so users can freely adjust it.

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 06:02:25 +00:00
Claude 07f8c83acb fix ENABLE_MAP unbound variable in reporting block
set +u was added around the ENGINE_BLOCK for-loops but the reporting
lines after ok "Updated settings.yml" still ran under set -u.
bash < 4.4 throws "unbound variable" for ${#ENABLE_MAP[@]} when the
associative array is empty (no --enable-engines argument was given).

Add set +u before the Disabled/Re-enabled info lines; it already covers
the ${#DISABLE_MAP[@]} reference at the end of the script.

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 05:56:42 +00:00
Claude b090b902c0 fix whiptail capture bug (2>/dev/null killed selections); add artic; fix ENABLE_MAP
Root cause of all 85 engines being disabled:
  `3>&1 1>&2 2>&3 2>/dev/null` — the trailing `2>/dev/null` overwrites FD2
  with /dev/null AFTER the FD swap, destroying the pipe that whiptail writes
  selections to. User selections were silently discarded every time. Remove it.

Also: if whiptail exits 0 but returns empty string (all items unchecked),
fall back to pre-checked defaults rather than disabling everything.

ENABLE_MAP: unbound variable (configure-searxng-safesearch.sh):
  bash < 4.4 treats `${!empty_assoc[@]}` as unbound under `set -u`.
  Wrap for loops and mark_disabled key-check with set +u / set -u.

Add artic (Art Institute of Chicago) to image engine menus.
Add yandex images (defaults OFF for moderate/strict, same as yandex).
Update _SX_AUTOFF to include "yandex images" so re-enabling it works.
Update configure script engine category lists to match expanded menus.

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 05:45:30 +00:00
Claude fc10cbf668 expand engine menus to ~80 engines across 6 categories; fix permissions
configure-searxng-safesearch.sh:
- Fix "Permission denied" when Docker created settings.yml as root:
  detect unwritable file, run sudo chown before writing

Engine menus (both setup scripts):
- Web:       +presearch, yep, wiby  (15 total)
- Images:    +startpage images, mojeek images, presearch images,
              pexels, pixabay images, pinterest, flickr (moved to ON — it
              supports safe-search), wikcommons.images, artstation, adobe stock
              (19 total); removed flickr/dailymotion from no-safe-search list
- Videos:    +brave videos, qwant videos, rumble, odysee, bitchute,
              media.ccc.de, wikcommons.videos  (17 total)
- News:      +startpage news, presearch news, mojeek news, reuters,
              yahoo news, wikinews, yep news  (12 total)
- Reference: NEW — wikipedia, wikidata, wolframalpha, ask, ddg definitions,
              encyclopsearch, wikibooks, wikiquote, wikisource, wikispecies,
              wikiversity, wikivoyage  (12 total)
- Science:   unchanged (5)

_sxst() updated: removed flickr/dailymotion from OFF list; added
  vimeo, bitchute, rumble, odysee, artstation, mojeek images/news

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 05:28:23 +00:00
Claude 9a329a754b replace ZIM text prompts with whiptail radiolist + checklist
- Radiolist first: Choose / All / Skip (ESC = skip)
- Checklist shows all 18 ZIMs with sizes; pre-checks any already
  downloaded ZIMs so re-runs don't re-select what you have
- ZIM_PICKS now stores space-separated names (wikipedia, stackoverflow,
  archlinux...) instead of numbers; dispatch updated to match
- Text fallback (no whiptail): same numbered list as before, converts
  input numbers to names before dispatch
- Summary shows count and names of selected ZIMs

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 05:18:54 +00:00
Claude e6eaec4bd4 replace category/engine text prompts with whiptail checklists
For both setup scripts and configure-searxng-safesearch.sh:
- Five whiptail checklist menus: Web · Images · Videos · News · Science
- Pre-populated ON/OFF based on the chosen safe-search level:
    none     → all engines ON
    moderate/strict → no-safe-search engines (mojeek, yandex, baidu, naver,
                      invidious, piped, peertube, sepiasearch, flickr,
                      imgur, deviantart, dailymotion, vimeo) default OFF
- User can toggle any engine independently before confirming
- ESC on any menu restores defaults for that category (keeps them unchanged)
- If user re-enables an auto-disabled engine, --enable-engines is passed
  to configure script to override the auto-disable
- Text fallback for non-interactive/headless installs
- Summary shows count of disabled engines instead of raw list

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 05:01:50 +00:00
Claude 9bcef89719 add interactive SearXNG safe-search prompts and category/engine controls
Setup (both scripts):
- Q6 asks safe-search level: none / moderate / strict
- Then asks which categories to disable: videos images news science social
- Then asks which engines to disable by name (duckduckgo, bing, etc.)
- Choices flow into SEARXNG_QUERY_URL &safesearch=N in docker-compose.yml
- SearXNG summary line added to laptop_full_setup.sh install plan

configure-searxng-safesearch.sh:
- Full rewrite: --disable-categories, --disable-engines, --enable-engines
- Category maps: videos / images / news / science / social engine lists
- --enable-engines overrides auto-disables (e.g. keep yandex on strict)
- Preserves existing secret key on update
- Creates settings.yml from scratch if missing (safe for setup use)
- Help flag (-h/--help)

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 04:49:50 +00:00
Claude bab3f113a2 add SearXNG safe-search script and improve OWUI search env vars
- New configure-searxng-safesearch.sh: set strict/moderate/none level,
  disable engines that can't enforce the chosen level (torrent sites,
  mojeek, baidu, yandex, nvidious/piped/peertube video frontends),
  updates &safesearch= in SEARXNG_QUERY_URL, and restarts searxng
- Add RAG_WEB_SEARCH_RESULT_COUNT=5 and RAG_WEB_SEARCH_CONCURRENT_REQUESTS=10
  to Open WebUI env in both setup scripts
- Add &safesearch=0 to SEARXNG_QUERY_URL so the script can find/replace it
- Sync ENABLE_TOOL_SERVERS=true into laptop_full_setup.sh (was missing)

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 04:38:03 +00:00
Claude cccf3afc4f Enable tool servers and auth in Open WebUI config
- WEBUI_AUTH=true: require login (auth was disabled by default)
- ENABLE_TOOL_SERVERS=true: unlocks the MCP/OpenAPI tool server UI

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 03:41:11 +00:00
Claude e5e357a37d Enable Open WebUI authentication (WEBUI_AUTH=true)
Disabling auth is unsafe when Open WebUI is exposed via a public FQDN.
Enabling it allows proper login/signup with credentials.

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 03:18:27 +00:00
Claude 90111df03f 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
2026-03-21 03:07:20 +00:00
Claude f5ddb345dd Add Open WebUI MCP tool registration hint to Done output
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
2026-03-21 02:54:20 +00:00
Claude 55cfa71464 Fix permission denied when --force overwrites root-owned config files
When Docker containers write config files (e.g. searxng/settings.yml),
those files end up owned by root. write_if_new now falls back to
sudo tee when the destination file exists but is not writable.

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 02:49:51 +00:00
Claude cd150a7911 Move ZIM selection into the wizard so all prompts complete before downloads start
- The "select which ZIMs" menu now fires during Q4 (upfront wizard),
  alongside the yes/select/no choice, not after docker/models start
- Each ZIM entry shows [downloaded] if a matching .zim already exists
  in KIWIX_DIR — skips re-downloading automatically via dl_zim check
- Download phase now uses the pre-captured ZIM_PICKS directly,
  no interactive prompt mid-install

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 02:21:54 +00:00
Claude 01ab7b8cc9 Number drive mount points for Ollama and Kiwix storage selection
Both [2/6] and [3/6] prompts now show detected mount points as a
numbered list. Type 0 for default/Docker volume, or 1/2/3 to pick a
drive directly. Typing a path manually still works as fallback.

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 02:11:39 +00:00
Claude 19346ba867 Use numbered input for size tier selection
The tier table now shows 1–4 numbers so you type 1/2/3/4 instead of
typing "14B" or "32B". Tier names are still accepted as fallback.
Recommended tier is shown as a number (e.g. [2] instead of [14B]).

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 02:08:21 +00:00
Claude 342c746b51 Revert "Replace whiptail menus with numbered text toggle selection"
This reverts commit c83439f576.
2026-03-21 02:06:55 +00:00
Claude c83439f576 Replace whiptail menus with numbered text toggle selection
All interactive prompts now use numbered toggles (type a number to
toggle on/off, Enter to confirm) instead of requiring whiptail.
Removed whiptail from apt dependencies in ubuntu-post-install.sh.

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 02:05:08 +00:00
Claude 47e91baf69 Fix start.sh and Done output to only show URLs for selected services
Build URL/path lines as variables before the heredoc so only
installed services appear in start.sh and the final Done summary.

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 01:48:22 +00:00
Claude 7e52271cb6 Replace component menu with per-service whiptail checklist
- Top-level menu now just: Full system setup / AI stack
- AI stack opens a second whiptail checklist (same style as
  ubuntu-post-install.sh) where each service is individually toggled:
    Ollama (always on, core)
    Open WebUI · RAG+ChromaDB · MCP Server · SearXNG
    Gitea · InvokeAI · Portainer · Kiwix
- Kiwix moved from top-level into the AI stack service list
- Existing containers auto-detected and pre-ticked ON
- MCP dependency on RAG enforced automatically with a warning
- COMPOSE_SERVICES, Done URLs, and summary all driven by per-service
  SVC_* flags so only selected services are started/shown
- Text toggle fallback for systems without whiptail

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 00:33:14 +00:00
Claude 7953ba9d99 Add model selection wizard with speed estimates and origin preference
Replace fixed model defaults with an interactive wizard:

Origin preference:
  1) Western-only      — Codestral (Mistral 🇫🇷) · Phi4 · Mistral 7B
  2) Performance-first — Qwen2.5 + Qwen2.5-Coder (top benchmarks)
  3) Mixed             — Western chat/reasoning, Qwen for coding only
  4) Custom            — free-form model names

Size tier table — speed estimated for the user's actual VRAM with no
hard limits (Ollama already uses all available VRAM via NUM_GPU=999):
  ✓ fast  — fully in VRAM
  ~ good  — fits with small overhang (~reading speed)
  ✗ slow  — partial CPU offload
  ✗ very slow — heavy CPU offload

Recommended tier shown as suggestion based on VRAM, user can override.
pull-models.sh now bakes in the chosen model names at install time.
REASON_MODEL replaces hardcoded deepseek-r1:14b; skipped if empty or
same as chat model.

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-21 00:23:11 +00:00
Claude 796a073c0a Add Docker/Compose always-check and SSH key import to AI stack setup
- Docker + Docker Compose check now runs on every invocation (not skipped
  on updates), installing if missing — ensures the stack can always run
- Added Docker Compose plugin install as fallback if compose is missing
- NVIDIA Container Toolkit check also always runs (not update-gated)
- Added SSH key import wizard question: import public keys from GitHub
  (gh:username) and/or Launchpad (lp:username) using ssh-import-id,
  so the machine is accessible over SSH immediately after setup

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-20 22:22:02 +00:00
Claude 45dfa58d93 Add top-level checklist menu to laptop_full_setup.sh
Replace the single-choice component menu with a multi-select checklist
(whiptail if available, text-based toggle fallback). Users now pick any
combination of:

  [*] Full system setup  — runs ubuntu-post-install.sh (Ubuntu apps,
                           security hardening, backups, Docker services)
  [*] AI stack           — Ollama, Open WebUI, RAG, MCP, Gitea, InvokeAI
  [*] Kiwix              — Offline Wikipedia, Stack Overflow, Arch Wiki

This makes laptop_full_setup.sh the single entry point — run it once,
toggle what you need (like Ubuntu Server's tasksel), leave overnight.

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-20 22:03:49 +00:00
Claude 92f5d886c7 Add leave-overnight wizard to laptop_full_setup.sh
Gather all setup choices upfront so users can answer questions once and
walk away. Changes:
- Setup wizard asks all questions before any installation begins:
  1. Component selection (AI stack / Kiwix / both)
  2. Ollama model storage (Docker volume or custom bind-mount path)
  3. Kiwix ZIM storage location (detect drives with enough free space)
  4. Firewall LAN subnet (auto-detected from current IP)
  5. Model downloads (confirm GPU-matched models, optional DeepSeek-R1)
  6. ZIM downloads (all / select / skip)
- Shows a summary and asks for confirmation before doing anything
- Ollama supports bind-mount to custom path (e.g. /mnt/ssd/ollama)
- Kiwix ZIM dir is configurable (separate large drive)
- Model pull runs unattended at end using upfront answer
- ZIM downloads integrated inline (no need to run kiwix_download.sh
  separately) — background wget with progress log

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-20 22:01:27 +00:00
Claude 5da719b1d0 Remove ChromaDB healthcheck, use service_started for depends_on
Healthcheck tools (wget/curl) are not reliably available in the
chromadb image. Removing the healthcheck and switching rag-server
depends_on to service_started avoids the unhealthy container error.

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-20 21:40:22 +00:00
Claude a815a3555e Add interactive component menu and fix ChromaDB healthcheck
- Show menu at startup to select: full stack, AI stack only, or Kiwix only
- Gate server files, SearXNG config, docker compose up, model pull,
  and summary URLs based on selection
- Fix ChromaDB healthcheck: wget → curl, /api/v2/ → /api/v1/heartbeat

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-20 21:37:58 +00:00
Claude 6ac4fc617e Fix NVIDIA Container Toolkit install URL
NVIDIA dropped the distro-specific repo URL in favour of a single
stable path. Also pass --yes to gpg --dearmor to avoid the interactive
overwrite prompt on re-runs.

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-20 21:26:10 +00:00
Claude 66c530035d Add README with full setup instructions and script reference
Documents workflow, service URLs, day-to-day commands, generated file
layout, first-run checklist, GPU/model tiers, and what each script does.

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-20 21:25:09 +00:00
Claude 07e8e93b4c Inline local-ai-setup.sh and kiwix_download.sh — truly self-contained
ubuntu-post-install.sh now embeds both companion scripts as single-quoted
heredocs written to mktemp files at runtime. No external files, git clone,
or internet access needed for [A] Local AI stack or [Z] Download ZIMs —
the single script is the only file required.

  local-ai-setup.sh  → embedded at lines 1084-1922 (LOCAL_AI_SETUP_EOF)
  kiwix_download.sh  → embedded at lines 2022-2221 (KIWIX_DOWNLOAD_EOF)

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-20 21:09:09 +00:00
Claude 1f37def86d Add Local AI stack and ZIM download options to ubuntu-post-install.sh
Adds two new top-level menu choices to the installation mode selector:

  [A] Local AI stack  — finds or clones local-ai-setup.sh, asks which
      mounted drive to use for Ollama models and Kiwix ZIM files, runs
      the installer as the actual user, then patches docker-compose.yml
      for alternate storage if selected.

  [Z] Download ZIMs   — finds or clones kiwix_download.sh, shows
      mounted drives, optionally redirects the download via KIWIX_DIR,
      then runs the downloader as the actual user in the background.

Both functions locate their scripts alongside ubuntu-post-install.sh
first, then ~/local-ai/, then fall back to cloning outis1one/local-ai.

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-20 21:09:09 +00:00
Claude b2946a1c24 Add configure-storage.sh — interactive drive/folder setup for ZIM and models
Scans mounted drives, shows size/free space, prompts user to assign drives
for Kiwix ZIM files and Ollama model storage, then patches docker-compose.yml
in place with a backup.

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-20 19:22:24 +00:00
Claude 8a1ac05f1e Add single self-contained local-ai-setup.sh
Merges all components into one script — no separate server files needed.
Embeds server.py (RAG) and mcp_server.py (MCP) as inline heredocs.

- Auto-detects VRAM and sets models + context window accordingly:
  6GB  → 7B models, 8k ctx
  8GB+ → 14B chat + 7B code, 16k ctx
  16GB → 14B models, 32k ctx (V100/A100 friendly)
- New install or update (detects existing compose)
- --force flag to overwrite config files
- --no-pull to skip model download prompt
- Adds fetch_url tool to MCP server
- Optional DeepSeek-R1:14b pull for reasoning tasks

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-20 15:14:10 +00:00
Claude 0f6d09db12 Refactor setup: new/update detection, split Python servers, add MCP server
- laptop_full_setup.sh now handles both fresh install and updates cleanly
  (detects existing install, --force flag to overwrite config files)
- server.py: standalone RAG server with AST-aware code chunking (Python),
  pattern-split for JS/TS/Go, /ingest/repo and /webhook/gitea|github endpoints
- mcp_server.py: new MCP server (port 8002/SSE) with Claude Code-equivalent
  tools: bash, file ops, ripgrep search, git ops, Gitea API, GitHub API,
  RAG repo ingest
- docker-compose: adds mcp-server service, workspace volume, env_file for tokens
- .env preserved on update (tokens never overwritten)
- GPU: OLLAMA_NUM_GPU=999 auto-adapts to any VRAM size (no hard-coded 6GB)
- ZIM downloads remain in kiwix_download.sh (separate, large files)

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-20 12:50:59 +00:00
Claude 8a1780b179 Remove obsolete update_script.sh
Prep for full rewrite with MCP server, enhanced RAG, and Claude Code parity.

https://claude.ai/code/session_012gDnantBmFTWZGCiKyjazx
2026-03-20 11:05:25 +00:00