How to host a private Rocket.Chat server
Learn how to self-host a Rocket.Chat server on Windows, macOS, and Linux, and connect with your friends over Meshnet.
Introduction
Having your own private chat server can be beneficial, no matter who you are — a developer talking to your colleagues about the latest project, or a gamer discussing your achievements. While there are many cloud-based chat platforms, self-hosting your server gives you full control over its configuration and security.
Rocket.Chat is an open-source communication platform that many people choose as their server. This platform offers an extensive range of features that cater to teams of all sizes. However, making the server accessible for people outside of your local area network (LAN) can be a tall order. Registering a domain name or opening ports in your firewall are not tasks many individuals want to participate in.
Using Meshnet on your Rocket.Chat server device allows you to connect to the server remotely without any difficult configurations. In addition, you can share the server with your Meshnet peers and work together on joint projects.
This article covers the setup procedure of a private Rocket.Chat server on desktop devices using Docker and showcases how your friends can join the server using Meshnet.
Before you begin
Make sure that you have Docker and Docker Compose V2 installed on your device. Instructions on how to download and install these tools can be found on the Docker website:
Note
Docker Compose comes pre-installed with Docker Desktop.
Deploy Rocket.Chat using Docker
Rocket.Chat requires two Docker containers that are dependent on each other to function. The Docker Compose tool is used to make deploying such multi-container apps easier.
Preparing a Rocket.Chat directory
First, you should create a working directory for your Rocket.Chat instance. This is where all files related to the server will be stored.
To prepare for Rocket.Chat deployment on Windows:
Open PowerShell.
Run the following command to create a new
rocketchat
folder and then navigate to it:Execute the following two
curl
commands to download the Rocket.Chat Docker Compose and environmental files from its GitHub repository:Ensure that both files are present by running the
ls
command.
Both of the required files are now downloaded, and you are ready to start your Rocket.Chat server.
Tip
You can edit the .env
file to alter the properties of your server, such as the bind IP address or the port that the server is running on.
Starting Rocket.Chat
While in the rocketchat
directory, execute the following command in the command line to deploy your Rocket.Chat server.
Docker will pull the resources required for the server and create two containers: one for the MongoDB database, and the other for the Rocket.Chat service.
You can use the docker ps
command to check if both containers are active.
Set up your Rocket.Chat workspace
Now that your server is up and running, it’s time to create your Rocket.Chat workspace, including accounts and channels.
Creating an administrator account
You can start your workspace setup process by accessing the web interface of your Rocket.Chat server.
Open your internet browser.
Navigate to the following URL:
localhost:3000/
On the Admin info page, enter the full name, username, email address, and password of the administrator account. Click Next. Example
On the Organization info page, fill in the required fields about your organization and click Next.
On the Register your workspace page, under Admin email, enter your email address, confirm that you agree with the Terms and conditions and Privacy policy, and then click Register.
Verify your account using the link sent to your email.
After the verification, you should be transferred to the home screen of your Rocket.Chat server.
Adding new users
Now that the server is fully active and you have an administrator account configured, you can add new user accounts for your friends.
On the Rocket.Chat home page, click Add users.
In the upper-right corner, select New user.
Fill in the details for the new user account.
Click Save.
You should now see an entry for the new user on the Users page.
Creating new channels
You also can create various new channels for specific purposes. To create a new channel:
On the Rocket.Chat home page, click Create channel.
Fill in the details for your new channel and select the members you want to include.
Click Create.
The new channel should now be visible in the Channels list on the left.
Disabling the two-factor authentication requirement
By default, Rocket.Chat requires email two-factor authentication for each new user. However, without setting up an SMTP server, the emails are not sent and the users are unable to log in. Since your server is not public and only accessible by your Meshnet peers, you can disable the two-factor authentication requirement entirely.
On your Rocket.Chat home page, in the upper-left corner, select the three-dot menu and choose Workspace.
From the list on the left, select Settings.
Under Accounts, click Open.
Expand the Two factor authentication section.
Turn off the Enable two factor authentication toggle.
In the lower-right corner, click Save changes.
Two-factor authentication is now disabled for all users, and you won’t be required to confirm your identity via email when you log in to your Rocket.Chat server.
Connect to your Rocket.Chat server
Now that your server is fully functional, you can invite your friends to connect over Meshnet using one of the following methods.
Note
If you're hosting Rocket.Chat on a Linux device, you must grant the local network permission for the devices accessing it. For more information, see Common issues on Linux.
Method 1: Using the Rocket.Chat client app
On desktop devices, you can connect to the Rocket.Chat server using Rocket.Chat’s client app.
Download and install the Rocket.Chat desktop app.
You can download the Rocket.Chat installer for Windows from the Rocket.Chat website.
You can download the Rocket.Chat app for macOS from the Mac App Store.
You can download the Rocket.Chat app for Linux from the Snap store
Open Rocket.Chat.
For the server URL, enter
http://<NordName>:3000
, replacing<NordName>
with your Rocket.Chat server’s Nord name. Click Connect.Example
Log in to your Rocket.Chat account.
Now you can conveniently use your Rocket.Chat server from the app.
Note
Rocket.Chat mobile apps do not allow HTTP-only connections. Without setting up SSL certificates, you won’t be able to connect to your Rocket.Chat server using the mobile apps.
Method 2: Using an internet browser
In some cases, installing additional software on the client devices may not be convenient or permitted. In such scenarios, you can access the Rocket.Chat server using an internet browser.
Copy the Nord name of your Rocket.Chat server from the NordVPN application.
Open your internet browser.
In the URL field, paste the copied Nord name followed by
:3000/
and press Enter. Examplesecret.meerkat-everest.nord:3000/
Log in to your Rocket.Chat account.
You can now communicate with other members of your Rocket.Chat server from the convenience of your internet browser on any device.
Last updated