LM-WebUI is a self-hosted private multimodal AI workspace with runtime manager. It combines multimodal chat, and image generation with multi-model (local and cloud models) compatible, file context, and provider orchestration in one interface β built for privacy-first and sovereign AI systems.
Run AI on your control
Built open-source for the community, developers, system integrators, and organizations that require local inference, reproducibility, and infrastructure-level control, lm-webui bridges the power of modern cloud LLM features with the integrity of local data ownership.
Run fully offline, integrate with cloud APIs when needed, and deploy across environments without sacrificing performance, privacy, or sovereignty.
curl -fsSL https://raw.githubusercontent.com/lm-webui/lm-webui/main/install.sh | bashThis will install Python dependencies, create ~/.lmwebui/ for data and models, build the frontend, and start the service.
Open http://localhost:7070.
# 1. Clone and set up backend
git clone https://github.com/lm-webui/lm-webui.git
cd lm-webui
cd backend
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
# 2. Start backend
uvicorn app.main:app --host 0.0.0.0 --port 7070
# 3. In another terminal, start frontend dev server
cd web
npm install
npm run devThe web client runs on the configured Vite port and proxies API requests to the FastAPI backend on port 7070.
| Feature | Capabilities |
|---|---|
| Authentication | Secure JWT-based authentication with httpOnly cookies, refresh tokens, session persistence, and role-based permissions. Remember-me toggle for session control. |
| Chat | Multi-provider chat through OpenAI, Gemini, Anthropic, DeepSeek, xAI, vLLM, Ollama, GGUF (llama.cpp), and MLX. Streaming responses, code rendering, Mermaid diagrams, conversation management, and search. |
| Image Generation | Dedicated Image Studio with prompt, size, quality, and seed controls. Gallery for browsing and reuse. Supports OpenAI, Google Gemini, and local ComfyUI runtimes. |
| Projects | Group related conversations with reusable custom system prompts. Ideal for recurring workflows like code review, research, or team-specific assistant configurations. |
| File Context | Upload files for conversation context. Image and document processing, upload status, file references with conversations, and citation display in chat. |
| GGUF Runtime | Built-in GGUF model lifecycle β download from HuggingFace, upload, validate, and serve models locally. Hardware-compatibility checking and local model registry. |
| MLX Runtime | Model discovery, download, and management for Apple Silicon. Seamless integration with the chat interface. |
| Hardware Detection | Automatic detection of CPU, CUDA, ROCm, and Apple Metal with dynamic memory and layer optimization for efficient local execution. |
| Runtime Manager | Detect, register, and test local runtimes including Ollama, GGUF (llama.cpp), MLX, vLLM, and ComfyUI through the admin interface. |
| Artifacts | Persistent structured document storage with versioning, project and conversation association, and soft-delete support. |
| Usage Analytics | Token and request tracking per provider and model. Admin dashboard with usage summaries, per-user breakdowns, and CSV export. |
| Self-Hosted Ready | Native Python service, zero external telemetry, offline-capable. Data in ~/.lmwebui/. Docker deployment also available. |
- Model Management: Upload and download GGUF models with progress tracking
- HuggingFace Integration: Direct download from HuggingFace repositories
- Hardware Compatibility: Automatic model validation for your system
- Local Registry: Manage and organize local GGUF models
- Seamless Integration: Use GGUF models directly in chat conversations
For detailed documentation, see the docs/ directory:
- Getting Started β Complete setup guide
- Features β Detailed feature documentation
- Architecture β Backend, frontend, provider, and runtime design
- Deployment β Production deployment guides
- CLI β Host CLI reference
- Contributing β How to contribute to the project
- Security β SecurityζΏηε practices
LM-WebUI is a React + FastAPI application with a modular monolith backend and a feature-based frontend.
lm-webui/
βββ backend/ # FastAPI application
β βββ app/
β β βββ routes/ # REST + WebSocket API endpoints
β β βββ providers/ # AI provider implementations (remote + local)
β β βββ orchestrator/ # Chat flow controller and streaming
β β βββ services/ # Models, images, files, audit, usage tracking
β β βββ chat/ # Session and message persistence
β β βββ database/ # SQLite schema, migrations, connection pool
β β βββ hardware/ # GPU/CPU detection and quantization
β β βββ memory/ # Context assembly and conversation summarization
β β βββ runtime/ # Runtime detection and metadata
β β βββ security/ # JWT authentication, encryption, RBAC
β βββ tests/ # Backend tests
βββ web/ # React 19 + TypeScript frontend
β βββ src/
β β βββ components/ # UI components (shadcn/ui + custom)
β β βββ features/ # Domain logic (chat, images, models, sessions)
β β βββ store/ # Zustand state management
β β βββ services/ # WebSocket client and API services
β β βββ utils/ # API client, providers, helpers
β βββ dist/ # Built frontend (served by backend in production)
βββ docs/ # Canonical documentation
The backend is a modular monolith. Providers implement a shared interface, the orchestrator coordinates chat execution, and the frontend consumes REST and WebSocket APIs.
Chat: User β WebSocket/REST β Orchestrator β Provider β LLM β Stream β UI
Images: Studio β POST /api/images/generate β Handler β API/ComfyUI β Save β Gallery
Models: Model Selector β GET /api/models/* β Model Registry β Provider.list_models()
npm run dev # Start both backend and web client
npm run build # Build the web client (output: web/dist/)
npm run typecheck # TypeScript checks
npm run test # Frontend tests
npm run lint # Frontend linting
npm run format # Format frontend codeThe install.sh script sets up a systemd (Linux) or launchd (macOS) service running on port 7070.
curl -fsSL https://raw.githubusercontent.com/lm-webui/lm-webui/main/install.sh | bashData, models, and config live in ~/.lmwebui/ (override with LMWEBUI_HOME environment variable).
For containerized server deployments, Docker Compose is available in the repository:
git clone https://github.com/lm-webui/lm-webui.git
cd lm-webui
docker compose up --buildOpen http://localhost:7070.
| Data | Location |
|---|---|
| SQLite / application data | Docker volume β /backend/data |
| Generated media / uploads | Docker volume β /backend/media |
| Local models | ./.lmwebui/models β /backend/models |
| Secrets | ./.lmwebui/secrets β /backend/.secrets |
See Host CLI and Deployment for setup, runtime endpoints, and troubleshooting.
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
This project is licensed under the MIT License β see the LICENSE file for details.
- Website: lmwebui.com
- GitHub: github.com/lm-webui/lm-webui
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Let's shape the future of local AI together π€π€
