This guide will help you to install Chatwoot on Ubuntu 20.04 LTS / 20.10. We have prepared a deployment script for you to run. Refer to the script and feel free to make changes accordingly to OS if you are on a non-Ubuntu system.
wget https://raw.githubusercontent.com/chatwoot/chatwoot/develop/deployment/setup_20.04.sh -O setup.sh chmod 755 setup.sh ./setup.sh master
chatwoot.mydomain.comon your domain management system and point it towards the installation IP address
yeswhen prompted about domain setup.
For your Chatwoot installation to properly function, you would need to configure the essential environment variables like
FRONTEND_URL, Mailer and a cloud storage config. Refer Environment variables for the full list.
# Login as chatwoot user sudo -i -u chatwoot cd chatwoot nano .env
systemctl restart chatwoot.target
Whenever a new version of Chatwoot is released, use the following steps to upgrade your instance.
Run the following steps on your VM. Make changes based o your OS if you are on a non-Ubuntu system.
# 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 # Copy the updated targets cp /home/chatwoot/chatwoot/deployment/chatwoot-web.1.service /etc/systemd/system/chatwoot-web.1.service cp /home/chatwoot/chatwoot/deployment/chatwoot-worker.1.service /etc/systemd/system/chatwoot-worker.1.service cp /home/chatwoot/chatwoot/deployment/chatwoot.target /etc/systemd/system/chatwoot.target # Restart the chatwoot server systemctl restart chatwoot.target
If the asset precompilation step fails with
ActionView::Template::Error (Webpacker can't find application.css in /home/chatwoot/chatwoot/public/packs/manifest.json) or if you face issues while restarting the server, try the following command and restart the server.
RAILS_ENV=production rake assets:clean assets:clobber assets:precompile
This command would clear the existing compiled assets and would recompile all the assets. Read more about it here