Come installare la piattaforma di messaggistica Chatwoot su Debian 11

25 mar 2022 4 min di lettura
Come installare la piattaforma di messaggistica Chatwoot su Debian 11
Indice dei contenuti

Introduzione

Chatwoot è una piattaforma di messaggistica gratuita, open source e in tempo reale. Fornisce una chat semplice e dal vivo per il tuo sito Web e lo integra con altre app. Può essere facilmente integrato con le app dei social media tra cui Facebook, WhatsApp e Twitter.

In questo tutorial, vedremo come installare Chatwoot su Debian 11.

Se desideri installare Chatwoot su un server in remoto continua a leggere, altrimenti salta il primo paragrafo "Connessione al Server" e leggi il successivo.

Connessione al Server

Per accedere al server, è necessario conoscere l'indirizzo IP. Avrai anche bisogno dell'username e della password per l'autenticazione. Per connettersi al server come utente root digitare il seguente comando:

ssh root@IP_DEL_SERVER

Successivamente sarà necessario inserire la password dell'utente root.

Se non utilizzate l'utente root potete connettervi con un'altro nome utente utilizzando lo stesso comando, quindi modificare root con il vostro nome_utente:

ssh nome_utente@IP_DEL_SERVER

Successivamente vi verrà chiesto di inserire la password del vostro utente.

La porta standard per connettersi tramite ssh è la 22, se il vostro server utilizza una porta diversa, sarà necessario specificarla utilizzando il parametro -p, quindi digitare il seguente comando:

ssh nome_utente@IP_DEL_SERVER -p PORTA

Prerequisiti

  • Un server che esegue Debian 11.
  • Un nome di dominio valido puntato con l'IP del tuo server.
  • Una password di root è configurata sul server.

Installare Chatwoot su Debian 11

Prima di iniziare, dovrai scaricare lo script di installazione di Chatwoot dal repository Git.

Innanzitutto, installa il comando git con il seguente comando:

apt-get install git -y

Quindi, scarica Chatwoot con il seguente comando:

git clone https://github.com/chatwoot/chatwoot.git

Quindi, cambia la directory nella directory scaricata e installa Chatwoot con il seguente comando:

cd chatwoot/deployment/
bash setup_20.04.sh -O setup.sh

Ti verrà chiesto di definire il tuo dominio e configurarlo con SSL come mostrato di seguito:

Would you like to configure a domain and SSL for Chatwoot?(yes or no): yes
Enter your sub-domain to be used for Chatwoot (chatwoot.domain.com for example) : chatwoot.noviello.it

This script will try to generate SSL certificates via LetsEncrypt and serve chatwoot at
https://chatwoot.noviello.it. Proceed further once you have pointed your DNS to the IP of the instance.

Do you wish to proceed? (yes or no): yes
Would you like to install postgres and redis?(Answer no if you plan to use external services): yes


Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Enter email address (used for urgent renewal and security notices)
 (Enter 'c' to cancel): [email protected]

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, to
share your email address with the Electronic Frontier Foundation, a founding
partner of the Let's Encrypt project and the non-profit organization that
develops Certbot? We'd like to send you email about our work encrypting the web,
EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
Account registered.
Requesting a certificate for chatwoot.noviello.it
Performing the following challenges:
http-01 challenge for chatwoot.noviello.it
Waiting for verification...
Cleaning up challenges
Subscribe to the EFF mailing list (email: [email protected]).

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/chatwoot.noviello.it/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/chatwoot.noviello.it/privkey.pem
   Your certificate will expire on 2022-06-04. To obtain a new or
   tweaked version of this certificate in the future, simply run
   certbot again. To non-interactively renew *all* of your
   certificates, run "certbot renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le

Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.


***************************************************************************
Woot! Woot!! Chatwoot server installation is complete
The server will be accessible at https://chatwoot.noviello.it
***************************************************************************

Una volta installato il Chatwoot, puoi controllare lo stato del Chatwoot con il seguente comando:

systemctl status chatwoot.target

Otterrai il seguente output:

? chatwoot.target
     Loaded: loaded (/etc/systemd/system/chatwoot.target; enabled; vendor preset: enabled)
     Active: active since Sun 2022-03-06 06:07:21 UTC; 1min 36s ago

Mar 06 06:07:21 debian11 systemd[1]: Reached target chatwoot.target.

Per impostazione predefinita, Chatwoot è in ascolto sulla porta 3000. Puoi verificarlo con il seguente comando:

ss -antpl | grep 3000

Otterrai il seguente output:

LISTEN 0      1024         0.0.0.0:3000      0.0.0.0:*    users:(("ruby",pid=38128,fd=8))  

Chatwoot installa e configura Nginx con Let's Encrypt SSL durante l'installazione. Puoi controllare lo stato di Nginx con il seguente comando:

systemctl status nginx

Otterrai il seguente output:

? nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2022-03-06 06:09:48 UTC; 10s ago
       Docs: man:nginx(8)
    Process: 38376 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
    Process: 38377 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
   Main PID: 38378 (nginx)
      Tasks: 3 (limit: 4679)
     Memory: 3.5M
        CPU: 61ms
     CGroup: /system.slice/nginx.service
             ??38378 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
             ??38379 nginx: worker process
             ??38380 nginx: worker process

Mar 06 06:09:48 debian11 systemd[1]: Starting A high performance web server and a reverse proxy server...
Mar 06 06:09:48 debian11 systemd[1]: Started A high performance web server and a reverse proxy server.

Accedere all'interfaccia Web di Chatwoot

Ora apri il tuo browser web e accedi all'interfaccia web di Chatwoot utilizzando l'URL http://chatwoot.noviello.it. Verrai reindirizzato alla pagina di benvenuto.

Fornisci il tuo nome, e-mail, nome dell'azienda, password e fai clic sul pulsante Termina configurazione. Dovresti vedere la pagina di login.

Fornisci la tua email, password e clicca sul pulsante Accedi. Dovresti vedere la dashboard di Chatwoot.

Fare clic su Posta in arrivo. Dovresti vedere la seguente pagina:

Da qui puoi scegliere il canale che vuoi integrare con Chatwoot.

Conclusione

Congratulazioni! hai installato con successo Chatwoot su Debian 11. Ora puoi ospitare Chatwoot nella tua organizzazione e usarlo per fornire assistenza ai clienti.

Buy me a coffeeBuy me a coffee

Supportaci se ti piacciono i nostri contenuti. Grazie.

Successivamente, completa il checkout per l'accesso completo a Noviello.it.
Bentornato! Accesso eseguito correttamente.
Ti sei abbonato con successo a Noviello.it.
Successo! Il tuo account è completamente attivato, ora hai accesso a tutti i contenuti.
Operazione riuscita. Le tue informazioni di fatturazione sono state aggiornate.
La tua fatturazione non è stata aggiornata.