Self-Hosting Overview
Chatwoot can be self-hosted on your own infrastructure, giving you complete control over your data, customization, and deployment environment. This guide covers everything you need to know to deploy and maintain your own Chatwoot instance.Why Self-Host?
- Data Privacy: Keep all your customer data on your own servers
- Customization: Full access to modify and extend Chatwoot
- Cost Control: Pay only for infrastructure, no per-seat pricing
- Compliance: Meet specific regulatory requirements
- Integration: Direct access to databases and services
System Requirements
Minimum Requirements
- CPU: 2 cores
- RAM: 4GB
- Storage: 40GB SSD
- OS: Ubuntu 20.04 LTS, 22.04 LTS, or 24.04 LTS
Recommended Requirements (Production)
- CPU: 4+ cores
- RAM: 8GB+
- Storage: 100GB+ SSD
- OS: Ubuntu 22.04 LTS or 24.04 LTS
Software Dependencies
- Ruby: 3.4.4
- Node.js: 24.x
- PostgreSQL: 16+ with pgvector extension
- Redis: 7.0+
- Nginx: Latest stable (for production)
Deployment Options
1. Linux VM (Recommended for Production)
Deploy on a single Linux server using the automated installation script.- Best for: Production deployments, small to medium teams
- Complexity: Low
- Setup time: 15-30 minutes
- Deploy on Linux VM →
2. Docker & Docker Compose
Quickest way to get started with Chatwoot using containers.- Best for: Development, testing, containerized environments
- Complexity: Low
- Setup time: 10 minutes
- Deploy with Docker →
3. Heroku
One-click deployment to Heroku’s platform.- Best for: Quick demos, small teams, managed infrastructure
- Complexity: Very Low
- Setup time: 5 minutes
- Deploy to Heroku →
4. DigitalOcean
Deploy using DigitalOcean’s one-click app or droplet.- Best for: Easy cloud deployment with managed services
- Complexity: Low
- Setup time: 10-15 minutes
- Deploy on DigitalOcean →
5. Kubernetes
Deploy on Kubernetes using Helm charts for scalable production workloads.- Best for: Large teams, high availability, auto-scaling
- Complexity: High
- Setup time: 1-2 hours
- Deploy on Kubernetes →
Architecture Overview
Chatwoot consists of several components:Core Components
- Web Server: Rails application serving the API and frontend
- Background Workers: Sidekiq workers for async jobs
- PostgreSQL: Primary database with pgvector for AI features
- Redis: Cache and job queue
- Object Storage: For file uploads (local or S3-compatible)
Deployment Modes
Full Deployment (Default)
Runs both web server and background workers on the same instance.Web-Only Deployment
Runs only the web server (for auto-scaling groups).Worker-Only Deployment
Runs only background workers (for auto-scaling groups).Converting Between Modes
You can convert existing deployments:Environment Configuration
Chatwoot uses environment variables for configuration. Key variables include:Post-Installation Steps
1. Create Your Account
Visit your Chatwoot URL and create the first admin account:2. Configure Email
Set up SMTP settings in your.env file to enable email notifications.
3. Set Up SSL
For production deployments, always use HTTPS:4. Configure Storage
For production, use S3-compatible storage instead of local storage.5. Set Up Monitoring
Configure APM and error tracking (Sentry, NewRelic, Scout, etc.).Maintenance & Operations
Accessing Rails Console
Viewing Logs
Restarting Services
Upgrading Chatwoot
Backup & Recovery
Database Backup
Restore Database
Backup File Uploads
If using local storage:Security Best Practices
- Use Strong Passwords: Set secure passwords for database and Redis
- Enable Firewall: Only expose necessary ports (80, 443)
- Regular Updates: Keep Chatwoot and system packages updated
- SSL/TLS: Always use HTTPS in production
- Backup Regularly: Automate daily database backups
- Monitor Logs: Set up log monitoring and alerting
- Restrict Access: Use VPN or IP whitelisting for admin access
Performance Optimization
Scaling Web Servers
Deploy multiple web-only instances behind a load balancer:- Set up a load balancer (Nginx, HAProxy, or cloud LB)
- Deploy multiple web-only instances
- Point all instances to shared PostgreSQL and Redis
Scaling Workers
Deploy dedicated worker instances:- Deploy worker-only instances
- Adjust
SIDEKIQ_CONCURRENCYbased on available resources - Monitor queue depth and add workers as needed
Database Optimization
- Use connection pooling
- Enable query caching
- Regular VACUUM and ANALYZE operations
- Consider read replicas for high traffic
Troubleshooting
Common Issues
Installation fails midway Check logs at/var/log/chatwoot-setup.log
Database connection errors
Verify PostgreSQL is running and credentials are correct:
Getting Help
- Community Forum: chatwoot.com/community
- GitHub Issues: github.com/chatwoot/chatwoot/issues
- Documentation: chatwoot.com/docs

