ManagedCloud Servers

High performance handled and monitored by us 24/7/365. A complete solution to provide you with our in house expertise 24/7 tailored to your specific needs. We'll setup a bespoke server for your site using the latest tehnologies so you can get the most out of your hardware and get your website loading quickly and reliably. Find out more..

cPanelCloud Servers

Recommended - High performance cloud servers with no technical knowledge required. If you're hosting multiple websites already and you're looking to consolidate, or if you're looking to isolate yourself from the shared hosting environment but you don't have the time or knoweldge to manage a server, then the Managed cPanel Servers are for you. Find out more..

UnmanagedCloud Servers

Our unmanaged range gives you complete control at rock bottom prices and our cloud platform boasts super fast multipath 40Gb/s network, the latest Intel Xeon V3 CPUs and enterprise grade redundant SSDs. If you're a sysadmin look no further, we offer some of the best specification to price ratio servers available. Find out more..

Want your very own server? Get our 1GB memory, Xeon V4, 20GB SSD VPS for £10.00 / month.

View Plans

How to Install Let’s Chat on CentOS 7

Let's Chat is a free, open source chat application. It is very lightweight and written in Node.js. It uses MongoDB to store the application data. Let's Chat has many features such as LDAP Authentication, XMPP multi user chat, Desktop notifications, Private chat rooms, File uploads etc. The application is available in more than 18 languages.

In this tutorial, we will learn to install Let's Chat on CentOS 7.


Let's Chat can be installed on a server with a small amount of memory. The requirement of RAM increases as the number of users increases. You will also need a minimal installation of CentOS 7 with root access on it. If you are logged in as a non-root user, you can run sudo -i to switch to root user.

Installing Let's Chat

Before installing any package it is recommended that you update the packages and repository using the following command.

yum -y update

Once your system is updated, you will need to install Node.js. To install the latest version of Node.js from the nodesource repository, run the following command.

curl --silent --location | bash - yum -y install nodejs

Let's Chat uses MongoDB to store its data. MongoDB community version is not found on the YUM repository hence you need to install the MongoDB repository. Create a new repo file using the following command.

nano /etc/yum.repos.d/mongodb-org.repo

If you don't have nano installed, you can install it using yum -y install nano. Paste the following lines into the file and save the file and exit the editor using CTRL-O followed by CTRL-X.

name=MongoDB Repository

Now you can install MongoDB using the following command.

yum -y install mongodb-org

The above command will install four packages named mongodb-org-server, mongodb-org-mongos, mongodb-org-shell and mongodb-org-tools.

Start MongoDB and enable it to start at boot time using the following commands.

systemctl start mongod systemctl enable mongod

Once you have installed MongoDB, you will need to install Python 2.7. Download the Python Source using following command.

cd /tmp wget

To compile and install the code, you will need to install GCC. Run the following command to install GCC.

yum -y install gcc

Now extract the archive using the following command.

tar xzf Python-2.7.13.tgz

Compile and install the software using following commands.

cd Python-2.7.13 ./configure make altinstall

It will take few minutes to install the software. Once Python is installed, you can run the following command to check if it is successfully installed.

python2.7 -V

You can also create a soft link to the file using the following command, so that you can run python command instead of python2.7.

ln -s /usr/local/bin/python2.7 /usr/local/bin/python

You will also need to install Git to clone the Let's Chat files. Run the following command for same.

yum -y install git

Once the dependencies are installed, you can now proceed to install Let's Chat. Clone the project to your local computer using the following command.

cd /var git clone cd lets-chat

Run the following command to install the application.

npm install

Once you have installed the application, you can now copy the configuration file using the following command.

cp settings.yml.sample settings.yml

You can also configure the settings by editing settings.yml file. You can now start the server using the following command.

npm start Once you run the above command, you will see following output.
[root@liptan-pc lets-chat]# npm start

> lets-chat@0.4.8 start /var/lets-chat > node app.js

██╗ ███████╗████████╗███████╗ ██████╗██╗ ██╗ █████╗ ████████╗ ██║ ██╔════╝╚══██╔══╝██╔════╝ ██╔════╝██║ ██║██╔══██╗╚══██╔══╝ ██║ █████╗ ██║ ███████╗ ██║ ███████║███████║ ██║ ██║ ██╔══╝ ██║ ╚════██║ ██║ ██╔══██║██╔══██║ ██║ ███████╗███████╗ ██║ ███████║ ╚██████╗██║ ██║██║ ██║ ██║ ╚══════╝╚══════╝ ╚═╝ ╚══════╝ ╚═════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝

Release 0.4.8

Your application is now running on http://YourServerIP:5000. To stop the application you can press the combination of Ctrl + C buttons.

Now we will need to create a Systemd service so that application can be started and stopped as service.

To create the systemd service file, run the following command.

nano /etc/systemd/system/letschat.service

Copy and paste the following contents in the file.

Description=Let's Chat Server
Wants=mongodb.service mongodb.service

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


Save the file and exit from the editor.

You can now start the application using the following command.

systemctl start letschat

To enable the application to automatically start at boot time run the following command.

systemctl enable letschat

You can check the status of the service using the following command.

systemctl status letschat

Instead of accessing the application on port 5000, you should create a reverse proxy for your application with either Apache or nginx. In this tutorial, we are going to use Apache as the reverse proxy for your application. We will also secure the application using Let's Encrypt free SSL. If you want to use more secure and trusted SSL certificates, you can purchase SSL certificates from HostPresto also.

Install Apache web server and mod_ssl using the following command.

yum -y install httpd mod_ssl

Now start Apache web server and enable it to automatically start at boot time using the following commands.

systemctl start httpd systemctl enable httpd

Now we will need to generate SSL certificates from Let's Encrypt client. To install Let's Encrypt client also called Certbot, run the following command.

yum -y install python-certbot-apache

Once the installation finishes, run the following command to obtain the SSL certificates from Let's Encrypt. Make sure that your domain is pointed to the server, the Let's Encrypt will check the domain authority before providing the certificates.

certbot certonly --apache -d

This command will run Let's Encrypt client to obtain the certificates only but not to install it. --apache tells the client to use Apache web server for authentication of domain authority. -d tells the domain name for which the certificates needs to be obtained. It may ask you which SSL configuration to use during authentication, choose ssl.conf. All the changes made to the file will be automatically restored. Finally, provide your email address and accept the terms and condition. Once the certificates are generated, they are likely to be stored in the following directory.


Where is your actual domain. In the directory, you will find cert.pem which is your domains certificate and privkey.pem which is your certificate's private key.

Let's Encrypt SSL expires in 90 days, so it is recommended to set an automatic renewal for your certificates. Run the following command to open your crontab file.

crontab -e

Enter the following line into the crontab file.

30 1 * * 1 /usr/bin/certbot renew >> /var/log/le-renew.log

The above cron job will automatically run every Monday at 1:30 AM and if your certificates are due for expiry, it will automatically renew them.

As our SSL certificates are now generated, we can proceed further to configure httpd configuration file. Create a new virtual host file using the following command.

nano /etc/httpd/conf.d/

Replace with your actual domain. Now copy and paste the following lines into the file.

<VirtualHost *:80>  
  Redirect permanent /

TransferLog /var/log/httpd/yourdomain.com_access.log ErrorLog /var/log/httpd/yourdomain.com_error.log


<VirtualHost *:443> ServerName ServerAdmin

SSLEngine On SSLCertificateFile /etc/letsencrypt/live/ SSLCertificateKeyFile /etc/letsencrypt/live/

ProxyPreserveHost On ProxyPassMatch ^/sockjs/(.*)/websocket ws://localhost:5000/sockjs/$1/websocket ProxyPass / http://localhost:5000/ ProxyPassReverse / http://localhost:5000/

TransferLog /var/log/httpd/yourdomain.com_ssl_access.log ErrorLog /var/log/httpd/yourdomain.com_ssl_error.log


In the above configuration change to your actual domain. Also, make sure that the path to your SSL certificate and private key are correct. Once done, you will have to restart your Apache server so that the changes made can take effect.

systemctl restart httpd

Now you can start the Let's Chat service if not started already using the following command.

systemctl start letschat

Now you will need to disable your SELinux because reverse proxy does not work with SELinux policies. To temporary disable SELinux without restarting the server, run the following command.

setenforce 0

To completely disable the SELinux you will need to edit the /etc/selinux/config file.

nano /etc/selinux/config

If you don't have nano installed, you can install it using yum -y install nano Find the following line:


Change it to:


Now you will need to reboot your server so that the new configuration can take effect. Once the server is up again you can access your application at the following URL.

You will see following login screen.

Click on I need an account link and fill out all the required information and click Register button.

Once the account is created, you can login using your newly created account. Once logged in you will see the following screen.


In this tutorial, we have learned how to install Let's Chat on CentOS 7 Server. You can now deploy the application on your own server to collaborate and communicate in your office to increase the productivity.

Want your very own server? Get our 1GB memory, Xeon V4, 20GB SSD VPS for £10.00 / month.

View Plans