In this tutorial, you’ll learn that how to install Chatwoot on Ubuntu 20.04 with Let’s Encrypt SSL. Chatwoot provides the facility of customer support for real-time messaging channels. It offers businesses to provide excellent customer support via their social media channels. You can integrate different social media channels like Facebook, Twitter, Email, whatsapp etc from a single platform. It is an alternative to commercial softwares like Intercorn & Zendesk. Here we’ll see some features of Chatwoot & then proceed towards the installation procedure.
Some Features Of Chatwoot
Live Chat
It provides the live chat feature that can be integrated on your website to provide excellent customer service.
Integrations
Chatwoot offers the flexibility of integration with collaboration tools like Slack. All your conversations will be delivered to slack so that you won’t need to leave slack workplace to reply to your messages.
Shared Inbox
It also provide the shared inbox feature for your team. This help you to handle multi tasks easily.
Shared box allows you to
- Easily collaborate with your teamworkers with the help of private notes
- Uses slash commands to answer FAQ
- Automatically assign tickets to teamworkers for faster response.
Now, let’s move towards the installation procedure.
Step 1: Update Your System
First of all update your system to have the latest packages installed.
sudo apt update && sudo apt upgrade -y
Step 2: Download Installation Script
Once the update finished, reboot your system and download the installation script of Chatwoot on Ubuntu 20.04. You can use wget command to get the script.
wget https://raw.githubusercontent.com/chatwoot/chatwoot/develop/deployment/setup_20.04.sh -O setup.sh
Step 3: Install Chatwoot On Ubuntu 20.04
Now, make the script executable and run it with sudo priviliges.
chmod 755 setup.sh
sudo ./setup.sh
It will install the packages that are necessary for Chatwoot. On successfull installation, you’ll see the similar output.
…. Woot! Woot!! Chatwoot server installation is complete The server will be accessible at http://:3000 To configure a domain and SSL certificate, follow the guide at https://www.chatwoot.com/docs/deployment/deploy-chatwoot-in-linux-vm
You can access the service by typing http://:3000 in your browser.
Don’t forget to allow the port 3000 in your firewall.
sudo ufw allow 3000
Step 4: Install Nginx On Ubutnu 20.04
Install Nginx on Ubuntu 20.04 if you don’t have already installed. Fire the below command to install Nginx on Ubuntu 20.04.
sudo apt update
sudo apt install nginx
Hit the below command to unlink the default nginx configuration file.
sudo unlink /etc/nginx/sites-enabled/default
Then create the new virtualhost
cd /etc/nginx/sites-available
sudo nano chatwoot.conf
And modify the below data according to your domain and paste in the above file.
# server { server_name osradar.com; # Point upstream to Chatwoot App Server set $upstream 127.0.0.1:3000; # Nginx strips out underscore in headers by default # Chatwoot relies on underscore in headers for API # Make sure that the config is turned on. underscores_in_headers on; location /.well-known { alias /var/www/ssl-proof/chatwoot/.well-known; } location / { proxy_pass_header Authorization; proxy_pass http://$upstream; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Ssl on; # Optional proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_http_version 1.1; proxy_set_header Connection “”; proxy_buffering off; client_max_body_size 0; proxy_read_timeout 36000s; proxy_redirect off; } listen 80; }
Now, save the file and link it to /etc/nginx/sites-enabled
sudo ln -s /etc/nginx/sites-available/chatwoot.conf /etc/nginx/sites-enabled/chatwoot.conf
Then verify the syntax and reload nginx services.
sudo nginx -t
sudo systemctl reload nginx
Step 5: Configure Let’s Encrypt SSL for Chatwoot
To configure Let’s Encrypt SSL for chatwoot, install the certbot. You can install it by typing.
sudo add-apt-repository ppa:certbot/certbot
sudo apt update
sudo apt install python-certbot-nginx
Now, run the let’s encrypt
sudo mkdir -p /var/www/ssl-proof/chatwoot/.well-known
sudo certbot --webroot -w /var/www/ssl-proof/chatwoot/ -d yourdomain.com -i nginx
Step 6: Access Chatwoot on Ubuntu 20.04
You can access chatwoot by typing your domain address in browser along with port 3000.
Create new account or use old one to login to the panel.
Step 7: Configure Chatwoot Environment On Ubuntu 20.04
Now, it’s time to configure chatwoot environment to properly work it.
Login via CLI.
sudo -i -u chatwoot
cd chatwoot
Configure Facebook Channel
To configure Facebook channel, you need to create a facebook app in chatwoot portal.
And then provide the below details in .env file.
###edit the .env file nano .env FB_VERIFY_TOKEN= FB_APP_SECRET= FB_APP_ID=
Configure Email Channel
Add SMTP details in the .env file to configure email channel.
MAILER_SENDER_EMAIL=
SMTP_ADDRESS=
SMTP_USERNAME=
SMTP_PASSWORD=
Configure Storage Channel
You can also select any cloud storage. Edit the .env file and change the following fields.
ACTIVE_STORAGE_SERVICE='local'
You’ve to restart chatwoot service once you made changes to .env file to take effect of the changes.
sudo systemctl restart chatwoot.target
Step 8: Upgrade Chatwoot On Ubuntu 20.04
In order to upgrade to the latest version run the below commands.
sudo -i -u chatwoot
cd chatwoot
git checkout master && git pull
bundle
yarn
rake assets:precompile RAILS_ENV=production
RAILS_ENV=production bundle exec rake db:migrate
systemctl restart chatwoot.target
So, this is how you can install Chatwoot On Ubuntu 20.04