Chatwoot is an open-source customer engagement platform that provides businesses with tools for live chat, customer support, and messaging.

It allows businesses to communicate with their customers through various channels, including website chat, social media messaging, and email, all from a unified platform.

The ChatWoot Project

Why ChatWoot?

  • Unified Inbox:

    • Chatwoot offers a unified inbox where businesses can manage conversations from different channels in one place. This includes website chat, Facebook Messenger, Twitter Direct Messages, WhatsApp, and more. 📬
    • With the unified inbox, agents can efficiently handle customer queries without switching between multiple platforms, leading to improved productivity and customer satisfaction.
  • Live Chat:

    • Businesses can embed a live chat widget on their website, allowing visitors to initiate conversations in real-time. Agents can respond to these messages directly from the Chatwoot dashboard. 💬
    • The live chat feature enables businesses to provide immediate assistance to website visitors, resulting in higher engagement and conversion rates.
And not only…👇
  • Multi-channel Support:

    • Chatwoot supports multiple communication channels, enabling businesses to engage with customers wherever they are. This includes popular messaging platforms like Facebook Messenger, WhatsApp, Twitter, and SMS. 📱
    • By leveraging multi-channel support, businesses can reach customers on their preferred platforms, enhancing accessibility and communication effectiveness.
  • Automation:

    • Chatwoot provides automation features such as chatbots and canned responses to streamline customer interactions and provide timely responses. 🤖
    • Automation helps businesses handle routine inquiries efficiently, freeing up agents’ time to focus on more complex customer issues and strategic tasks.
  • Integration:

    • Chatwoot can be integrated with other business tools and platforms, such as CRM systems, helpdesk software, and analytics tools, to create a seamless customer support workflow. 🔗
    • Integration with third-party tools allows businesses to centralize customer data and streamline processes, leading to enhanced collaboration and insights.

SelfHosting ChatWoot

ChatWoot with Docker

We will use the ChatWoot Docker Image.

Pre-Requisites - Get Docker 🐋

Important step and quite recommended for any SelfHosting Project - Get Docker Installed

It will be one command, this one, if you are in Linux:

apt-get update && sudo apt-get upgrade && curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh && docker version

Just follow the following steps:

  • Download the following configurations files:
# Download the env file template
wget -O .env https://raw.githubusercontent.com/chatwoot/chatwoot/develop/.env.example
# Download the Docker compose template
wget -O docker-compose.yaml https://raw.githubusercontent.com/chatwoot/chatwoot/develop/docker-compose.production.yaml
  • Adjust the .env file and docker-compose.yml
    • Add Passwords for Postres and Redis
  • Execute the following commands to deploy locally.
#add redit and postg pass
docker compose run --rm rails bundle exec rails db:chatwoot_prepare
docker compose up -d

Now you will have ChatWoot available at: localhost:3000 - the port you picked in .yml

ChatWoot with Cloudflare Tunnels

If you want to expose Chatwoot safely to the internet - You can use Chatwoot together with Cloudflare Tunnels

Make sure to have Cloudflare Tunnel container running - Then just add this to the docker-compose.yml

Check how to expose ChatWoot with Cloudflare 🔥
version: '3'

services:
  base: &base
    image: chatwoot/chatwoot:latest
    env_file: .env ## Change this file for customized env variables
    volumes:
      - /data/storage:/app/storage
    networks: #ADD THIS
      - chatwoot_network

  rails:
    <<: *base
    depends_on:
      - postgres
      - redis
    ports:
      - '127.0.0.1:3000:3000'
    environment:
      - NODE_ENV=production
      - RAILS_ENV=production
      - INSTALLATION_ENV=docker
    entrypoint: docker/entrypoints/rails.sh
    command: ['bundle', 'exec', 'rails', 's', '-p', '3000', '-b', '0.0.0.0']
    networks: #ADD THIS
      - chatwoot_network
      - cloudflare_tunnel

  sidekiq:
    <<: *base
    depends_on:
      - postgres
      - redis
    environment:
      - NODE_ENV=production
      - RAILS_ENV=production
      - INSTALLATION_ENV=docker
    command: ['bundle', 'exec', 'sidekiq', '-C', 'config/sidekiq.yml']
    networks: #ADD THIS
      - chatwoot_network

  postgres:
    image: postgres:12
    restart: always
    ports:
      - '127.0.0.1:5432:5432'
    volumes:
      - /data/postgres:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=chatwoot
      - POSTGRES_USER=postgres
      # Please provide your own password.
      - POSTGRES_PASSWORD=tecomeco
    networks: #ADD THIS
      - chatwoot_network

  redis:
    image: redis:alpine
    restart: always
    command: ["sh", "-c", "redis-server --requirepass \"$REDIS_PASSWORD\""]
    env_file: .env
    volumes:
      - /data/redis:/data
    ports:
      - '127.0.0.1:6379:6379'
    networks: #ADD THIS
      - chatwoot_network

networks: #ADD THIS to make the magic happen
  chatwoot_network:
  cloudflare_tunnel:
    external: true

ChatWoot with AI

Conclusions

We have seen how to use Chatwoot with Docker (Officially supported for x86).

ChatWoot ARM64

If you want to SelfHost ChatWoot in a SBC like the raspberry, you will need the ARM64 IMAGE.

