Skip to content
View lm-webui's full-sized avatar

Block or report lm-webui

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
lm-webui/README.md

LM WebUI πŸ›‘οΈ

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.


πŸš€ Quick Start

One-Line Install (Recommended)

curl -fsSL https://raw.githubusercontent.com/lm-webui/lm-webui/main/install.sh | bash

This will install Python dependencies, create ~/.lmwebui/ for data and models, build the frontend, and start the service.

Open http://localhost:7070.

Manual / Development

# 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 dev

The web client runs on the configured Vite port and proxies API requests to the FastAPI backend on port 7070.


⚑ Core Features

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.

πŸ€— GGUF Runtime Highlights

  • 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

πŸ“– Documentation

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

</> Architecture Overview

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.

Data Flow

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()

πŸ”§ Development Commands

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 code

🚒 Deployment

Native service (recommended)

The 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 | bash

Data, models, and config live in ~/.lmwebui/ (override with LMWEBUI_HOME environment variable).

Docker (alternative)

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 --build

Open http://localhost:7070.

Persistence

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.


🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.


πŸ”— Links


Let's shape the future of local AI together πŸ€œπŸ€›

Popular repositories Loading

  1. lm-webui lm-webui Public

    Unified Local AI Interface & LLM Runtime (Support GGUF, Ollama, OpenAI, Gemini, etc.). Insearch of building sovereign AI system ✨

    TypeScript 3 1

  2. lmwebui lmwebui Public

    Multimodal LLM Interface & Orchestrator