Mục đích: Scripts to connect LM Studio (local LLM) with Open WebUI for a ChatGPT-like interface
Platform: Windows, Mac, Linux
Components: LM Studio + Open WebUI
LM Studio provides local LLM inference (run models like Llama, Mistral on your machine).
Open WebUI provides a beautiful ChatGPT-like web interface.
This repo contains connection scripts to bridge them together.
start_lmstudio_connection.bat- Windows batch scriptstart_lmstudio_connection.ps1- Windows PowerShell scriptstart_lmstudio_connection.sh- Mac/Linux shell scriptREADME_WINDOWS.md- Windows-specific setup guide
-
LM Studio installed and running
- Download: https://lmstudio.ai/
- Load a model (e.g., Llama 3, Mistral 7B)
- Start local server (default:
http://localhost:1234)
-
Open WebUI installed
- Docker method:
docker run -p 3000:8080 ghcr.io/open-webui/open-webui:main - Or install locally: https://github.com/open-webui/open-webui
- Docker method:
# Option 1: PowerShell (recommended)
.\start_lmstudio_connection.ps1
# Option 2: Batch file
.\start_lmstudio_connection.bat
chmod +x start_lmstudio_connection.sh
./start_lmstudio_connection.sh
After starting:
- LM Studio: http://localhost:1234 (LLM server)
- Open WebUI: http://localhost:3000 (Chat interface)
- Configure: In Open WebUI settings, set API endpoint to
http://localhost:1234/v1
- Port: 1234 (default)
- API Type: OpenAI-compatible
- CORS: Enable if needed
- Go to Settings → Connections
- Set "OpenAI API Base URL" to
http://localhost:1234/v1 - API Key: Not needed for local (use dummy key like
lm-studio)
Benefits:
- ✅ Privacy: All data stays local (no cloud)
- ✅ Free: No API costs
- ✅ Fast: No internet latency
- ✅ Offline: Works without internet
- ✅ Customizable: Use any model you want
Use Cases:
- Private coding assistant
- Sensitive document analysis
- Learning/experimenting with LLMs
- Offline work environments
- Check if model is loaded
- Verify server is running (green light in LM Studio)
- Test:
curl http://localhost:1234/v1/models
- Check API URL is exactly
http://localhost:1234/v1 - Disable CORS if needed in LM Studio settings
- Check firewall/antivirus not blocking
- Use smaller models (7B instead of 70B)
- Enable GPU acceleration in LM Studio
- Reduce context length
- LM Studio Docs: https://lmstudio.ai/docs
- Open WebUI Docs: https://docs.openwebui.com/
- Model Hub: https://huggingface.co/models
For coding:
- DeepSeek Coder 6.7B
- CodeLlama 7B/13B
- Phind CodeLlama 34B
For general chat:
- Llama 3 8B/70B
- Mistral 7B
- Mixtral 8x7B
Vietnamese support:
- Vistral 7B (Vietnamese-optimized)
- SeaLLM 7B (Southeast Asian languages)
Last Updated: 2025-10-13
Maintained By: Khogao
License: Private