flag92 flag92
Solutions

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
LobeChatDifyChatwootCloudflare Pages

What this combo solves#

Many brands don’t want a chat widget — they want a standalone, public AI portal:

  • chat.your-brand.com so 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#

Anonymous

Authenticated

Complex

Files / avatars

History

Visitor

LobeChat
chat.your-brand.com

Logged in?

Public KB
Dify app A

Private KB
Dify app B

LLM

Chatwoot human fallback

Object storage

PostgreSQL

When to pick this#

SituationFits?
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#

ComponentRoleResource
LobeChatFrontend, users, conversation mgmt1 container (or Vercel)
DifyKB, prompt, workflow1 node
ChatwootHuman fallback1 node (optional)
PostgreSQLLobeChat data1 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:

FieldValue
NameOur AI Assistant
API URLhttps://dify.example.com/v1
API Keyapp-xxxxxxxx
Modelsgpt-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:

complaint / refund / unanswerable

normal

User message

Dify Workflow

LLM intent classify

[HANDOFF] marker
+ create Chatwoot ticket

Normal reply

LobeChat shows
'Ticket XXX created
agent in 10 minutes'

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#

ModeMonthly
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:

MetricWidgetLobeChat subdomain
Monthly active chat users1,2004,500
Daily messages per user2.36.8
Mobile share18%47%
Support ticket countflatflat (AI absorbed the increment)

Key finding: a standalone subdomain drives 3×+ traffic vs widgets — users bookmark and share the link.

Pitfalls#

  1. LobeChat upgrades can break — community edition iterates fast; pilot in staging
  2. Dify compat — LobeChat needs streaming; Dify enables it by default
  3. History privacy — LobeChat stores conversations; provide a “clear” path in sensitive contexts
  4. OAuth callbacks — Vercel deploys need callback URLs registered with the provider
  5. License caveat — LobeChat allows self-hosting but restricts SaaS resale; don’t repackage and sell

Evolution#

StageAdd
1. BaseLobeChat + Dify
2. UsersOAuth + personalization
3. HandoffWire into Chatwoot
4. Multi-scenarioOne workspace per product line
5. AdvancedMCP tools, file upload, voice

Search

Press ⌘ K to open