LobeChat + Dify — branded AI portal for customers
When you want AI support packaged as "our brand's ChatGPT" on a public subdomain, LobeChat is the most modern UI, with Dify behind it.
- Scenario
- Public branded AI chat portal — ChatGPT-like UX, custom KB, multilingual
- Monthly cost
- $30 - $150
- Difficulty
- Easy
What this combo solves#
Many brands don’t want a chat widget — they want a standalone, public AI portal:
chat.your-brand.comso customers can chat with the brand assistant like ChatGPT- Custom colors, logo, welcome message
- Strong mobile UX
- File upload / voice / multi-turn conversation
- Own knowledge base
The “Chatwoot widget” feels more “support-like” than a standalone AI product. LobeChat is the 2026 community recommendation for a branded AI chat frontend — ChatGPT-level UI, trivial deployment.
Architecture#
When to pick this#
| Situation | Fits? |
|---|---|
| Building a public consumer AI product | ✓ |
| “ChatGPT clone” UX expected | ✓ |
| Multilingual, mobile-first | ✓ |
| Mainly internal agent copilot | ✗ Use AnythingLLM |
| Mainly multi-channel support (WhatsApp / email) | ✗ Chatwoot-led |
Components#
| Component | Role | Resource |
|---|---|---|
| LobeChat | Frontend, users, conversation mgmt | 1 container (or Vercel) |
| Dify | KB, prompt, workflow | 1 node |
| Chatwoot | Human fallback | 1 node (optional) |
| PostgreSQL | LobeChat data | 1 container |
Deployment#
1. Deploy LobeChat#
Easiest: one-click on Vercel:
# Fork lobehub/lobe-chat, import into Vercel
# Env:
# OPENAI_API_KEY=app-xxxxx (this is actually a Dify app key)
# OPENAI_PROXY_URL=https://dify.example.com/v1
# DATABASE_URL=postgresql://...
# NEXTAUTH_SECRET=(random 32 bytes)
# AUTH_GOOGLE_ID=... (optional OAuth)
Or Docker:
docker run -d --name lobechat \
-p 3210:3210 \
-e DATABASE_URL=postgresql://... \
-e OPENAI_PROXY_URL=https://dify.example.com/v1 \
-e OPENAI_API_KEY=app-xxxxx \
lobehub/lobe-chat-database
2. Dify backend#
Create two chatbot apps in Dify:
- Public: anonymous-visitor KB (FAQs, product, pricing)
- Private: authenticated-user KB (orders, billing, personalization)
Copy each app’s API key (app-xxxxxxxx).
3. Configure LobeChat as “OpenAI-compatible”#
LobeChat console → Settings → AI Provider → Add OpenAI-compatible:
| Field | Value |
|---|---|
| Name | Our AI Assistant |
| API URL | https://dify.example.com/v1 |
| API Key | app-xxxxxxxx |
| Models | gpt-3.5-turbo (Dify ignores; uses your bot’s model) |
LobeChat speaks OpenAI protocol to Dify; Dify replies using its configured model.
4. Branding#
LobeChat supports:
- Logo, favicon
- Theme colors (CSS variables)
- Welcome message
- Hide the “LobeChat” wordmark (open source allows it)
For deeper changes, fork and edit public/ + src/styles/.
5. Human handoff (optional)#
LobeChat has no native handoff button — detect intent in Dify:
Tuning#
User tiers#
Anonymous vs authenticated users hit different KBs:
- Anonymous: public FAQ, product, pricing
- Authenticated: orders, billing, personalization
LobeChat supports Email / Google / GitHub OAuth.
Multilingual#
LobeChat ships with i18n following browser locale. Dify prompt:
Detect user language and reply in it.
Query the KB in English regardless.
See cross-border industry guide.
Mobile#
LobeChat PWA is excellent — “Add to Home Screen,” offline history, both Android and iOS.
Anti-abuse#
Public chat invites bot traffic:
- Front with Cloudflare Turnstile
- Per-app monthly token cap in Dify
- Per-IP rate limit (60 / min)
Cost#
| Mode | Monthly |
|---|---|
| Vercel + self-hosted Dify + LLM | $40-80 |
| All-Docker (4C/8G VPS) | $30-60 |
| High-traffic (CDN + multi-node) | $100-300 |
Outcomes#
A B2C SaaS, 6 weeks after launch:
| Metric | Widget | LobeChat subdomain |
|---|---|---|
| Monthly active chat users | 1,200 | 4,500 |
| Daily messages per user | 2.3 | 6.8 |
| Mobile share | 18% | 47% |
| Support ticket count | flat | flat (AI absorbed the increment) |
Key finding: a standalone subdomain drives 3×+ traffic vs widgets — users bookmark and share the link.
Pitfalls#
- LobeChat upgrades can break — community edition iterates fast; pilot in staging
- Dify compat — LobeChat needs streaming; Dify enables it by default
- History privacy — LobeChat stores conversations; provide a “clear” path in sensitive contexts
- OAuth callbacks — Vercel deploys need callback URLs registered with the provider
- License caveat — LobeChat allows self-hosting but restricts SaaS resale; don’t repackage and sell
Evolution#
| Stage | Add |
|---|---|
| 1. Base | LobeChat + Dify |
| 2. Users | OAuth + personalization |
| 3. Handoff | Wire into Chatwoot |
| 4. Multi-scenario | One workspace per product line |
| 5. Advanced | MCP tools, file upload, voice |