使用“讓我們加密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聊天服務器