A curated collection of custom configurations, security enhancements, and documentation for running a personal LibreChat instance.
This repository contains only the custom modifications for a personal LibreChat deployment, without the full LibreChat codebase. Use these files to enhance your own LibreChat installation.
librechat.yaml
- Optimized multimodal configuration for RTX 4080 16GB VRAMrag.yml
- Vector database and RAG services setupdocker-compose.yml
- Custom Docker configuration
api/middleware/rateLimiter.js
- Comprehensive rate limitingapi/utils/pathValidator.js
- Path traversal protection- Security patches for CodeQL vulnerabilities
CLAUDE.md
- AI assistant guidance for the codebaseVECTOR_SETUP.md
- Complete vector database setup guideSECURITY_FIXES.md
- Security vulnerability analysis and fixesmock_ocr.py
- Mock OCR service for testing
-
Install LibreChat following the official documentation
-
Apply these configurations:
# Copy configuration files cp librechat.yaml /path/to/your/librechat/ cp rag.yml /path/to/your/librechat/ # Apply security middleware cp -r api/middleware/ /path/to/your/librechat/api/ cp -r api/utils/ /path/to/your/librechat/api/
-
Configure your environment:
- Update
.env
with your API keys - Modify
librechat.yaml
with your specific model endpoints - Set up vector database using
VECTOR_SETUP.md
- Update
- Multiple Ollama endpoints optimized for different use cases
- Multimodal support with various parameter sizes
- Memory-optimized for RTX 4080 16GB VRAM
- Rate limiting on all API endpoints
- Path traversal protection for file operations
- ReDoS vulnerability fixes in regex patterns
- Input validation and sanitization
- PostgreSQL + pgvector for semantic search
- File processing with multiple format support
- Memory management for conversation context
- qwen2.5vl:72b - Flagship multimodal (like GPT-4V)
- qwen2.5vl:7b - Balanced multimodal (like Claude 3)
- qwen2.5vl:3b - Fast multimodal (like Gemini Flash)
- qwen2.5-coder:32b - Advanced coding (like GitHub Copilot)
- gemma3:27b - Google's flagship model
- qwen2.5:3b - Ultra-fast text processing
- ✅ Rate limiting (auth: 5/15min, API: 100/15min, files: 50/15min)
- ✅ Path validation prevents directory traversal attacks
- ✅ ReDoS protection with regex length limits
- ✅ Input sanitization on all endpoints
- ✅ No sensitive data exposed in repository
- LibreChat base installation
- Docker and Docker Compose
- GPU with sufficient VRAM for your chosen models
Set these in your .env
file:
RAG_PORT=8000
RAG_API_URL=http://localhost:8000
POSTGRES_DB=mydatabase
POSTGRES_USER=myuser
POSTGRES_PASSWORD=mypassword
CLAUDE.md
- Complete project guidance for AI assistantsVECTOR_SETUP.md
- Step-by-step RAG setup instructionsSECURITY_FIXES.md
- Detailed security analysis and fixes
This is a personal configuration repository. Feel free to:
- Fork for your own modifications
- Submit issues for configuration questions
- Share improvements via pull requests
These configurations are provided as-is for educational and personal use. The underlying LibreChat project has its own license terms.
- LibreChat: github.com/danny-avila/LibreChat
- Official Docs: docs.librechat.ai
Note: This repository contains only configuration files and enhancements. You need a separate LibreChat installation to use these configurations.