Overview
This template provides a production‑ready Chatwoot stack as a Monk runnable. You can:- Run it directly to get a managed Chatwoot deployment with all necessary components
- Inherit it in your own stack to seamlessly add customer engagement and support chat capabilities
What this template manages
- Chatwoot Rails application (web interface and API)
- Chatwoot Sidekiq (background job processing)
- PostgreSQL database (data storage)
- Redis (caching and background jobs)
- Database initialization and migration
- Network services and internal connectivity
Quick start (run directly)
- Load templates
- Run Chatwoot stack with defaults
- Setup database
- Access the web interface
http://localhost:3000 and complete the initial setup wizard to create your admin account.
- Customize configuration (recommended via inheritance)
variables. Secrets added with monk secrets add will not affect this runnable unless you inherit it and reference those secrets.
- Preferred: inherit and replace variables with
secret("...")as shown below. - Alternative: fork/clone and edit the
variablesinstack.yml, thenmonk load MANIFESTand run.
Configuration
Key variables you can customize in this template:chatwoot_secret_key to a secure random string (64+ hex characters) before production use.
Stack components
The Chatwoot stack includes the following runnables:chatwoot-rails- Rails application server (port 3000)chatwoot-sidekiq- Background job processorchatwoot-db- PostgreSQL database serverchatwoot-rds- Redis cache and job queue
Ports and connectivity
- Web interface and API: port
3000 - PostgreSQL: internal only (port 5432)
- Redis: internal only (port 6379)
connection-hostname("\<connection-name>") to resolve service hosts.
Use by inheritance (recommended for apps)
Inherit the Chatwoot stack in your customer engagement infrastructure and configure with secrets. Example:Database setup
After deploying the stack, you must run the database preparation action:- Create the database schema
- Run all migrations
- Set up initial data structures
- Prepare the application for first use
Email configuration
For production use, configure SMTP settings to enable:- User invitations and password resets
- Email notifications
- Email channel support
- SendGrid:
smtp.sendgrid.net(port 587, TLS) - AWS SES:
email-smtp.REGION.amazonaws.com - Mailgun:
smtp.mailgun.org - Gmail:
smtp.gmail.com(use App Password)
Storage configuration
By default, Chatwoot stores attachments locally. For production, configure S3-compatible storage:Social media integrations
Configure social media channels by setting the appropriate API credentials: Facebook/Instagram:Related templates
- See other templates in this repository for complementary services
- Combine with monitoring tools (
prometheus-grafana/) for observability - Integrate with reverse proxy (
nginx/) for SSL termination - Add email service (
mailhog/) for development testing
Troubleshooting
-
Database connection errors: Ensure PostgreSQL is running and accepting connections. Check that
chatwoot_database_passwordmatches between the stack and database variables. -
Redis connection errors: Verify Redis is running and accessible. If using Redis password authentication, ensure
chatwoot_redis_passwordis correctly set. -
Missing
prepare-dbaction: Make sure to run the database preparation action after first deployment:
-
Port conflicts: Ensure port 3000 is available on your host. Change the
host-portinchatwoot-railsif needed. - Check logs for any component:
- Initialization issues: If you encounter problems during setup, try purging and restarting:
- Background jobs not processing: Check that Sidekiq is running properly:
- Email not working: Verify SMTP settings are correct and the SMTP server is reachable from your Monk cluster. Test with a simple email notification from Chatwoot.
- Startup order: The stack ensures proper startup order with dependencies. PostgreSQL and Redis start before the Rails application and Sidekiq workers.