Run a private ChatGPT-style UI for local models with Open WebUI
说明与用途
Open WebUI 提供本地运行的 ChatGPT 风格界面,可对接本地模型。安装方式:pip 安装或 Docker 运行容器。拉取模型:ollama pull llama3,然后在界面中选择该模型。使用 open-webui 卷保存聊天记录,升级前备份卷,切勿直接对外暴露 3000 端口。
问题
A user wants a polished, self-hosted chat interface that talks to local models without sending prompts or data to a hosted service.
结果
A private ChatGPT-style interface is running locally, talking to a local Ollama model, with chat history stored in a named volume.
工作流
- Install Open WebUI via pip or Docker.
- Run the server or start the container.
- Pull a model with
ollama pull llama3. - Open http://localhost:3000 and create the first account as admin.
- Select the pulled model from the model dropdown in a new chat.
证据
You can get a ChatGPT-style interface that runs on your own machine and talks to local models.
docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
ollama pull llama3
Do not expose port 3000 to the internet without a reverse proxy and strong passwords.
- 记录日期: 2026-11-02T08:43:51.024Z