This article provides a guide for how to install Chatwoot on Ubuntu VPS server.
What is Chatwoot?
Chatwoot is an open-source customer engagement platform that helps businesses manage customer communication across various channels. It acts as a unified inbox for handling customer queries, providing tools to engage with customers more effectively and efficiently.
Key Features
- Unified Inbox:
Manage conversations from multiple channels, including:- SMS
- Live chat on websites
- Social media (Facebook, Twitter, WhatsApp, Instagram)
- Messaging platforms (Telegram, Slack, etc.)
- Real-Time Chat:
Provide live chat support directly on your website or app, ensuring instant communication with visitors. - Automations and Workflows:
Automate repetitive tasks like assigning conversations to agents, sending responses, or closing tickets. - Customizable and Scalable:
Customize workflows, themes, and branding. Being open-source, it allows developers to tweak and expand the functionality to suit business needs. - Multilingual Support:
Supports multiple languages, making it ideal for global businesses. - Reporting and Analytics:
Gain insights into customer interactions, agent performance, and key metrics to improve your service. - Role-Based Access:
Define roles for team members (e.g., admin, agent) and control access to features. - Integrations:
Seamlessly integrate with other platforms like CRMs, help desks, and automation tools. - Self-Hosted Option:
You can deploy it on your own infrastructure for complete data control or use their cloud-hosted service.
Who Can Use Chatwoot?
Chatwoot is designed for:
- Customer Support Teams: To manage inquiries across platforms.
- Sales Teams: To engage with prospects via live chat or social media.
- Startups and SMEs: Who need an affordable, flexible customer service solution.
- Developers: Interested in building or customizing customer engagement tools.
Benefits
- Cost-Effective: As an open-source solution, it can be self-hosted to reduce operational costs.
- Enhanced Customer Experience: Centralized and responsive communication leads to improved customer satisfaction.
- Data Privacy: Self-hosting ensures full control over customer data, adhering to privacy regulations.
Chatwoot competes with other customer support tools like Zendesk, Intercom, and Freshdesk but stands out due to its open-source nature and flexibility.
Pre-requisites
Supported Linux distribution​
Installation of Chatwoot is possible on most Unix environments, but not officially supported.​
Storage​
The necessary hard drive space largely depends on your usage, the size and number of attachments that you receive through your conversations etc.
CPU​
CPU requirements are dependent on the usage and expected workload. Your workload is influenced by factors such as – but not limited to – how active your users are, how many conversations do you receive and the conversation channels which you are using.
The following is the recommended minimum CPU hardware guidance for a handful of example Chatwoot conversation base sizes.
- 4 cores is the recommended minimum number of cores and supports up to 10,000 conversations a day.
- 8 cores supports up to 20,000 conversations a day.
- More conversations? Consider scaling horizontally by adding more application servers.
Memory​
Memory requirements are dependent on the usage and expected workload. Your workload is influenced by factors such as – but not limited to – How active your users are, how many conversations do you receive and the conversation channels which you are using.
The following is the recommended minimum Memory hardware guidance for a handful of example Chatwoot conversation base sizes.
- 4GB RAM is the required minimum memory size and supports up to 10,000 conversations a day.
- we are always working to reduce the memory requirement.
- 8GB RAM supports up to 20,000 conversations a day.
- More conversations? Consider scaling horizontally by adding more application servers.
Note:Â Add at least 1GB of swap memory to the machine to ensure that the machine doesn’t run out of resources during an upgrade.
Step-by-Step Guide to Install Chatwoot on Ubuntu VPS
Chatwoot is an open-source customer engagement platform that can be self-hosted. Follow this guide to install Chatwoot on Ubuntu VPS.
Step 1: Update and Prepare Your VPS
- Log in to Your VPS:
Use SSH to access your VPS:ssh username@your_vps_ip
- Update the System:
Update your Ubuntu package lists and upgrade installed packages.sudo apt update && sudo apt upgrade -y
- Install Essential Tools:
Install necessary dependencies likecurl
,git
, andbuild-essential
.sudo apt install curl git build-essential -y
Step 2: Install PostgreSQL
- Install PostgreSQL:
Chatwoot requires PostgreSQL as its database.sudo apt install postgresql postgresql-contrib -y
- Set Up a Database and User for Chatwoot:
Switch to the PostgreSQL user and create a database and user.sudo -i -u postgres psql
Run the following commands inside the
psql
shell:CREATE DATABASE chatwoot_db; CREATE USER chatwoot_user WITH PASSWORD 'your_secure_password'; ALTER ROLE chatwoot_user SET client_encoding TO 'utf8'; ALTER ROLE chatwoot_user SET default_transaction_isolation TO 'read committed'; ALTER ROLE chatwoot_user SET timezone TO 'UTC'; GRANT ALL PRIVILEGES ON DATABASE chatwoot_db TO chatwoot_user; \q
Exit the PostgreSQL user:
exit
Step 3: Install Redis
Redis is used for background job processing and caching.
sudo apt install redis -y sudo systemctl enable redis sudo systemctl start redis
Step 4: Install Node.js
- Add the NodeSource Repository:
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
- Install Node.js and Yarn:
sudo apt install nodejs -y npm install --global yarn
Step 5: Install Ruby
Chatwoot is built on Ruby on Rails, so Ruby is essential.
- Install RVM (Ruby Version Manager):
sudo apt install gnupg2 -y curl -sSL https://rvm.io/mpapis.asc | gpg --import - curl -sSL https://rvm.io/pkuczynski.asc | gpg --import - curl -sSL https://get.rvm.io | bash -s stable
- Add User to RVM group:
sudo usermod -aG rvm root
- Load RVM:
source /etc/profile.d/rvm.sh
- Install Ruby:
rvm install 3.2.2 rvm use 3.2.2 --default ruby -v
Step 6: Clone Chatwoot Repository
- Clone the Repository:
git clone https://github.com/chatwoot/chatwoot.git cd chatwoot
- Install Dependencies:
bundle install yarn install
Step 7: Configure Chatwoot
- Set Environment Variables:
Create an.env
file and populate it with the necessary configuration.cp .env.example .env nano .env
Update the file with your database credentials and other configurations:
POSTGRES_HOST=localhost POSTGRES_PORT=5432 POSTGRES_USERNAME=chatwoot_user POSTGRES_PASSWORD=your_secure_password POSTGRES_NAME=chatwoot_db
- Run Database Migrations:
rails db:setup
Step 8: Precompile Assets
rails assets:precompile RAILS_ENV=production
Step 9: Start Chatwoot
- Start the Application:
foreman start -f Procfile.dev
- Access Chatwoot:
Open your browser and navigate tohttp://your_vps_ip:3000
.
Step 10: Set Up Reverse Proxy (Optional)
For production deployment, set up a reverse proxy using Nginx.
- Install Nginx:
sudo apt install nginx -y
- Configure Nginx:
Create a new configuration file:sudo nano /etc/nginx/sites-available/chatwoot
Add the following content:
server { listen 80; server_name your_domain_or_ip; location / { proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } }
- Enable the Configuration:
sudo ln -s /etc/nginx/sites-available/chatwoot /etc/nginx/sites-enabled sudo nginx -t sudo systemctl restart nginx
- Access the Application:
Navigate tohttp://your_ip_address:3000
.
Step 11: Secure with SSL (Optional but Recommended)
- Install Certbot:
sudo apt install certbot python3-certbot-nginx -y
- Obtain an SSL Certificate:
sudo certbot --nginx -d your_domain
- Verify SSL Setup:
Access your site athttps://your_domain
.
Conclusion
You now know how to install Chatwoot on Ubuntu VPS. Configure further settings within the Chatwoot dashboard to tailor it to your requirements.