2019-10-09 12:25:33 +00:00
---
path: "/docs/installation-guide-ubuntu"
title: "Ubuntu installation guide"
---
2019-09-22 05:59:26 +00:00
2020-07-20 12:13:38 +00:00
Open a terminal and run the following commands:
2019-09-22 05:59:26 +00:00
```bash
sudo apt-get update
```
### Install Git
```bash
sudo apt-get install git
```
### Install RVM
You need software-properties-common installed in order to add PPA repositories.
```bash
sudo apt-get install software-properties-common
```
```bash
sudo apt-add-repository -y ppa:rael-gc/rvm
sudo apt-get update
sudo apt-get install rvm
```
2020-07-20 12:13:38 +00:00
Enable `Run command as a login shell` in terminal `Preferences` . Restart your computer.
2019-09-22 05:59:26 +00:00
### Install Ruby
2020-07-20 12:13:38 +00:00
Chatwoot APIs are built on Ruby on Rails. You need to install ruby 2.7.1:
2019-09-22 05:59:26 +00:00
```bash
2020-05-08 06:43:23 +00:00
rvm install ruby-2.7.1
2019-09-22 05:59:26 +00:00
```
2020-07-20 12:13:38 +00:00
Use ruby 2.7.1 as default:
2019-09-22 05:59:26 +00:00
```bash
2020-05-08 06:43:23 +00:00
rvm use 2.7.1 --default
2019-09-22 05:59:26 +00:00
```
### Install Node.js
2020-07-20 12:13:38 +00:00
Install Node.js from NodeSource using the following commands:
2019-09-22 05:59:26 +00:00
```bash
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs
```
### Install yarn
2020-07-20 12:13:38 +00:00
We use `yarn` as the package manager:
2019-09-22 05:59:26 +00:00
```bash
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
```
```bash
sudo apt-get update & & sudo apt-get install yarn
```
### Install postgres
2020-07-20 12:13:38 +00:00
The database used in Chatwoot is PostgreSQL. Use the following commands to install postgres:
2019-09-22 05:59:26 +00:00
```bash
sudo apt install postgresql postgresql-contrib
```
2020-07-20 12:13:38 +00:00
The installation procedure creates a user account called postgres that is associated with the default Postgres role. In order to use Postgres, you can log into that account:
2019-09-22 05:59:26 +00:00
```bash
sudo -u postgres psql
```
2020-07-20 12:13:38 +00:00
Install `libpg-dev` dependencies for ubuntu:
2019-09-22 05:59:26 +00:00
```bash
sudo apt-get install libpq-dev
```
### Install redis-server
2020-07-20 12:13:38 +00:00
Chatwoot uses Redis server in agent assignments and reporting. You need to install `redis-server` :
2019-09-22 05:59:26 +00:00
```bash
sudo apt-get install redis-server
```
2020-07-20 12:13:38 +00:00
Next, enable Redis to start on system boot:
2019-09-22 05:59:26 +00:00
```bash
sudo systemctl enable redis-server.service
```
### Install imagemagick
```bash
sudo apt-get install imagemagick
```