A modern web interface for running and managing large language models locally using Ollama. Features include chat history, file uploads, dark/light themes, and conversation management.
- RAM: 32GB recommended (minimum 16GB for smaller models)
- Storage: 20-25GB per model + 2GB for application
- OS: macOS, Linux, or Windows
- Node.js: Version 16 or higher
Download and install Ollama from the official website
macOS/Linux:
curl -fsSL https://ollama.com/install.sh | sh
Windows: Download the installer from the website and run it.
# Clone the repository
git clone git@github.com:MathieuDubart/Ollama-web-ui.git
cd ollama-server
# Install dependencies
npm install
Pull the models you want to use:
# Recommended models
ollama pull devstral # Code-focused model (22GB)
ollama pull llama3.1:8b # General purpose (4.7GB)
ollama pull codellama:7b # Code generation (3.8GB)
ollama pull mistral:7b # Efficient general model (4.1GB)
# List available models
ollama list
Browse more models at Ollama Library
ollama serve
Keep this terminal open - Ollama needs to run in the background.
In a new terminal:
npm start
Open your browser and navigate to:
http://localhost:3000
- Dark/light theme toggle
- Apple-inspired design
- Responsive layout for mobile/desktop
- Create multiple chat sessions
- Rename and organize conversations
- Auto-save chat history
- Export/import chat data
- Upload text files, code, JSON, CSV
- Automatic content analysis
- File preview in chat
- Supported formats:
.txt
,.md
,.js
,.py
,.html
,.css
,.json
,.xml
,.csv
- Live response generation
- Copy responses to clipboard
- Syntax highlighting for code blocks
- SQLite database for chat storage
- Automatic backups
- Import/export functionality
The server provides these REST endpoints:
GET /api/status # Check Ollama connection
GET /api/models # List available models
GET /api/chats # Get all chats
POST /api/chats # Save chat
PUT /api/chats/:id # Update chat
DELETE /api/chats/:id # Delete chat
POST /api/generate # Generate response
POST /api/upload # Upload files
Edit server.js
to customize:
const PORT = 3000; // Web interface port
const OLLAMA_URL = 'http://localhost:11434'; // Ollama service URL
Current limits:
- Max file size: 10MB
- Max files per upload: 10
- Supported MIME types: text/*, application/json, application/javascript
β "Unable to retrieve models"
# Check if Ollama is running
ollama list
# Restart Ollama service
ollama serve
β "Connection refused"
- Ensure Ollama is running on port 11434
- Check firewall settings
- Verify Ollama installation
β "Model not found"
# List installed models
ollama list
# Pull missing model
ollama pull <model-name>
β High memory usage
- Use smaller models (7B instead of 13B/70B)
- Close other applications
- Monitor with
ollama ps
β Slow responses
- Check available RAM
- Use SSD storage
- Ensure model fits in memory
- Model Selection: Start with smaller models (7B-8B parameters)
- Memory: Close unused applications before running large models
- Storage: Use SSD for better model loading times
- Context: Limit conversation history for faster responses
# Check Ollama logs
ollama logs
# Check server logs
npm start --verbose
# Test API directly
curl http://localhost:11434/api/tags
ollama-server/
βββ public/ # Frontend files
β βββ index.html # Main interface
β βββ style.css # Styles
β βββ script.js # Client logic
βββ core/ # Backend modules
β βββ database.js # SQLite database
βββ uploads/ # File storage
βββ server.js # Express server
βββ package.json # Dependencies
npm start # Start production server
npm run dev # Start with nodemon (development)
npm run copy-assets # Copy required assets
npm test # Run tests (if available)
- Frontend: Modify files in
public/
- Backend: Update
server.js
or add modules incore/
- Database: Extend schema in
core/database.js
This project is open source. Check the license file for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
For bug reports and feature requests, please open an issue on GitHub.