This is a companion tool for LibreChatConfigurator that simplifies setting up a local search stack for LibreChat.
Main Tool: LibreChatConfigurator - Configure all LibreChat settings (AI providers, OAuth, database, etc.)
This Tool: Local Search Stack Generator - Generate Docker containers for LibreChat's search capabilities when you need them
How They Work Together:
-
βοΈ Start with LibreChatConfigurator - Configure your LibreChat instance
- Set up AI providers (OpenAI, Anthropic, etc.)
- Configure authentication and OAuth
- Set up database and file storage
-
π When you need local search - Use this tool to generate the Docker stack
- Configure SearXNG, Jina Reader, and BGE Reranker services
- Download the generated package with Docker Compose files
- Run the installation script to deploy services
-
π Import configuration back - Auto-configure LibreChat's search settings
- In LibreChatConfigurator: Configuration β Import Merge JSON
- Or directly under Search section, use the import function
- Your local search stack is now connected to LibreChat!
Complete Workflow:
LibreChatConfigurator β Need Local Search? β Generate Stack β Run Install β Import JSON Config
(main tool) (this tool) (Docker) (back to main tool)
LibreChat's local search stack requires three Docker services working in harmony, but setting them up shouldn't require hours of Docker debugging.
Configuring LibreChat's web search feature (available in v0.7.9+) involves deploying SearXNG for meta-search, Jina Reader for web scraping, and BGE Reranker for ML-powered result ranking. This requires:
- Finding working Docker images (many community images are outdated or broken)
- Configuring complex networking between containers and LibreChat
- Setting up environment variables, ports, and resource limits correctly
- Writing Docker Compose files with health checks and restart policies
- Creating cross-platform installation scripts
- Manually configuring LibreChat's YAML to connect to these services
This tool solves that. Whether you're setting up LibreChat for your own use or deploying for others, you get:
- Working Docker Images - Pre-tested, community-maintained images (no broken containers)
- Docker Networking - Automatic shared network setup for LibreChat container communication
- 1-Click Installation - Complete package with Docker Compose, scripts for Windows/Mac/Linux
- Auto-Configuration - JSON config that imports directly into LibreChatConfigurator
- Resource Optimized - Pre-configured memory limits and health checks for stable operation
- Beginner-Friendly - No Docker or YAML knowledge required
Built by the community, for the community. As LibreChat adds new search features, this tool evolves with it. Missing a configuration option or want to add a new service? Contributions welcome!
Help make LibreChat's search accessible to everyone. Whether you're fixing a bug, improving Docker configurations, or enhancing the user experience, your contributions help more people deploy powerful local search without the setup headaches.
When you reach the search configuration step in LibreChatConfigurator, follow this workflow:
-
Open the online generator: https://librechatlocalwebsearchstack.netlify.app/
-
Configure your services (optional - defaults work great!)
- Adjust ports if needed
- Set resource limits for your system
- Click "Generate & Download"
-
Install the Docker stack
# Extract the downloaded ZIP unzip librechat-search-stack.zip cd librechat-search-stack # Run the installation script ./install_dockerimage.sh # Unix/Linux/Mac # OR install_dockerimage.bat # Windows
-
Import into LibreChatConfigurator
- Open the extracted folder and find
search-stack-config.json - In LibreChatConfigurator: Configuration β Import Merge JSON
- Or use the import function directly under the Search section
- Select the
search-stack-config.jsonfile - Done! Your search settings are auto-configured π
- Open the extracted folder and find
- β No installation required - runs entirely in your browser
- β Configure all search service settings with live preview
- β Download complete ZIP package with all configuration files
- β Export JSON configuration for LibreChatConfigurator import
- β 1-click installation scripts for all platforms
Prerequisites: Node.js 20+ is required
π¦ Install Node.js (click to expand)
Windows:
# Download and run installer from nodejs.org
# Or use winget:
winget install OpenJS.NodeJSmacOS:
# Using Homebrew (recommended):
brew install node
# Or download installer from nodejs.orgLinux (Ubuntu/Debian):
# Install Node.js 20:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejsVerify installation (all platforms):
node --version # Should show v20.x.x or higher
npm --version # Should show npm version# Clone the repository
git clone https://github.com/YOUR_USERNAME/librechat-search-stack.git
cd librechat-search-stack
# Install dependencies
npm install
# Start the development server
npm run dev
# Open http://localhost:5000 in your browserSame features as the online version, but running on your own machine.
For production deployment:
npm run build
npm startThe app will build and serve on port 5000 in production mode.
- 3 Essential Search Services: Configure SearXNG, Jina Reader (Firecrawl alternative), and BGE Reranker v2-m3
- Tested Docker Images: Uses working community-maintained images (no broken containers)
- Live Preview: See docker-compose.yml, .env, README.md, and install scripts in real-time
- JSON Export: Generate
search-stack-config.jsonthat imports directly into LibreChatConfigurator - Complete Package: Download ZIP with all 5 files ready for deployment
- 1-Click Installation: Bash script included for automatic Docker deployment
When you click "Generate & Download", you get a ZIP file containing:
| File | Description |
|---|---|
docker-compose.yml |
Complete Docker Compose configuration with all 3 services |
.env |
Pre-configured environment variables (ready to use, no editing needed) |
README.md |
Setup instructions and service documentation |
install_dockerimage.sh |
Unix/Linux/Mac installation script |
install_dockerimage.bat |
Windows installation script |
search-stack-config.json |
LibreChat search configuration - Import into LibreChatConfigurator |
test_services.py |
Python test script to verify all services are working |
| Service | Docker Image | Purpose | Default Port |
|---|---|---|---|
| SearXNG | searxng/searxng:latest |
Meta-search engine (Google, Bing, etc.) | 8080 |
| Jina Reader | ghcr.io/intergalacticalvariable/reader |
Web scraping & content extraction | 3000 |
| BGE Reranker | wkao/bge-reranker-v2-m3 |
ML-based result ranking | 8787 |
This tool generates configurations compatible with LibreChat v0.7.9+ (web search feature introduced in v0.7.9).
LibreChat's web search requires three components working together:
| Component | Role | This Tool Provides | LibreChat Config Mapping |
|---|---|---|---|
| Search Provider | Performs web searches | SearXNG (latest) |
searchProvider: "searxng" |
| Scraper | Extracts content from URLs | Jina Reader (Firecrawl-compatible) | scraperType: "firecrawl" |
| Reranker | ML-powered result ranking | BGE Reranker v2-m3 (Jina API-compatible) | rerankerType: "jina" |
SearXNG (Search Engine)
- Version: Latest stable release
- API Format: JSON output (
format=json) - Features: Privacy-focused meta-search aggregating 70+ search engines
- Network: Supports X-Forwarded-For headers for query logging
- Authentication: Configurable API key (default:
searxng-default-key-12345)
Jina Reader (Web Scraper / Firecrawl Alternative)
- Version: Latest from
ghcr.io/intergalacticalvariable/reader - Compatibility: Drop-in Firecrawl replacement
- API: RESTful endpoint at
http://service:3000/{url_to_crawl} - Features: Clean content extraction, JavaScript rendering
- Configuration: Timeout (30s default), max pages limit
- Authentication: Configurable API key (default:
jina-default-key-67890)
BGE Reranker v2-m3 (Result Ranking)
- Version: BAAI/bge-reranker-v2-m3 (278M parameters)
- Docker Image:
wkao/bge-reranker-v2-m3(community-maintained) - API Compatibility: Jina Reranker API-compatible endpoint
- Endpoint: POST
/api/v1/rerankwith JSON payload - Features: Multilingual support (100+ languages), optimized for RAG
- Performance: Batch processing up to 16 documents
- Authentication: Configurable API key (default:
reranker-default-key-abcde)
- Shared Network: All services join external Docker network (default:
librechat) - Container DNS: Services accessible via container names (
searxng:8080,jina-reader:3000,bge-reranker:8787) - LibreChat Integration: Import
search-stack-config.jsonto auto-configure container URLs - Host Access: Services also available via localhost URLs for testing
π LibreChat Web Search Documentation
Start with LibreChatConfigurator (the main configuration tool), then use this tool when you need local search capabilities.
-
π§ Configure LibreChat (LibreChatConfigurator)
- Run LibreChatConfigurator
- Set up AI providers (OpenAI, Anthropic, etc.)
- Configure authentication and OAuth
- Set up database and file storage
-
π Need Local Search? Use this tool to generate the Docker stack
- Open https://librechatlocalwebsearchstack.netlify.app/
- Configure service ports and resource limits (or use defaults)
- Click "Generate & Download" to get the ZIP package
- Extract and run the installation script (
./install_dockerimage.shor.bat)
-
π Import Search Config Back to LibreChatConfigurator
- In LibreChatConfigurator: Configuration β Import Merge JSON
- Or use the import function directly under the Search section
- Select
search-stack-config.jsonfrom the downloaded ZIP - Search settings auto-populate with your Docker service URLs
-
π Deploy Everything
- Docker search stack runs on your configured ports
- LibreChat connects to local search services via the imported config
- Complete AI-powered search infrastructure ready!
The search-stack-config.json uses LibreChat's official configuration structure:
{
"name": "Search Stack Configuration",
"configuration": {
"webSearch": {
"searchProvider": "searxng",
"searxngInstanceUrl": "http://localhost:8080",
"scraperType": "firecrawl",
"firecrawlApiUrl": "http://localhost:3000",
"rerankerType": "jina",
"jinaRerankerUrl": "http://localhost:8787",
"safeSearch": true
}
}
}Note: Ports match your Docker configuration. LibreChatConfigurator reads these values and configures LibreChat to connect to your local search stack.
For detailed service specifications, see LibreChat Compatibility above.
This project follows the same architecture as LibreChatConfigurator for consistency:
LibreChat Search Stack Generator
βββ client/ # React Frontend
β βββ src/
β β βββ components/ # Service Cards, Preview Panel
β β βββ lib/ # File Generation Logic
β β βββ pages/ # Home Page
β β βββ hooks/ # Configuration State
βββ server/ # Express Backend (minimal)
β βββ routes.ts # No API routes needed (client-side generation)
β βββ vite.ts # Development Server
βββ shared/ # Shared Types & Schemas
β βββ schema.ts # Service Configuration Schemas
βββ README.md # This file
- User Input β Service configuration forms (ports, resources)
- Client-Side Generation β JSZip creates files in browser
- File Download β User gets complete package with all files
- Docker Deployment β User runs installation script
- LibreChat Integration β Import JSON into LibreChatConfigurator
- Client-Side File Generation: All files generated in browser using JSZip (no backend needed)
- No Database Required: Simple configuration tool, no data persistence
- Reusable Components: Service cards and preview panels
- Type Safety: Zod schemas ensure valid configurations
- Frontend:
/client- React with TypeScript, Tailwind CSS, and shadcn/ui components - File Generation:
/client/src/lib/file-generator.ts- Docker Compose, env, JSON, and script generation - Shared:
/shared- Service configuration schemas - Presets:
/client/src/lib/presets.ts- Default service configurations
npm run dev # Start development server
npm run build # Production build
npm run start # Start production server- Update Schema: Add new service to
/shared/schema.ts - Add Preset: Configure defaults in
/client/src/lib/presets.ts - Update Generator: Modify
/client/src/lib/file-generator.tsto include new service - Add UI Card: Create service configuration card in
/client/src/components/ - Update JSON Export: Include new service settings in JSON configuration
We welcome contributions! This tool complements LibreChatConfigurator and should evolve together.
- Fork the repository
- Create a feature branch:
git checkout -b feature/new-service - Make your changes and test thoroughly
- Submit a pull request with a clear description
- New Search Services: Add support for additional search engines or scrapers
- Docker Image Updates: Keep track of working community images
- UI/UX Improvements: Enhance configuration experience
- Documentation: Improve setup guides and integration docs
- Testing: Add comprehensive test coverage
- LibreChatConfigurator - Complete LibreChat configuration tool
- LibreChat - Enhanced ChatGPT clone with multiple AI providers
This project is licensed under the MIT License - see the LICENSE file for details.
- LibreChat Team - For creating an amazing open-source AI chat platform
- Community Docker Maintainers - For keeping Jina Reader and BGE Reranker images working
- SearXNG Project - For the privacy-focused meta-search engine
- LibreChatConfigurator - For inspiring the configuration tool approach