How to Install Chatwoot on Ubuntu Server Latest

Chatwoot is an open-source customer support platform that helps businesses to engage with customers across various channels seamlessly. It is built with Ruby on Rails and can be easily installed on Ubuntu Server. In this tutorial, we will guide you on how to install Chatwoot on Ubuntu Server Latest.

Prerequisites

  1. Ubuntu Server Latest
  2. Root or sudo user access
  3. Ruby (version >= 2.5)
  4. PostgreSQL
  5. Node.js
  6. Yarn

Step 1: Update your system

Before we begin with the installation of Chatwoot, it is always a good practice to update the package list and upgrade the system. Use the following command for that:

sudo apt-get update && sudo apt-get -y upgrade

Step 2: Install Ruby

Chatwoot is built with Ruby on Rails, so you need to install Ruby before proceeding with the installation of Chatwoot. Run the following command to install Ruby:

sudo apt-get -y install ruby-full

Verify the successful installation of Ruby by running the following command:

ruby --version

Step 3: Install PostgreSQL

Chatwoot uses PostgreSQL as its database. We need to install PostgreSQL server and client on our Ubuntu Server. Follow the below command to install PostgreSQL:

sudo apt-get -y install postgresql postgresql-contrib libpq-dev

Verify the installation of PostgreSQL by checking its version:

postgres --version

Step 4: Install Node.js and Yarn

Chatwoot requires Node.js and Yarn for the installation. To install Node.js, use the following command:

sudo apt-get -y install nodejs

Once Node.js is installed, we need to install Yarn to manage the front-end dependencies of Chatwoot:

sudo apt-get -y install curl software-properties-common
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get -y install yarn

Verify the successful installation of Yarn with the following command:

yarn --version

Step 5: Install Chatwoot

Now that all the necessary dependencies are installed, we can move on to the installation of Chatwoot. Create a new user for Chatwoot using the following command:

sudo useradd chatwoot --shell /bin/bash --create-home

Now switch to the newly created user using the following command:

sudo su - chatwoot

Clone the Chatwoot repository from Github using the command below:

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

Navigate inside the Chatwoot directory:

cd chatwoot

Install the required gems by running the following command:

bundle install

Configure the Chatwoot environment by copying the sample env file and editing it:

cp .env.sample .env
sudo nano .env

Add the following code to the .env file:

export RAILS_ENV=production
export NODE_ENV=production
export USER=chatwoot
export RAILS_SERVE_STATIC_FILES=true
export RAILS_LOG_TO_STDOUT=true
export SECRET_KEY_BASE=YOUR_SECRET_KEY_BASE
export CHATWOOT_DB_USER=postgres
export CHATWOOT_DB_PASSWORD=YOUR-PASSWORD
export CHATWOOT_DB_HOST=localhost
export CHATWOOT_DB_PORT=5432
export CHATWOOT_DB_NAME=YOUR-DATABASE-NAME

Do not forget to replace the YOUR_SECRET_KEY_BASE, YOUR-PASSWORD and YOUR-DATABASE-NAME values with actual values. Save and exit.

Now, run the setup command to create the database, seed the data, and compile the assets:

bundle exec rake setup

Once the setup is complete, you can start the Chatwoot server using the following command:

rails server

Access the Chatwoot dashboard by visiting the URL http://YOUR_SERVER_IP:3000 in a web browser.

Congratulations, you have successfully installed Chatwoot on Ubuntu Server Latest.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!