Was macht Chatwoot?
Übersicht
Chatwoot ist eine quelloffene Kundensupport-Plattform. Eine selbstgehostete Intercom-Alternative mit Live-Chat, gemeinsamem Postfach, Multi-Channel-Support (Website, E-Mail, WhatsApp, Telegram, Twitter) und Chatbots. Bei Selbsthostung vollständig kostenlos.
Anleitung
Schritt 1: Docker-Bereitstellung
# docker-compose.yml – Selbstgehostetes Chatwoot
services:
chatwoot:
image: chatwoot/chatwoot:latest
depends_on: [postgres, redis]
ports: ["3000:3000"]
environment:
RAILS_ENV: production
SECRET_KEY_BASE: your-secret-key-base
FRONTEND_URL: https://chat.example.com
POSTGRES_HOST: postgres
POSTGRES_USERNAME: chatwoot
POSTGRES_PASSWORD: chatwoot
REDIS_URL: redis://redis:6379
MAILER_SENDER_EMAIL: [email protected]
SMTP_ADDRESS: smtp.gmail.com
SMTP_PORT: 587
SMTP_USERNAME: [email protected]
SMTP_PASSWORD: app-password
command: bundle exec rails s -p 3000 -b 0.0.0.0
sidekiq:
image: chatwoot/chatwoot:latest
depends_on: [postgres, redis]
environment: *chatwoot-env
command: bundle exec sidekiq
postgres:
image: postgres:15
environment:
POSTGRES_DB: chatwoot
POSTGRES_USER: chatwoot
POSTGRES_PASSWORD: chatwoot
volumes: [pgdata:/var/lib/postgresql/data]
redis:
image: redis:7-alpine
volumes: [redisdata:/data]
volumes:
pgdata:
redisdata:
Schritt 2: Chat-Widget einbinden
<!-- Fügen Sie dies in Ihre Website ein -->
<script>
(function(d,t) {
var BASE_URL="https://chat.example.com";
var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=BASE_URL+"/packs/js/sdk.js";
g.defer = true;
g.async = true;
s.parentNode.insertBefore(g,s);
g.onload=function(){
window.chatwootSDK.run({
websiteToken: 'YOUR_WEBSITE_TOKEN',
baseUrl: BASE_URL
})
}
})(document,"script");
</script>
Schritt 3: API-Integration
// lib/chatwoot.ts – Kontakte und Konversationen über API erstellen
const CHATWOOT_URL = 'https://chat.example.com'
const CHATWOOT_TOKEN = process.env.CHATWOOT_API_TOKEN!
// Kontakt erstellen, wenn sich ein Benutzer anmeldet
await fetch(`${CHATWOOT_URL}/api/v1/accounts/1/contacts`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
api_access_token: CHATWOOT_TOKEN,
},
body: JSON.stringify({
name: 'Max Mustermann',
email: '[email protected]',
custom_attributes: { plan: 'pro', mrr: 49 },
}),
})
Richtlinien
- Selbst gehostet: vollständig kostenlos, unbegrenzte Agenten und Konversationen.
- Cloud: ab 19 $ pro Agent und Monat.
- Unterstützt WhatsApp Business, Telegram, Twitter, E-Mail und Website-Kanäle in einem Postfach.
- Nutzen Sie Webhooks, um Konversationen mit Ihrem CRM oder Ticketsystem zu synchronisieren.