Install Rocket.Chat with Docker Compose
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:
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:
Hit the “i” button to go into edit mode, then insert the following configuration for Rocket.Chat to work.
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.
Now let’s start Rocket.Chat with the command:
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.
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.
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.
Click on the “Register” button.
An email with a link to register your Rocket.Chat server will be sent to the email address specified earlier.
Find the letter and click on the “Verify registration” button.
The server has been successfully registered.
Welcome to RocketChat.
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”.
Go to the “Connectivity Services” section and click on the “Login to Rocket.Chat Cloud” button.
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.
Click on the “Authorize” button to get access to the app store and other Rocket.Chat services.
Login with Rocket.Chat Cloud account successfully completed.
Also under “Workspaces” on the Rocket.Chat website, you will see your registered Rocket.Chat server.
Download links for the Rocket.Chat client can be found on the official Rocket.Chat website.