Build a private chat server with a Raspberry Pi and Rocket.Chat

Create your own truly private chat and messaging solution with these simple, cost-effective open source tools.
115 readers like this.
Chat via email

The internet offers plenty of free messaging services. Applications like WhatsApp and Viber are part of our daily life and are the most common way we communicate with relatives and friends. But security awareness is increasing the demand for a truly private chat solution. Furthermore, messaging apps take up a lot of space in our devices, so an alternative chat channel could be useful to share media, info, and contacts with our friends.

Today we are going to see how to install a private chat and messaging server with a Raspberry Pi and Rocket.Chat.

What is Rocket.Chat?

Rocket.Chat is an open source solution that provides an enhanced chat service. It includes collaboration tools like media sharing, screen sharing, and video/audio calling support.

It can be used both via browser or from apps available in all the main app stores (Google Play, App Store, etc.).

In addition to the community version, Rocket.Chat also offers Enterprise and Professional versions, including support and additional features.

What we need

For this project, I’m going to use a cheaper Raspberry Pi 3 model A+. RPI 3 models B and B+, and RPI 4 model B should also work in the same way.

I also suggest a performing SD card, because Rocket.Chat can put a heavy workload on our Raspberry Pi. As discussed in other articles, a performing SD card strongly improves Raspbian OS performance.

We’ll use a lite version of Raspbian with pre-configured WiFi access and SSH service, so there will no need for keyboards or HDMI cables.

Step-by-step procedure

Start by installing the last version of Raspbian Buster Lite.

We’ll simplify Rocket.Chat installation by using Snap. Login via SSH and type from the terminal:

sudo apt-get update
sudo apt-get upgrade

Install Snap:

sudo apt-get install snapd

For Snap installation, we need a system reboot to make it work:

sudo reboot

Login again via SSH and install the Rocket.Chat server with the simple command:

sudo snap install rocketchat-server

After installing from the terminal, please wait a while for Rocket.Chat to initialize its database and services. Have a cup of tea, and after a few minutes you should be able to reach with your browser the address http://<<YOUR_RPI_IP_ADDRESS>>:3000 and you should see the following:

Rocket Chat setup wizard

Complete the required forms, and everything should go fine. After four simple setup windows, you should reach the Rocket.Chat home page:

Rocket Chat home page

Enjoy!

This article originally posted on peppe8o.com, reposted with permission.

What to read next
User profile image.
Lucky husband, open source passionate. Curious by nature. Proud of my roots, happy to mix and learn from different roots

9 Comments

NextCloud Talk also offers a great way to chat... (with other great features!!)

Greetings!

How secure are their notifications considering they use Google FCM (and apple's own) for pushing notifications?

Google FCM and Apple APN are used, based on what I can read in https://rocket.chat/docs/administrator-guides/notifications/push-notifi…, only for mobile devices when you decide to use Rocket.Chat official App. In that page they explain also how to avoid push notification via these components. In my honest opinion, if you want completely secure your connection from these notification, you could use only web interface. Thnak you for sharing your thinking!

In reply to by Serendipity20 (not verified)

Can we Do this On Arduino??

No you can't. Raspberry PI is a mini PC, that acts like a PC/phone. Arduino is a micro controller with very limited power and memory. It can handle only basic commands.

In reply to by Shivam Yadav

Will this work only on your local network or can it be accessed through the internet?

This can be used both for local network and public network. In latter case, you need that your Internet Conenction has a public IP and map ports in your router (usually http/80 and-or https/443). Before this, you should consider enforcing security for your Raspberry PI to avoid external attacks and using a certificate.

In reply to by Albert123 (not verified)

Port forward port 3000 to the address of your rasp pi, and make sure that you have either fixed ip, or use dynamic DNS.

In reply to by peppe8o

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.