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 environment variable names.

Daniel Petti05446cc600a4
diff --git a/Dockerfile b/Dockerfile
index a8bf8183ae..7ed140f8d4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -12,14 +12,6 @@ RUN playwright install
RUN mkdir -p /usr/local/lib/python3.13/site-packages/local_deep_research/defaults/
RUN echo "# Add your environment variables here" > /usr/local/lib/python3.13/site-packages/local_deep_research/defaults/.env.template
-# Environment variables for configuration
-ENV LDR_WEB_PORT=5000
-ENV LDR_LLM_PROVIDER="ollama"
-ENV LDR_LLM_MODEL="mistral"
-ENV LDR_LLM_TEMPERATURE=0.7
-ENV LDR_LLM_MAX_TOKENS=30000
-ENV LDR_LLM_OLLAMA_URL="http://localhost:11434"
-
# Create volume for persistent configuration
VOLUME /root/.config/local_deep_research
diff --git a/README.md b/README.md
index 0b46afe4dd..273d8356d4 100644
--- a/README.md
+++ b/README.md
@@ -86,7 +86,7 @@ python -m local_deep_research.main
- 1 iteration: Quick factual questions (~30 seconds)
- 2-3 iterations: Complex topics requiring deeper exploration (2-3 minutes)
- 3-5 iterations: Comprehensive research with follow-up investigation (5+ minutes)
-- **Choose Appropriate Models**:
+- **Choose Appropriate Models**:
- 12B-30B parameter models offer good balance of quality and speed
- For complex research, larger models may provide better synthesis
- **For Detailed Reports**: Expect multiple research cycles (one per section) and longer processing times
@@ -125,13 +125,13 @@ API keys can be configured directly through the web interface in the settings pa
```bash
# Cloud LLM providers - add to your .env file if not using the web UI
-ANTHROPIC_API_KEY=your-api-key-here # For Claude models
-OPENAI_API_KEY=your-openai-key-here # For GPT models
-OPENAI_ENDPOINT_API_KEY=your-key-here # For OpenRouter or similar services
+LDR_LLM_ANTHROPIC_API_KEY=your-api-key-here # For Claude models
+LDR_LLM_OPENAI_API_KEY=your-openai-key-here # For GPT models
+LDR_LLM_OPENAI_ENDPOINT_API_KEY=your-key-here # For OpenRouter or similar services
# Set your preferred provider and model
-LDR_LLM__PROVIDER=ollama # Options: ollama, openai, anthropic, etc.
-LDR_LLM__MODEL=gemma3:12b # Model name to use
+LDR_LLM_PROVIDER=ollama # Options: ollama, openai, anthropic, etc.
+LDR_LLM_MODEL=gemma3:12b # Model name to use
```
### Supported Providers
@@ -158,7 +158,7 @@ The system leverages multiple search engines to find the most relevant informati
- **`wikipedia`**: General knowledge, facts, and encyclopedic information
- **`arxiv`**: Scientific papers and academic research
- **`pubmed`**: Medical and biomedical research and journals
-- **`semantic_scholar`**: Academic literature across all fields
+- **`semantic_scholar`**: Academic literature across all fields
- **`github`**: Code repositories, documentation, and technical discussions
- **`searxng`**: Comprehensive web search via local SearXNG instance
- **`wayback`**: Historical web content from Internet Archive
diff --git a/docker-compose.yml b/docker-compose.yml
index 8916acf1a9..40e801f269 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -8,18 +8,18 @@ services:
network_mode: host # Best option for connecting to locally running Ollama
environment:
# LLM Configuration
- - LDR_LLM__PROVIDER=ollama
- - LDR_LLM__MODEL=mistral
- - LDR_LLM__TEMPERATURE=0.7
-
+ - LDR_LLM_PROVIDER=ollama
+ - LDR_LLM_MODEL=mistral
+ - LDR_LLM_TEMPERATURE=0.7
+
# Search Configuration
- - LDR_SEARCH__TOOL=auto
- - LDR_SEARCH__ITERATIONS=2
- - LDR_SEARCH__QUESTIONS_PER_ITERATION=2
-
+ - LDR_SEARCH_TOOL=auto
+ - LDR_SEARCH_ITERATIONS=2
+ - LDR_SEARCH_QUESTIONS_PER_ITERATION=2
+
# Web Interface Settings
- - LDR_WEB__PORT=5000
- - LDR_WEB__HOST=0.0.0.0
+ - LDR_WEB_PORT=5000
+ - LDR_WEB_HOST=0.0.0.0
volumes:
- ./data:/root/.config/local_deep_research
restart: unless-stopped
@@ -38,4 +38,4 @@ services:
# - driver: nvidia
# count: all
# capabilities: [gpu]
- # restart: unless-stopped
\ No newline at end of file
+ # restart: unless-stopped
diff --git a/src/local_deep_research/web/routes/settings_routes.py b/src/local_deep_research/web/routes/settings_routes.py
index 8ebb193bf2..109ba93b56 100644
--- a/src/local_deep_research/web/routes/settings_routes.py
+++ b/src/local_deep_research/web/routes/settings_routes.py
@@ -19,6 +19,7 @@ from flask import (
from flask_wtf.csrf import generate_csrf
from sqlalchemy.orm import Session
+from ...utilities.db_utils import get_db_setting
from ..database.models import Setting, SettingType
from ..services.settings_service import (
create_or_update_setting,
@@ -666,10 +667,7 @@ def api_get_available_models():
try:
current_app.logger.info("Attempting to connect to Ollama API")
- base_url = os.getenv(
- "OLLAMA_BASE_URL",
- "http://localhost:11434",
- )
+ base_url = get_db_setting("llm.ollama.url", "http://localhost:11434")
ollama_response = requests.get(f"{base_url}/api/tags", timeout=5)
current_app.logger.debug(
diff --git a/src/local_deep_research/web/static/js/components/settings.js b/src/local_deep_research/web/static/js/components/settings.js
index b3458bead0..24d9a4a977 100644
--- a/src/local_deep_research/web/static/js/components/settings.js
+++ b/src/local_deep_research/web/static/js/components/settings.js
@@ -53,7 +53,8 @@
class="custom-dropdown-input"
placeholder="${params.placeholder}"
autocomplete="off"
- aria-haspopup="listbox">
+ aria-haspopup="listbox"
+ ${params.disabled ? "disabled" : ""}>
<!-- Hidden input that will be included in form submission -->
<input type="hidden" name="${params.input_id}" id="${params.input_id}_hidden" value="">
<div class="custom-dropdown-list" id="${params.dropdown_id}-list"></div>
@@ -1475,7 +1476,8 @@
help_text: setting.description || null,
allow_custom: false,
show_refresh: true, // Set to true for provider
- data_setting_key: setting.key
+ data_setting_key: setting.key,
+ disabled: !setting.editable
};
inputElement = renderCustomDropdownHTML(dropdownParams);
} else if (setting.key === 'search.tool') {
@@ -1487,7 +1489,8 @@
help_text: setting.description || null,
allow_custom: false,
show_refresh: false, // No refresh for search tool
- data_setting_key: setting.key
+ data_setting_key: setting.key,
+ disabled: !setting.editable
};
inputElement = renderCustomDropdownHTML(dropdownParams);
} else if (setting.key === 'llm.model') { // ADD THIS ELSE IF
@@ -1501,7 +1504,8 @@
allow_custom: true, // Allow custom for model
show_refresh: true, // Show refresh for model
refresh_aria_label: "Refresh model list",
- data_setting_key: setting.key
+ data_setting_key: setting.key,
+ disabled: !setting.editable
};
inputElement = renderCustomDropdownHTML(dropdownParams);
} else {