What It Is
Open WebUI v0.12.0, a Docker container running on .223 at my home, providing a ChatGPT-style web interface: multiple sessions, long conversations, and file uploads are all supported. It does not include models itself; the models come from the API I configured—currently the official DeepSeek API, with two models: deepseek-flash and deepseek-v4-pro.
Why I Built It Myself
A third-party client adds an extra hop: "me → its servers → API," and long conversations can easily get stuck due to rate limiting. After self-hosting, it is a direct connection: "me → home .223 → API." Streaming rendering happens locally, and conversation history is stored on my own machine, so long conversations will not get stuck because of someone else's server-side rate limiting. This is the most practical value of this project.
Current Status
The public endpoint is https://chat.xiejun-server.top/, using a Let's Encrypt certificate with automatic renewal, accessible on both phone and computer; the LAN address http://192.168.50.223:3080/ works the same way. I use a dedicated subdomain instead of a subdirectory because its frontend assets all use absolute paths, and subdirectory deployment is not officially supported. "Add to Home Screen" on a phone gives a PWA, close to a native app experience. Registration is closed; there are only two accounts, mine and a family member's, each using their own Key, and it is running daily.
Features
- Docker 部署 Open WebUI v0.12.0,数据落在 /opt/open-webui/data,容器 restart unless-stopped
- 独立子域名加 NPM 反代,带 WebSocket 与 proxy_buffering off,流式输出不卡
- 已接入 DeepSeek 官方 API,两个模型实测流式对话与解题正常
- 自定义 PWA 清单与 Service Worker,安卓/iPhone 加到主屏幕即成 App
- 全局连接加模型访问授权,管理员与家人各用各的 Key
- 对外提供 OpenAI 兼容接口,可接第三方手机客户端
Stack: Docker · Open WebUI · Nginx (NPM) · frp · Let's Encrypt · SQLite · Python
I. Preparation
A Linux machine with Docker installed; a subdomain that resolves to the entry IP (I used the chat subdomain).
II. Pull the Image
Pulling 6.37 GB directly from ghcr.io is extremely slow, so use the Nanjing University mirror:
docker pull ghcr.nju.edu.cn/open-webui/open-webui:main
docker tag ghcr.nju.edu.cn/open-webui/open-webui:main ghcr.io/open-webui/open-webui:main
III. Start the Container
Put the environment variables into deploy.sh; the key ones are:
HF_ENDPOINT=https://hf-mirror.com # 容器内访问不了 huggingface,必须换镜像源
WEBUI_URL=https://chat.example.com
WEBUI_ADMIN_EMAIL=you@example.com
WEBUI_ADMIN_PASSWORD=<自己设一个强密码>
ENABLE_API_KEYS=True
Map port 3080:8080, mount the data volume at /opt/open-webui/data, and set the restart policy to unless-stopped. On first startup, an admin account is created automatically and registration is disabled, so you do not need to click register manually.
IV. Reverse Proxy
Create a proxy host in NPM and forward it to intranet-IP:3080. There are three key points: enable WebSocket, set proxy_buffering off (required for streaming output), and leave port 80 for ACME challenges and redirect to HTTPS. Do not try to mount it under a subdirectory such as /ai/; it will conflict with the main site's /static/ and /assets/.
V. Connect Models
After logging in, go to “Settings → Admin → Connections”, fill in the provider URL (e.g., https://api.deepseek.com/v1) and Key, and after saving, the models can be selected in the model list. Note that the API path has changed in v0.12.0; when writing scripts, use POST /openai/config/update.
VI. Verification
curl -s localhost:3080/api/version
docker logs --tail 50 open-webui
Then log in using the public address and send a long question to see whether streaming is smooth; this basically confirms that everything is fine.