使用“让我们加密SSL”在Ubuntu 20.04上安装Chatwoot
Chatwoot是用于实时消息传递渠道的客户支持工具。这有助于公司通过社交媒体渠道为客户提供出色的客户支持。
这意味着您可以将社交媒体聊天(例如Facebook,Twitter,电子邮件和WhatsApp)集成到一个中央位置。这使您可以有效地监视所有平台并实时响应客户要求。
Chatwoot是商业软件解决方案的开源替代品,例如: 对讲机, Zendesk 等等
Chatwoot功能
- 在线聊天 –它为您的企业提供了简单的聊天软件,您可以在网站上嵌入窗口小部件以进行实时聊天。
- 积分 – Chatwoot使您可以灵活地与协作工具(例如Slack)集成。所有Chatwoot对话都可以传递到Slack,因此您不必离开Slack工作区即可回复消息。
- 共享收件箱 –共享团队的收件箱以进行协作。这简化了多通道票证的处理。
使用共享的收件箱,您可以:
- 使用私人备忘与您的团队合作
- 使用斜杠命令来回答常见问题。
- 票证会自动分配给队友,以便快速响应。
在Ubuntu 20.04上安装Chatwoot
了解如何使用Let’s Encrypt在Ubuntu 20.04上安装自托管的Chatwoot实时聊天服务器。
跳至安装之前,请注意以下要求:
- 已升级所有软件包的Ubuntu 20.04 LTS服务器。
- Nginx服务器安装
- 让我们加密的Certbot
- FQDN –完全合格的域名
使用以下步骤在Ubuntu 20.04主机上安装功能齐全的Chatwoot服务器。
步骤1-下载安装脚本
在终端中运行以下命令,以下载用于安装chatwoot的脚本。
wget https://raw.githubusercontent.com/chatwoot/chatwoot/develop/deployment/setup_20.04.sh -O setup.sh
第2步–在Ubuntu 20.04上安装Chatwoot
使下载的脚本可执行,并以sudo身份运行。
chmod 755 setup.sh
sudo ./setup.sh
安装程序将下载并安装Chatwoot所需的软件包。
如果安装成功完成,您应该会看到类似以下的输出:
....
Woot! Woot!! Chatwoot server installation is complete
The server will be accessible at http://<server-ip>:3000
To configure a domain and SSL certificate, follow the guide at https://www.chatwoot.com/docs/deployment/deploy-chatwoot-in-linux-vm
您可以直接从以下位置访问此服务:
http://<server-ip>:3000
步骤3 –安装Nginx Web服务器
您可以通过以下方式访问Chatwoot: http://<server-ip>:3000
..必须将防火墙配置为允许端口3000。
此设置需要安装Nginx并将其用作Chatwoot的反向代理。
另外,在nginx虚拟主机上设置“让我们加密”。
在Ubuntu上安装nginx。
sudo apt update
sudo apt install nginx
配置nginx。
取消链接默认的nginx配置。
sudo unlink /etc/nginx/sites-enabled/default
创建一个虚拟主机
cd /etc/nginx/sites-available
sudo nano chatwoot.conf
将以下配置添加到conf文件。
server {
server_name <yourdomain.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;
}
将配置文件链接到 /etc/nginx/sites-enabled
:
sudo ln -s /etc/nginx/sites-available/chatwoot.conf /etc/nginx/sites-enabled/chatwoot.conf
确保Nginx配置正常,然后重新启动Nginx服务。
$ sudo nginx -t
$ sudo systemctl reload nginx
步骤4 –配置“让我们为Chatwoot加密SSL”
添加一个certbot存储库。
sudo add-apt-repository ppa:certbot/certbot
为Nginx安装certbot
sudo apt update
sudo apt install python-certbot-nginx
运行加密
sudo mkdir -p /var/www/ssl-proof/chatwoot/.well-known
sudo certbot --webroot -w /var/www/ssl-proof/chatwoot/ -d yourdomain.com -i nginx
您现在可以访问Chatwoot实时服务器。 https://yourdomain.com
..
Chatwoot环境配置
您需要配置chaioot环境以使系统正常运行。
- 以Chatwoot用户身份登录
# Login as chatwoot user
sudo -i -u chatwoot
cd chatwoot
2.配置Facebook频道
您需要与他们的开发人员一起创建一个Facebook应用程序 门户网站..
然后,您需要在.env文件中输入以下详细信息
##edit the .env file
nano .env
FB_VERIFY_TOKEN=
FB_APP_SECRET=
FB_APP_ID=
3.配置电子邮件
在.env文件中,将SMTP详细信息添加到以下字段。
MAILER_SENDER_EMAIL=
SMTP_ADDRESS=
SMTP_USERNAME=
SMTP_PASSWORD=
4.配置存储
您可以将Chatwoot配置为使用云存储(例如Amazons3),而不使用默认的本地存储。可以在.env文件的以下字段中进行更改。
ACTIVE_STORAGE_SERVICE='local'
更新/修改.env文件后,重新启动chatwoot服务
sudo systemctl restart chatwoot.target
如何升级Chatwoot
使用以下步骤升级到Chatwoot的较新版本
# Login as Chatwoot user
sudo -i -u chatwoot
# Navigate to the Chatwoot directory
cd chatwoot
# Pull the latest version of the master branch
git checkout master && git pull
# Update dependencies
bundle
yarn
# Recompile the assets
rake assets:precompile RAILS_ENV=production
# Migrate the database schema
RAILS_ENV=production bundle exec rake db:migrate
# Restart the chatwoot server
systemctl restart chatwoot.target
结论
我在自托管的Ubuntu 20.04主机上安装并配置了Chatwoot Live Chat Server。
实时聊天在服务行业中非常有用,因为它可以提高客户服务的效率。
在Ubuntu上安装Openfire XMPP聊天服务器
如何在Debian / Ubuntu上安装Rocket.Chat服务器
在Ubuntu / Debian上安装Zulip聊天服务器