Ubuntu Linux

How to Install Chatwoot on Ubuntu Linux

Richard
Written by
Richard
Mar 2, 2021 Updated Mar 18, 2026 5 min read

This brief tutorial shows students and new users how to install Chatwoot quickly and easily on Ubuntu 20.04 | 18.04.

Chatwoot is an open-source, real-time messaging platform that provides simple and elegant live chat for your websites, collaboration with other agents and messaging apps, and more.

Businesses can use Chatwoot to connect with their customers on channels of their choice and easily integrate with other chat platforms online to supercharge their workflow.

If you’re currently using a chat platform to manage your messaging and connect with clients but are looking for an affordable option, Chatwoot should be a great place to start.

To get started with installing Chatwoot on Ubuntu, follow the steps below.

Download Chatwoot script

Chatwoot has an easy-to-use script to download and install all packages necessary to run the platform.

Open your terminal and run the commands below to download Chatwoot packages.

Command Prompt
cd /tmp
wget https://raw.githubusercontent.com/chatwoot/chatwoot/develop/deployment/setup_20.04.sh -O setup.sh

Install Chatwoot

After downloading using the comment above, change the script permission to make it executable.

Then install it.

🐧Bash / Shell
sudo chmod 755 setup.sh
sudo ./setup.sh master

Upon a successful installation, you should see a message similar to the one below:

💻Code
oot! 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

Chatwoot will now be accessible at the server hostname or IP address, followed by port #3000.

💻Code
http://localhost:3000
Terminal window showing the Chatwoot installation script running on Ubuntu Linux

Log in and begin setting up your environment.

Chatwoot web portal dashboard running successfully on an Ubuntu server

Although the installation seems complete, for your Chatwoot installation to function correctly, you would need to configure the essential environment variables, Mailer, and a cloud storage config.

Log in as a Chatwoot user and create an environment variable folder.

Command Prompt
sudo -i -u chatwoot
cd chatwoot
nano .env

Now you can reference its variables page and add variable definitions in the file.

Environment Variables (chatwoot.com)

For example, you can add the lines below in the file to use the Facebook channel.

💻Code
FB_VERIFY_TOKEN=
FB_APP_SECRET=
FB_APP_ID=

To use Sendgrid, use the block below:

💻Code
SMTP_ADDRESS=smtp.sendgrid.net
SMTP_AUTHENTICATION=plain
SMTP_DOMAIN=<your verified domain>
SMTP_ENABLE_STARTTLS_AUTO=true
SMTP_PORT=587
SMTP_USERNAME=apikey
SMTP_PASSWORD=<your Sendgrid API key>

To change the frontend URL, edit the line below:

💻Code
# Replace with the URL you are planning to use for your app
FRONTEND_URL=http://0.0.0.0:3000

All zeros for IP mean the server is listening on all IPs.

After changing the environment file, run the commands below to restart Chatwoot.

🐧Bash / Shell
sudo systemctl restart chatwoot.target

That should do it!

If you want to run Chatwoot with the Nginx web server and Let’s Encrypt, use the configuration below:

💻Code
server {
  listen 80;
  listen [::]:80;
  server_name chatwoot.example.com www.chatwoot.example.com;

  access_log /var/log/nginx/chatwoot_access_80.log;
  error_log /var/log/nginx/chatwoot_error_80.log;

  return 301 https://chatwoot.example.com/;
}

server {
  listen 443 ssl http2;
  listen [::]:443 ssl http2;
  server_name chatwoot.domain.com www.chatwoot.domain.com;

  underscores_in_headers on;

  access_log /var/log/nginx/chatwoot_access_443.log;
  error_log /var/log/nginx/chatwoot_error_443.log;

  location / {
   proxy_pass_header Authorization;
   proxy_pass http://127.0.0.1:3000;
   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;
  }

  ssl_certificate /etc/letsencrypt/live/chatwoot.domain.com/fullchain.pem; # managed by Certbot
  ssl_certificate_key /etc/letsencrypt/live/chatwoot.domain.com/privkey.pem; # managed by Certbot
  add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
  ssl_protocols TLSv1.2 TLSv1.3;
  ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
  ssl_prefer_server_ciphers off;
  ssl_dhparam /etc/ssl/dhparam;
}

That should do it!

Conclusion:

This post showed you how to install Chatwoot on Ubuntu 20.04 | 18.04. If you find any error above, please use the form below to report.

Frequently Asked Questions

What are the system requirements to install Chatwoot on Ubuntu?

To install Chatwoot on Ubuntu, you need a server running Ubuntu 18.04 or 20.04, at least 2GB of RAM, and a minimum of 2 CPUs. Additionally, ensure you have Docker and Docker Compose installed for optimal performance.

How do I configure environment variables for Chatwoot?

You can configure environment variables for Chatwoot by logging in as a Chatwoot user and editing the '.env' file located in the Chatwoot directory. Add the necessary variable definitions as per the documentation to integrate features like Facebook and Sendgrid.

Can I run Chatwoot on a local server?

Yes, you can run Chatwoot on a local server. After installation, access it via 'http://localhost:3000' in your web browser. Ensure that your local environment meets the system requirements for a smooth experience.

What should I do if the Chatwoot installation fails?

If the Chatwoot installation fails, check the terminal output for error messages that can help diagnose the issue. Common problems include missing dependencies or incorrect permissions, which can often be resolved by following the installation steps carefully.

How can I secure my Chatwoot installation with SSL?

To secure your Chatwoot installation with SSL, you need to configure a domain and SSL certificate after installation. Follow the guide provided on the Chatwoot documentation site to set up SSL correctly for your server.

Was this guide helpful?

Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, the owner and lead writer at Geek Rewind, is a tech enthusiast passionate about simplifying complex IT topics. His years of hands-on experience in system administration and enterprise IT operations have honed his ability to provide practical insights and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

Leave a Reply

Your email address will not be published. Required fields are marked *

Exit mobile version