Skip to content

Deployment guide, vaultwarden, smart router, network discovery#10

Merged
growlf merged 11 commits into
mainfrom
F/deployment-guide-vaultwarden-integration
May 11, 2026
Merged

Deployment guide, vaultwarden, smart router, network discovery#10
growlf merged 11 commits into
mainfrom
F/deployment-guide-vaultwarden-integration

Conversation

@growlf
Copy link
Copy Markdown
Owner

@growlf growlf commented May 11, 2026

Summary

  • VaultWarden integration — optional Bitwarden/BW-based secret management for .env placeholders
  • Smart Model Router — content-based routing between local Arc iGPU and cloud LLMs
  • Network discovery — discover-network.sh scans LAN + VPN subnets for Ollama hosts
  • Bugfix — generate-olla-config.sh regex stripped port from remote URLs (port consumed as priority)
  • Retriever — replaces Khoj + PostgreSQL with lightweight FastAPI + sqlite-vec + FTS5

growlf added 11 commits May 10, 2026 13:16
…ice + OpenCode

Remove open-webui, pipelines, open-terminal, khoj, and khoj-db.
Replace Khoj+PostgreSQL RAG with lightweight retriever service:
FastAPI + sqlite-vec + FTS5 hybrid search + watchdog live indexing.
Add discover-herd.sh for mDNS Ollama herd discovery.
Add .opencode/tools/vault-search.ts as OpenCode custom tool.
Update install.sh to install OpenCode + Bun and auto-configure.
Update all docs and scripts for simplified architecture.
… OpenCode Obsidian plugin

- rewrite resolve-vaultwarden.sh: API key auth, session support, resolves
  <vaultwarden:org/item> placeholders via bw CLI
- install.sh: prompts for Bitwarden setup (org ID, API creds), installs bw CLI,
  writes credentials + placeholders to .env, auto-installs OpenCode Obsidian
  plugin (growlf/opencode-obsidian fork) into .obsidian/plugins/
- start.sh: runs resolve-vaultwarden.sh before stack start
- .env.example: documents vaultwarden placeholder format
- .gitignore: add .obsidian/ (workspace config stays local)
- AGENTS.md + CHANGELOG.md: updated docs
… self-hosted URL, auto-generate LiteLLM key, fix docs
… fix tool URL

- delete proxy/example.olla.yaml (superseded by scripts/olla.yaml.template)
- delete stray .env.example.backup (gitignored now via .env.example.backup*)
- README.md: add resolve-vaultwarden.sh, router/ to project structure,
  add vaultwarden secret management section, update quick start
- docs/deployment-guide.md: fix clone URL, document Bitwarden prompt
  and plugin auto-install
- docs/retriever-guide.md: replace generic curl tool example with
  reference to .opencode/tools/vault-search.ts
- SECURITY.md: add Bitwarden/VaultWarden as recommended practice
- CONTRIBUTING.md: add note about not committing resolved .env
- .opencode/tools/vault-search.ts: fix Docker hostname → localhost
- router/smart-model-router.py: classify queries and auto-select best local
  model (qwen3.5:14b default, deepseek-r1:14b reasoning, qwen2.5-coder:14b
  code, gemma3:12b longform, gemma4:27b heavy, mistral-small3.2:24b tools,
  qwen2.5:14b diagnostics). Cloud model requests passthrough unchanged.
- docker-compose.yml: add router service (port 40115, depends on olla)
- install.sh: OpenCode config template points to router (:40115) instead of
  direct to Olla, includes all router models
- README.md + docs/deployment-guide.md: document router service and flow
- Architecture diagram: OpenCode -> Router :40115 -> Olla
- Service table: add router/ entry
- systemd description: include Router
Scans all reachable network interfaces (including VPN: WireGuard,
Tailscale, etc.) for Ollama, Olla, LiteLLM, and OpenCode services.
Verifies each found port via API probe, presents a table, prompts
which to add. Supports --dry-run and --apply flags.

- Uses nmap for fast scanning (falls back to nc)
- Detects Ollama models, Olla endpoints, LiteLLM model counts
- Writes OLLAMA_REMOTE_* entries to .env and regenerates Olla config
- AGENTS.md: add discover-network.sh to developer commands
Rewritten with:
- Numbered list of discovered services with type and details
- 'a <nums|all>' to add selected discovered services
- 'r <nums|all>' to remove existing OLLAMA_REMOTE_* entries
- Shows currently configured entries before prompting
- 'd' to finish (regenerates Olla config on changes)
- --apply adds all discovered, --dry-run previews
- Handles Ollama nodes only for auto-add; other services shown
  but noted as requiring manual config
Rewritten discover-network.sh with a practical methodology:

1. Seeds: user provides known host:port (e.g. 10.10.0.201:11434)
2. Verify: probe each seed's API (Ollama/Olla/LiteLLM/OpenCode)
3. Co-located: check all target ports on the seed host
4. Expand: scan the seed's /24 subnet for more services
5. Olla harvesting: if Olla discovered, show all its known endpoints
6. LAN auto-detect: scans non-VPN /24 subnets as fallback
7. Same-machine filtering: skips local IPs
8. Interactive add/remove / --apply / --dry-run

Tested: discovered 5 unique services across WireGuard VPN from
one seed (10.10.0.201:11434).
…tion

- Fix generate-olla-config.sh regex that stripped port from URLs
  (e.g. http://x:11434 became http://x with port as priority)
- Add Olla DNS endpoint resolution to discover-network.sh: queries
  Olla API for endpoint names, resolves via VPN DNS server, and
  adds verified Ollama hosts automatically
@growlf growlf merged commit a5f7c2b into main May 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant