How to Install Let’s Chat on Ubuntu Linux

|

|

The article provides a detailed guide to installing and using Let’s Chat, a Node.js and MongoDB-based messaging application for small teams, on Ubuntu Linux. It outlines the essential packages you need to install – Node.js, MongoDB, and Python. After preparing the system, the article walks through downloading and installing Let’s Chat, setting up a reverse…

This article describes the steps to install and use Let’s Chat on Ubuntu Linux.

Let’s Chat is a free, persistent messaging application that runs on Node.js and MongoDB designed for small teams, and comes with killer features such as LDAP/Kerberos authentication, a REST-like API, and XMPP support.

Let’s should come in handy if you are looking for a self-hosted chat platform for your project and people.

You will need these packages on your machine to install Let’s Chat, which is pretty popular.

How to install Let’s Chat on Ubuntu Linux

As mentioned above, Let’s Chat is a free and persistent messaging application that runs on Node.js and MongoDB designed for small teams and comes with killer features such as LDAP/Kerberos authentication, a REST-like API, and XMPP support.

Below is how to install it in Ubuntu Linux.

Install Node.js

First, you’ll need Node.js installed on your system. Below is a post that shows you how to install and configure Node.js on Ubuntu Linux.

How to install Node.js on Ubuntu Linux

Install MongoDB

Second, you’ll need MongoDB installed on your system. Below is a post that shows you how to install MongoDB on Ubuntu Linux.

How to install MongoDB on Ubuntu Linux

Install Python

Third, you’ll need Python installed to Let’s Chat. Below is a post that shows you how to install and configure Python on Ubuntu Linux.

How to install Python on Ubuntu Linux

Download and install Let’s Chat

Now that you have met all the requirements, you can continue installing Let’s Chat.

Run the commands below to download the Let’s Chat package via git. If you don’t have git installed, run the sudo apt install git command.

git clone https://github.com/sdelements/lets-chat.git

Next, change the directory (cd) into the Let’s Chat folder and run the commands below.

cd lets-chat
npm install

Next, copy the sample configuration file and start the Let’s Chat server using the commands below.

cp settings.yml.sample settings.yml
npm start

Let’s should be started, and you should be able to access its portal using the server hostname or IP address followed by port number 5000.

http://localhost:5000

However, if you want to use a domain or user-friendly name or improve performance, you may have to set up a proxy server.

Create a reverse proxy server with Let’s Chat

Below are two posts that show you how to set up a reverse proxy server:

You can choose either setup above. However, Nginx provides a better option with Let’s Chat.

If you select Nginx, reverse proxy, install, and create an Nginx server block file.

sudo nano /etc/nginx/conf.d/letschat.conf

Use the below configurations in your proxy to support Let’s Chat.

server {
server_name letschat.example.com;
listen 80;

access_log /var/log/nginx/lets_chat-access.log;
error_log /var/log/nginx/lets_chat-error.log;

location / {
        proxy_set_header   X-Real-IP $remote_addr;
        proxy_set_header   Host      $host;
        proxy_http_version 1.1;
        proxy_set_header   Upgrade $http_upgrade;
        proxy_set_header   Connection 'upgrade';
        proxy_cache_bypass $http_upgrade;
        proxy_pass         http://127.0.0.1:5000;
     }

}

Save the file and exit.

Create a Let’s Chat systemd file

To easily stop and start the Let’s Chat service, go and create a systemd service. You can do that by running the commands below:

sudo nano /etc/systemd/system/letschat.service

Then copy and paste the content below into the file and exit.

[Unit]
Description=Let's Chat Server
Wants=mongodb.service
After=network.target mongod.service

[Service]
Type=simple
WorkingDirectory=/root/lets-chat
ExecStart=/usr/bin/npm start
User=root
Group=root
Restart=always
RestartSec=9

[Install]
WantedBy=multi-user.target

Next, reload the systemd daemon, then start the Let’s Chat service.

sudo systemctl daemon-reload
sudo systemctl start letschat
sudo systemctl enable letschat

Access Let’s Chat portal

Restart Nginx and use the domain name to access the Let’s Chat portal.

Please create an account, log in, and use Let’s Chat.

That should do it!

Conclusion:

This post showed you how to install and use Let’s Chat in Ubuntu Linux. Please use the comment form below if you find any errors above or have something to add.


Discover more from Geek Rewind

Subscribe to get the latest posts to your email.

Like this:



Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Blog at WordPress.com.

Discover more from Geek Rewind

Subscribe now to keep reading and get access to the full archive.

Continue reading