Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix(docker): enable host.docker.internal on Linux for LM Studio

LearningCircuit17fe11f4aa14
diff --git a/docker-compose.yml b/docker-compose.yml
index e508d177d7..203f304cbb 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -23,6 +23,11 @@ services:
networks:
- ldr-network
+ # Enable host.docker.internal on Linux (already works on Mac/Windows)
+ # This allows containers to reach services on the host machine (e.g., LM Studio)
+ extra_hosts:
+ - "host.docker.internal:host-gateway"
+
ports:
- "5000:5000"
environment:
@@ -96,6 +101,15 @@ services:
# - LDR_LLM_OPENAI_ENDPOINT_URL=https://your-provider.com/v1
# - LDR_LLM_OPENAI_ENDPOINT_API_KEY=<your-api-key>
# - LDR_LLM_MODEL=<your-model-name>
+
+ # ============================================================================
+ # LM STUDIO (Running on Host Machine)
+ # If using LM Studio on your host, use host.docker.internal to reach it.
+ # The extra_hosts setting above enables this on Linux.
+ # ============================================================================
+ # - LDR_LLM_PROVIDER=lmstudio
+ # - LDR_LLM_LMSTUDIO_URL=http://host.docker.internal:1234
+ # - LDR_LLM_MODEL=<your-loaded-model-name>
volumes:
- ldr_data:/data
- ldr_scripts:/scripts
diff --git a/docs/faq.md b/docs/faq.md
index 96af1f0dd1..10ddc6dc14 100644
--- a/docs/faq.md
+++ b/docs/faq.md
@@ -244,9 +244,28 @@ Some search engines detect bot activity. Solutions:
### LM Studio connection issues
-For Docker on Mac (#365):
+LM Studio runs on your host machine, but Docker containers can't reach `localhost` (it refers to the container itself). If you see "Model 1" / "Model 2" instead of actual models, this is why.
+
+**Mac/Windows (Docker Desktop):**
- Use `http://host.docker.internal:1234` instead of `localhost:1234`
+**Linux (#1358):**
+
+Option A - Use your host's actual IP address:
+1. Find your IP: `hostname -I | awk '{print $1}'` (gives something like `192.168.1.xxx`)
+2. Set LM Studio URL to: `http://192.168.1.xxx:1234`
+3. Ensure LM Studio is listening on `0.0.0.0` (not just localhost)
+
+Option B - Enable `host.docker.internal` on Linux:
+Add to your docker-compose.yml:
+```yaml
+services:
+ local-deep-research:
+ extra_hosts:
+ - "host.docker.internal:host-gateway"
+```
+Then use `http://host.docker.internal:1234`
+
### Context length not respected
Known issue with Ollama (#500). Workaround: