How to Install Chatwoot on Debian 11?
Chatwoot is an open-source customer engagement platform that facilitates an organization to easily manage conversations across a variety of messaging platforms like WhatsApp, Facebook Messenger, Twitter, and more. That’s a really powerful alternative to proprietary customer support solutions. This guide is based on the Chatwoot installation guide, providing a complete step-by-step process to install and configure Chatwoot on Debian 11.
Why Chatwoot Installation on Debian 11?
Here are some reasons to install Chatwoot on Debian 11!
Open-Source Solution
No Licensing Cost
Highly Customizable
Omnichannel Support
Self-hosted
Scalable and Secure
Prerequisites Before Installing Chatwoot on Debian 11
Before carrying out the installation process, you must ensure the following:
- 2 GB RAM minimum. (4 GB recommended)
- A Debian 11 running server with a non-root user and the ability to execute sudo commands.
- Having a domain name, especially for SSL configuration, is optional but recommended.
- Docker and docker Compose are installed on the system.
- PostgreSQL database.
- Redis for caching and background jobs.
- Node.js and yarn installed.
- Nginx installed for reverse proxy.
Steps to Install Chatwoot on Debian 11
Let’s delve through the steps to install Chatwoot on Debian 11!
Step 1: System Update
Before beginning with the installation, it is important to update the system related packages.
sudo apt update && sudo apt upgrade -y
Step 2: Install All Necessary Dependencies
As far as Chatwoot is concerned, Git, cURL, and other essential dependencies are very much instrumental.
sudo apt install -y curl git curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - sudo apt install -y nodejs
Ensure that installation is proper.
node -v npm -v
Step 3: Node.js and Yarn Installation
Yarn is a prerequisite for the installation of Chatwoot dependencies.
sudo npm install -g yarn
Check Yarn Installation.
yarn -v
Step 4: PostgreSQL Database Installation
Chatwoot uses PostgreSQL as its database. Create a new user and database in PostgreSQL.
sudo systemctl start postgresql sudo systemctl enable postgresql
Make sure that you create a database and user for Chatwoot.
sudo -i -u postgres psql CREATE USER chatwoot WITH PASSWORD 'your_password'; CREATE DATABASE chatwoot_production OWNER chatwoot; ALTER ROLE chatwoot SUPERUSER; \q
Step 5: Install Redis
Redis is essential for caching and background job processing.
sudo apt install -y redis-server
Enable Redis to start on boot.
sudo systemctl enable redis
Step 6: Docker and Docker Compose Installation
Chatwoot installation can be carried out with Docker.
sudo apt install -y docker.io sudo systemctl start docker sudo systemctl enable docker
Docker Compose Installation needs to be carried out.
sudo apt install -y docker-compose
Check Installation
docker --version docker-compose --version
Step 7: Clone the Chatwoot Repository
Clone the Chatwoot repository from Github.
git clone https://github.com/chatwoot/chatwoot.git cd chatwoot
Step 8: Configuration of Environment Variables
Create an environment file and add the following configuration.
cp .env.example .env nano .env
Set the following variables:
POSTGRES_USER=chatwoot POSTGRES_PASSWORD=your_password POSTGRES_DB=chatwoot_production REDIS_URL=redis://localhost:6379
Save the new environment file and exit.
Step 9: Build & Run Chatwoot
One can set chatwoot using the following commands:
POSTGRES_USER=chatwoot POSTGRES_PASSWORD=your_password POSTGRES_DB=chatwoot_production REDIS_URL=redis://localhost:6379
Start the Chatwoot Server.
foreman start
Step 10: Configuring Nginx (Optional)
For production deployment, nginx is effectively used as a reverse proxy. Check Nginx Installation.
sudo apt install -y nginx
Create a configuration file in nginx.
sudo nano /etc/nginx/sites-available/chatwoot
Insert the subsequent configuration.
server { listen 80; server_name your_domain; 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 Nginx configuration and restart Nginx.
sudo ln -s /etc/nginx/sites-available/chatwoot /etc/nginx/sites-enabled/ sudo systemctl restart nginx
Conclusion
Installing Chatwoot on Debian 11 offers businesses a seamless way to manage customer interactions. This guide provides good, detailed, step-by-step instructions for deploying Chatwoot.
Frequently Asked Questions
What is Chatwoot?
Chatwoot is a solid customer engagement platform that facilitates businesses to handle conversations using varied channels like email, social media, and live chat.
Is it easy to install Chatwoot on other Linux distributions?
Yes, installing Chatwoot on other Linux distributions like Ubuntu, CentOS, and Red Hat distributions is easier and may involve basic variations.
What are the basic system requirements for Chatwoot?
Basically, for small deployments, it requires a minimum of 2GB RAM, 2 Core CPUs, and 20 GB space. And, for larger setups, one is required to scale up accordingly.
How to verify if Chatwoot is running properly or not?
It can be verified by running the following commands:
sudo systemctl status chatwoot
How to restart if Chatwoot stops working?
To restart the Chatwoot, run the following command:
sudo systemctl restart chatwoot
How do I update Chatwoot to the latest version?
To update Chatwoot to the latest version, you are required to pull the repository and restart the service:
cd /home/user/chatwoot git pull origin master bundle install yarn install yarn build:production sudo systemctl restart chatwoot
List down the steps to uninstall Chatwoot from Debian 11.
To uninstall Chatwoot, follow these steps:
sudo systemctl stop chatwoot sudo systemctl disable chatwoot sudo rm -rf /home/user/chatwoot sudo rm /etc/systemd/system/chatwoot.service sudo systemctl daemon-reload
Can I use Chatwoot for free?
Yes, Chatwoot is an open-source and free platform. On top of that, it offers managed hosting and enterprise support for businesses that require additional features and reliability.