How to SelfHost ChatWoot in ARM64 with Docker ⏬
docker pull amoxt/chatwoot-arm:latest

If you haven’t done it in a while and are missing space - try: docker builder prune to remove cache

git clone https://github.com/chatwoot/chatwoot.git
cd chatwoot

Once completed:

make docker

FAQ

How to Configure Cloudflare Tunnel with Docker

Check this guide if you are interested to know how to safely deploy services through Cloudflare Zero Trust Tunnels.

What is a Customer Engagement Platform?

  • Focuses on facilitating interactions and engagement with customers across various touchpoints, channels, and stages of the customer journey.
  • Provides tools for communication, support, and collaboration to enable businesses to interact with customers in real-time and nurture relationships.
  • Offers features such as live chat, social media messaging, email marketing, customer support ticketing, and omnichannel communication.
  • Aims to enhance customer satisfaction, retention, and loyalty by providing personalized and responsive interactions.
Similar, but not same as a CRM 👈
  • Focuses on managing and organizing customer data, interactions, and relationships to improve sales, marketing, and customer service efforts.
  • Centralizes customer information, including contact details, communication history, purchase history, and preferences, in a unified database or platform.
  • Provides features for lead management, sales pipeline tracking, contact management, and customer segmentation.
  • Enables businesses to analyze customer data, track sales opportunities, forecast revenue, and automate sales and marketing processes.
  • Typically used by sales teams to manage customer interactions, track leads, and optimize sales efforts.

F/OSS Alternatives to ChatWoot

Open-source customer engagement. Automate transactional and marketing messages across email, SMS, mobile push, WhatsApp, Slack, and more 📨

TypeBot ⏬

💬 Typebot is a powerful chatbot builder that you can self-host.

BotPress ⏬

BotPress, The open-source hub to build & deploy GPT/LLM Agents ⚡️

AI ChatBots with RAG - LangFlow ⏬

⛓️ Langflow is a visual framework for building multi-agent and RAG applications. It’s open-source, Python-powered, fully customizable, model and vector store agnostic.

python -m pip install langflow -U 
#pip install langflow

Recommend it to use it with a clean Python Venv:

python3 -m venv langflow_venv #create the venv | python3 if you are on linux

langflow_venv\Scripts\activate #activate venv (windows)
source langflow_venv/bin/activate #(linux)

conda create -n langflow_conda python=3.10
conda activate langflow_conda
  • Or just use pipx - it will be installing and running Python applications in isolated environments.
    • It’s particularly useful for installing Python-based command-line tools. When you install a package using pipx, the package’s command-line tools become available to your shell, but the package’s code is not available to your Python scripts.
    • Each package installed with pipx gets its own isolated environment, which helps to avoid version conflicts between packages.
pipx install langflow --python python3.10 --fetch-missing-python

Once installed, just run:

python -m langflow --help
python -m langflow run #--host localhost

And LangFlow will be available at: http://127.0.0.1:7860

#docker run -it --rm -p 7860:7860 langflowai/langflow:latest

git clone https://github.com/langflow-ai/langflow
cd langflow/docker_example
docker compose up

Whih will spin langflow together with postgres:

version: "3.8"

services:
  langflow:
    image: langflowai/langflow:latest #langflow_local
    #command: tail -f /dev/null  #python -m langflow run
    ports:
      - "7860:7860"
    depends_on:
      - postgres
    environment:
      - LANGFLOW_DATABASE_URL=postgresql://langflow:langflow@postgres:5432/langflow
      # This variable defines where the logs, file storage, monitor data and secret keys are stored.
    volumes:
      - langflow-data:/app/langflow

  postgres:
    image: postgres:16
    environment:
      POSTGRES_USER: langflow
      POSTGRES_PASSWORD: langflow
      POSTGRES_DB: langflow
    ports:
      - "5432:5432"
    volumes:
      - langflow-postgres:/var/lib/postgresql/data

volumes:
  langflow-postgres:
  langflow-data:
docker exec -it langflow_local-langflow-1 /bin/bash

CEP’s

  • Tiledesk - is an Open Source Live Chat platform with integrated Chatbots written in NodeJs and Express. Build your own customer support with a multi-channel platform for Web, Android and iOS.
  • Chasqkiq - A full featured Live Chat, Support & Marketing platform, alternative to Intercom, Drift, Crisp, etc from cience.com

CRM’s

Some Open Sourced CRM’s you can Self-Host 👈
  • SuiteCRM
  • Odoo
  • ESPOCRM

ERP’s

AI

Some AI Tools that can be used together with Chatwoot.

  • EmbedChain
  • Khoj - Your AI second brain. A copilot to search and chat (using RAG) with your knowledge base (pdf, markdown, org). Use powerful, online (e.g gpt4) or private, offline (e.g mistral) LLMs. Self-host locally or have it always accessible on the cloud. Access from Obsidian, Emacs, Desktop app, Web or Whatsapp
  • Open Assistant - OpenAssistant is a chat-based assistant that understands tasks, can interact with third-party systems, and retrieve information dynamically to do so.
  • Copilot Kit
  • Botpress

How to Embed ChatWoot to a Website

If you already have your Wordpress / Ghost / SSG site ready, get the js script from your Chatwoot instance and include it in your website body.

Chatwoot + Astro 👈