Guides
Monitoring and Logging Chat Histories in Open WebUI
Track usage, export conversations, manage chat history storage, and set retention policies in Open WebUI for accountability and insights.

Monitoring and Logging Chat Histories in Open WebUI
As your Open WebUI instance grows from a personal tool to a team resource, understanding usage patterns becomes essential. This guide covers built-in monitoring, chat history export, storage management, and retention policies.
Why Monitor
| Reason | What it reveals |
|--------|----------------|
| Capacity planning | Model popularity, peak usage, storage growth |
| Cost allocation | Which users consume the most resources |
| Compliance | Audit trail of conversations and admin actions |
| Troubleshooting | Error rates, slow queries, model failures |
For user management, see How to Configure Open WebUI for Multi-User Access.
Built-In Statistics
Admin Panel -> Users: active sessions, total conversations, last login.
Admin Panel -> Models: conversation counts, latency, token estimates.
Admin Panel -> Documents: indexed counts, storage usage, upload stats.
Exporting Chat Histories
Users can export their own conversations from the chat interface.
For bulk admin export:
```bash
docker exec -it open-webui sqlite3 /app/backend/data/webui.db
.output /tmp/all_conversations.json
SELECT json_object('id', id, 'user_id', user_id, 'messages', messages) FROM conversation;
.exit
```
Managing Storage
| Usage pattern | Monthly storage per user |
|--------------|------------------------|
| Light (5 chats/day) | ~10 MB |
| Medium (20 chats/day) | ~50 MB |
| Heavy (50 chats/day) | ~200 MB |
Set retention policies:
```bash
-e WEBUI_HISTORY_RETENTION_DAYS=90
-e WEBUI_HISTORY_AUTO_CLEANUP=true
```
External Monitoring Integration
| Tool | Integration |
|------|------------|
| Prometheus | Custom metrics endpoint |
| Grafana | Dashboard from logs |
| Loki | Log aggregation from Docker |
| Uptime Kuma | HTTP health check on port 8080 |
For broader monitoring, see Monitor Self-Hosted AI Services with Uptime, Logs, and Metrics.
Monitoring Ollama
```bash
ollama ps # Check loaded models
ollama list # Model download status
```
Privacy Considerations
Users should know conversations may be logged. Set retention policies matching your privacy obligations. Consider PII redaction if logs are human-reviewed.
Conclusion
For personal use, the admin panel statistics suffice. For team deployments, add external monitoring with log aggregation and disk alerts.
FAQ
Can I export all users' conversations?
Yes, through direct database access.
Does Open WebUI log every prompt?
Yes. Conversations are stored in the SQLite database.
How do I delete a user's data?
Delete the account through admin panel, then remove conversation records from the database.
**Sources:**


