Step-by-step guide to get lite-chat running locally.
| Tool | Version | Purpose |
|---|---|---|
| Node.js | 18+ | Frontend runtime |
| Python | 3.11+ | Backend runtime |
| Ollama | Latest | Local LLM server |
git clone https://github.com/MaharshPatelX/lite-chat.git
cd lite-chatInstall Ollama from ollama.com, then pull a model:
ollama pull qwen3.5:9bVerify it's running:
curl http://localhost:11434/api/tagsYou can use any model — the app lets you switch models from the UI.
cd backend
python -m venv .venv
# Activate virtual environment
# Linux/macOS:
source .venv/bin/activate
# Windows:
.venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reloadBackend runs at http://localhost:8000
Verify: curl http://localhost:8000/api/health
All settings are in backend/app/config.py:
| Setting | Default | Description |
|---|---|---|
OLLAMA_BASE_URL |
http://localhost:11434 |
Ollama server address |
DEFAULT_MODEL |
qwen3.5:9b |
Default model for new chats |
CONTEXT_FULL_EXCHANGES |
5 |
Number of recent exchanges sent in full |
SUMMARY_MAX_TOKENS |
500 |
Max tokens for conversation summaries |
DB_PATH |
data/chat.db |
SQLite database location |
cd frontend
npm install
npm run devFrontend runs at http://localhost:3000
Set NEXT_PUBLIC_API_URL in your environment to point to a different backend:
NEXT_PUBLIC_API_URL=http://localhost:8000 npm run devDefault is http://localhost:8000.
- Open http://localhost:3000
- Check the connection status indicator (top of page)
- Select a model from the dropdown
- Send a message
| Problem | Solution |
|---|---|
| "Backend offline" banner | Make sure uvicorn is running on port 8000 |
| "Model server offline" | Make sure Ollama is running: ollama serve |
| No models in dropdown | Pull a model: ollama pull llama3.2 |
| CORS errors | Backend has CORS configured for all origins by default |
| Database errors | Delete backend/data/chat.db and restart — it auto-recreates |
| Port conflict | Change uvicorn port: uvicorn app.main:app --port 8001 |