Chatwoot Customer Support
Chatwoot omnichannel customer support platform with live chat and ticketing.
Overview
Chatwoot is an open-source customer engagement platform that provides omnichannel support capabilities including live chat, email integration, social media messaging, and ticketing systems. Built with Ruby on Rails, it serves as a comprehensive alternative to commercial platforms like Intercom, Zendesk, or Freshchat, offering businesses full control over their customer support infrastructure. The platform emphasizes real-time communication with features like automated chatbots, conversation routing, and team collaboration tools.
This Docker stack combines Chatwoot's Rails application with PostgreSQL for persistent data storage, Redis for session management and real-time features, and Sidekiq for background job processing. PostgreSQL handles all customer conversations, contact information, and support ticket data with ACID compliance, while Redis powers the real-time chat functionality, caching, and message queuing. Sidekiq processes background tasks like email notifications, webhook deliveries, and conversation assignments asynchronously to maintain responsive user experience.
This configuration is ideal for businesses transitioning from hosted support solutions to self-hosted alternatives, development teams building customer-facing applications that need embedded chat widgets, and organizations requiring data sovereignty for customer communications. The stack provides enterprise-grade customer support capabilities while maintaining complete control over sensitive customer data and conversation histories.
Key Features
- Omnichannel conversation management supporting email, chat widgets, Facebook Messenger, WhatsApp, and Twitter DMs in unified interface
- Real-time chat functionality powered by Redis Pub/Sub for instant message delivery and presence indicators
- PostgreSQL-backed conversation history with full-text search across all customer interactions and support tickets
- Sidekiq background job processing for email notifications, webhook deliveries, and automated conversation routing
- Built-in automation rules engine for conversation assignment, canned responses, and escalation workflows
- Embeddable JavaScript chat widget with customizable appearance and behavior for website integration
- Team collaboration features including private notes, conversation assignments, and agent status management
- RESTful API and webhook system for integrating with CRM systems, analytics platforms, and custom applications
Common Use Cases
- 1E-commerce websites needing embedded live chat with order tracking and customer history integration
- 2SaaS companies requiring multi-channel support desk with API integration for user account management
- 3Development agencies building customer support solutions for clients with white-label requirements
- 4Small to medium businesses transitioning from expensive hosted solutions like Intercom or Zendesk
- 5Organizations with strict data privacy requirements needing self-hosted customer communication platforms
- 6Customer success teams managing high-volume support across multiple communication channels
- 7Companies integrating customer support directly into existing Rails or web applications via API
Prerequisites
- Minimum 2GB RAM recommended (PostgreSQL 1GB, Redis 512MB, Chatwoot 512MB for moderate traffic)
- Port 3000 available for Chatwoot web interface access
- Basic understanding of Rails application configuration and environment variables
- PostgreSQL knowledge for database maintenance, backups, and performance tuning
- Redis familiarity for monitoring memory usage and configuring persistence options
- Email SMTP server credentials for outbound customer notification emails
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 chatwoot: 3 image: chatwoot/chatwoot:latest4 container_name: chatwoot5 command: bundle exec rails s -p 3000 -b 0.0.0.06 environment: 7 - RAILS_ENV=production8 - SECRET_KEY_BASE=${SECRET_KEY_BASE}9 - FRONTEND_URL=${FRONTEND_URL}10 - POSTGRES_HOST=postgres11 - POSTGRES_DATABASE=chatwoot12 - POSTGRES_USERNAME=${POSTGRES_USER}13 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}14 - REDIS_URL=redis://redis:637915 - RAILS_LOG_TO_STDOUT=true16 ports: 17 - "3000:3000"18 depends_on: 19 postgres: 20 condition: service_healthy21 redis: 22 condition: service_started23 networks: 24 - chatwoot-network2526 sidekiq: 27 image: chatwoot/chatwoot:latest28 container_name: chatwoot-sidekiq29 command: bundle exec sidekiq -C config/sidekiq.yml30 environment: 31 - RAILS_ENV=production32 - SECRET_KEY_BASE=${SECRET_KEY_BASE}33 - POSTGRES_HOST=postgres34 - POSTGRES_DATABASE=chatwoot35 - POSTGRES_USERNAME=${POSTGRES_USER}36 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}37 - REDIS_URL=redis://redis:637938 depends_on: 39 - chatwoot40 networks: 41 - chatwoot-network4243 postgres: 44 image: postgres:16-alpine45 container_name: chatwoot-db46 environment: 47 - POSTGRES_USER=${POSTGRES_USER}48 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}49 - POSTGRES_DB=chatwoot50 volumes: 51 - postgres_data:/var/lib/postgresql/data52 healthcheck: 53 test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]54 interval: 10s55 timeout: 5s56 retries: 557 networks: 58 - chatwoot-network5960 redis: 61 image: redis:7-alpine62 container_name: chatwoot-redis63 volumes: 64 - redis_data:/data65 networks: 66 - chatwoot-network6768volumes: 69 postgres_data: 70 redis_data: 7172networks: 73 chatwoot-network: 74 driver: bridge.env Template
.env
1# Chatwoot2SECRET_KEY_BASE=your-secret-key-base-at-least-64-chars3FRONTEND_URL=http://localhost:30004POSTGRES_USER=chatwoot5POSTGRES_PASSWORD=chatwoot_passwordUsage Notes
- 1Dashboard at http://localhost:3000
- 2Run migrations first time
- 3Supports email, chat, social channels
- 4Embeddable chat widget
- 5Built-in automation rules
Individual Services(4 services)
Copy individual services to mix and match with your existing compose files.
chatwoot
chatwoot:
image: chatwoot/chatwoot:latest
container_name: chatwoot
command: bundle exec rails s -p 3000 -b 0.0.0.0
environment:
- RAILS_ENV=production
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
- FRONTEND_URL=${FRONTEND_URL}
- POSTGRES_HOST=postgres
- POSTGRES_DATABASE=chatwoot
- POSTGRES_USERNAME=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- REDIS_URL=redis://redis:6379
- RAILS_LOG_TO_STDOUT=true
ports:
- "3000:3000"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
networks:
- chatwoot-network
sidekiq
sidekiq:
image: chatwoot/chatwoot:latest
container_name: chatwoot-sidekiq
command: bundle exec sidekiq -C config/sidekiq.yml
environment:
- RAILS_ENV=production
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
- POSTGRES_HOST=postgres
- POSTGRES_DATABASE=chatwoot
- POSTGRES_USERNAME=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- REDIS_URL=redis://redis:6379
depends_on:
- chatwoot
networks:
- chatwoot-network
postgres
postgres:
image: postgres:16-alpine
container_name: chatwoot-db
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=chatwoot
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test:
- CMD-SHELL
- pg_isready -U ${POSTGRES_USER}
interval: 10s
timeout: 5s
retries: 5
networks:
- chatwoot-network
redis
redis:
image: redis:7-alpine
container_name: chatwoot-redis
volumes:
- redis_data:/data
networks:
- chatwoot-network
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 chatwoot:5 image: chatwoot/chatwoot:latest6 container_name: chatwoot7 command: bundle exec rails s -p 3000 -b 0.0.0.08 environment:9 - RAILS_ENV=production10 - SECRET_KEY_BASE=${SECRET_KEY_BASE}11 - FRONTEND_URL=${FRONTEND_URL}12 - POSTGRES_HOST=postgres13 - POSTGRES_DATABASE=chatwoot14 - POSTGRES_USERNAME=${POSTGRES_USER}15 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}16 - REDIS_URL=redis://redis:637917 - RAILS_LOG_TO_STDOUT=true18 ports:19 - "3000:3000"20 depends_on:21 postgres:22 condition: service_healthy23 redis:24 condition: service_started25 networks:26 - chatwoot-network2728 sidekiq:29 image: chatwoot/chatwoot:latest30 container_name: chatwoot-sidekiq31 command: bundle exec sidekiq -C config/sidekiq.yml32 environment:33 - RAILS_ENV=production34 - SECRET_KEY_BASE=${SECRET_KEY_BASE}35 - POSTGRES_HOST=postgres36 - POSTGRES_DATABASE=chatwoot37 - POSTGRES_USERNAME=${POSTGRES_USER}38 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}39 - REDIS_URL=redis://redis:637940 depends_on:41 - chatwoot42 networks:43 - chatwoot-network4445 postgres:46 image: postgres:16-alpine47 container_name: chatwoot-db48 environment:49 - POSTGRES_USER=${POSTGRES_USER}50 - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}51 - POSTGRES_DB=chatwoot52 volumes:53 - postgres_data:/var/lib/postgresql/data54 healthcheck:55 test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]56 interval: 10s57 timeout: 5s58 retries: 559 networks:60 - chatwoot-network6162 redis:63 image: redis:7-alpine64 container_name: chatwoot-redis65 volumes:66 - redis_data:/data67 networks:68 - chatwoot-network6970volumes:71 postgres_data:72 redis_data:7374networks:75 chatwoot-network:76 driver: bridge77EOF7879# 2. Create the .env file80cat > .env << 'EOF'81# Chatwoot82SECRET_KEY_BASE=your-secret-key-base-at-least-64-chars83FRONTEND_URL=http://localhost:300084POSTGRES_USER=chatwoot85POSTGRES_PASSWORD=chatwoot_password86EOF8788# 3. Start the services89docker compose up -d9091# 4. View logs92docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/chatwoot-support/run | bashTroubleshooting
- Chatwoot container fails with 'database does not exist': Run 'docker exec chatwoot bundle exec rails db:create db:migrate' to initialize PostgreSQL schema
- Sidekiq workers not processing jobs: Verify Redis connectivity and check Sidekiq logs with 'docker logs chatwoot-sidekiq' for job failures
- Real-time chat messages not appearing: Ensure Redis is accessible and check browser WebSocket connections in developer tools network tab
- PostgreSQL connection refused errors: Wait for health check completion or verify POSTGRES_USER/POSTGRES_PASSWORD environment variables match
- Chat widget not loading on website: Check FRONTEND_URL environment variable matches your domain and verify CORS settings
- High memory usage from Redis: Configure maxmemory policy in Redis and monitor conversation volume for appropriate resource allocation
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
chatwootpostgresredissidekiq
Tags
#chatwoot#support#live-chat#helpdesk#intercom-alternative
Category
Message Queues & BrokersAd Space
Shortcuts: C CopyF FavoriteD Download