This article is for those looking for a detailed and straightforward guide on installing Rocket.Chat with Docker Compose.

Rocket.Chat is an open-source messenger that supports group chats, file sharing, video conferencing, bots and more. Rocket.Chat can be installed on your own server and then chat using the web interface, personal computer or mobile device.

In this guide, we will consider the case when you already have a server with the Ubuntu Server 22.04 LTS operating system installed on it.

You can read more about how to install Ubuntu Server 20.04 LTS in my guide “Install Ubuntu Server 22.04 LTS”.

Also, the server must have Docker Engine and Docker Compose installed.

You can learn how to install Docker Engine and Docker Compose on Ubuntu Server by reading “Install Docker Engine and Docker Compose on Ubuntu Server”.

In addition, OpenSSH must be installed on the server, and port 22 must be open in order to be able to connect to the server using the SSH protocol.

To install OpenSSH on a server, you can use the command:

sudo apt install openssh-server

If you plan to connect to the server using the Windows operating system, you can use PuTTY or MobaXterm.

This guide describes how to connect to a server using the iTerm2 terminal emulator installed on the macOS operating system.

Please note that you will need to open the following TCP ports to access your server:

  • TCP port 80 - to receive a free cryptographic certificate through the Let’s Encrypt CA.
  • TCP port 443 - to access the Rocket.Chat web interface.

We connect to the server on which you plan to install Docker Compose.

Now you need to create a YAML configuration file that will contain all the necessary conditions for Docker Compose to work.

Let’s create a YAML configuration file using a text editor using the command:

vim rocketchat-traefik-letsencrypt-docker-compose.yml

Install Rocket.Chat with Docker Compose

Hit the “i” button to go into edit mode, then insert the following configuration for Rocket.Chat to work.

Install Rocket.Chat with Docker Compose

Next, you need to make changes to the configuration so that the contents of the file match your conditions. Parameters that need to be checked or changed are marked “(replace with yours)”.

In this guide, the rocketchat.heyvaldemar.net subdomain will be used to access Rocket.Chat from the Internet. You will need to specify your domain or subdomain by which your Rocket.Chat will be accessible from the Internet.

Please note that in this guide, Postgres will be used as a database management system, and Traefik will be used as a reverse proxy.

In the “traefik.http.middlewares.authtraefik.basicauth.users” parameter, you must specify the username and password hash to access the Traefik dashboard.

Please note that you can use this service to get the password hash.

Now press the “Esc” button to exit edit mode, then type “:x” and press the “Enter” button to save your changes and exit the editor.

Install Rocket.Chat with Docker Compose

Now let’s start Rocket.Chat with the command:

docker compose -f rocketchat-traefik-letsencrypt-docker-compose.yml -p rocketchat up -d

Install Rocket.Chat with Docker Compose

Now you need to wait a few minutes, then to continue the Rocket.Chat installation process, you need to go from the workstation to the link https://rocketchat.heyvaldemar.net, where rocketchat.heyvaldemar.net is the name of my server. Accordingly, you need to provide the name of your server with Rocket.Chat installed.

Next, you need to create a new user who will have administrator rights in Rocket.Chat.

In the “First and last name” field, specify the first and last name for the new Rocket.Chat user.

In the “Username” field, specify the login for the new Rocket.Chat user.

In the “Company email” field, specify the current email address for the new Rocket.Chat user.

In the “Password” field, specify a strong password for the new Rocket.Chat user.

Click on the “Next” button.

Установка Rocket.Chat на Ubuntu Server

Now you need to fill in information about your organization.

Enter the name of your organization in the “Organization name” field.

In the “Organization type” field, specify the type of your organization.

In the “Organization industry” field, specify the profile of your organization.

In the “Organization size” field, specify the number of employees in your organization.

In the “Country” field, indicate the country in which your organization operates.

Click on the “Next” button.

Установка Rocket.Chat на Ubuntu Server

Now you need to register your server in order to use services such as mobile push notifications and others from Rocket.Chat Technologies Corp.

Enter a valid email address in the “Cloud account email” field.

Now you need to read and accept the terms of use of the services provided.

Click on the “Register” button.

Установка Rocket.Chat на Ubuntu Server

An email with a link to register your Rocket.Chat server will be sent to the email address specified earlier.

Установка Rocket.Chat на Ubuntu Server

Find the letter and click on the “Verify registration” button.

Установка Rocket.Chat на Ubuntu Server

The server has been successfully registered.

Установка Rocket.Chat на Ubuntu Server

Welcome to RocketChat.

Установка Rocket.Chat на Ubuntu Server

Now you need to sign in with your Rocket.Chat Cloud account to access the app store and other Rocket.Chat services.

Click on the user icon in the upper left corner of the screen and select “Administration”.

Установка Rocket.Chat на Ubuntu Server

Go to the “Connectivity Services” section and click on the “Login to Rocket.Chat Cloud” button.

Установка Rocket.Chat на Ubuntu Server

If you do not already have an account on the Rocket.Chat website, please register by clicking on the “Create account” button for more options to manage your Rocket.Chat workspace.

If you already have an account on the Rocket.Chat website, then in the “Email” field, enter the email address associated with your Rocket.Chat Cloud account to receive a login link. You can also specify a password by clicking on the “Enter password instead” button.

Установка Rocket.Chat на Ubuntu Server

Click on the “Authorize” button to get access to the app store and other Rocket.Chat services.

Установка Rocket.Chat на Ubuntu Server

Login with Rocket.Chat Cloud account successfully completed.

Установка Rocket.Chat на Ubuntu Server

Also under “Workspaces” on the Rocket.Chat website, you will see your registered Rocket.Chat server.

Установка Rocket.Chat на Ubuntu Server

Download links for the Rocket.Chat client can be found on the official Rocket.Chat website.