Setting up a Rocket.Chat development environment allows you to contribute to the platform’s development. This document will walk you through the essential steps to get your development environment up and running efficiently on Windows and Linux.
Prerequisites
At least 12GB RAM is required for building in a development environment. For deployment and other uses, 2GB RAM suffices
Use a standard user account (not root) for setup. Avoid using sudo to prevent potential file permission issues
The sample Linux distribution for this guide is Ubuntu. However, the steps are similar for other Linux distributions.
Software requirements
Windows 10, version 2004 or above
Install and configure WSL 2 following the Microsoft documentation. The default Linux distribution to be installed is Ubuntu.
Download and install the latest Linux kernel updates
Install nvm to manage your Node.js version
Machine requirements
To set up Rocket.Chat development environment, you'll require a Windows machine that meets the following minimum specifications:
12 GB of RAM (16+ GB highly recommended)
Four or more cores on CPU (at least 3 GHz boosted, 4.2 GHz or higher recommended)
80 GB of available fast SSD storage (PCIe 4.0 NVMe SSD recommended)
All the steps for the Windows development environment must be performed within the Ubuntu WSL 2 shell.
Open Ubuntu shell on your Windows or Linux environment and update the distro by running this command:
sudo apt update && sudo apt dist-upgrade -y
Install the necessary build tools:
sudo apt install git curl unzip make build-essential python3 g++
Fork the Rocket.Chat repository on GitHub
Open the Ubuntu shell and navigate into the (~/home/your username) directory. Clone the forked repository by running the command below:
git clone https://github.com/<your-username>/Rocket.Chat.git
All the steps below must be completed within the Rocket.Chat root folder. Run
cd Rocket.Chat
to achieve this.
Step 1: Setting up Node.js and Yarn
Confirm the Node.js version required by your RocketChat project by executing the following command:
cd Rocket.Chat cat package.json | grep -A4 engines | grep node
Install Node.js using nvm by running:
nvm install x.x.x
Replace
x.x.x
with the required Node.js version number obtained from the previous step.Check the node version installed by running:
node -v
Ensure this is the required version.
Install Yarn by running:
npm install -g yarn
After installation, you can verify Yarn's version with:
yarn --version
Step 2: Setting up Deno
Confirm the Deno version version required by your RocketChat project by running this command:
cd Rocket.Chat cat .tool-versions | grep deno
Install the required version of Deno, replacing
x.x.x
with the appropriate number for example:curl -fsSL https://deno.land/install.sh | sh -s v1.37.1
For alternative installation scripts, check the official Deno installation documentation.
Confirm you have the correct version installed by running:
deno --version
Ensure Deno is added to your system's PATH
Step 3: Installing Meteor
Note: Depending on the Rocket.Chat version, you may need to install a specific Meteor version:
For Rocket.Chat <=6.x.x, use Meteor 2.x
For Rocket.Chat >=7.x.x, use Meteor 3.x
Always verify the required Meteor version for your Rocket.Chat instance by checking the .meteor/release file.
Confirm the Meteor version version required by your RocketChat project by running this command:
cd Rocket.Chat cat apps/meteor/.meteor/release
Install Meteor with the command below, replacing
x.x
with the correct version number:curl https://install.meteor.com/\?release\=x.x | sh
After installation, verify the version by running:
meteor --version
You should see the installed version displayed in your terminal.
Step 4: Run the Rocket.Chat project
Navigate into the Rocket.Chat directory and install all the dependencies by running these commands:
cd Rocket.Chat yarn
Navigating into the specified directory above is necessary, otherwise, MongoDB won't start
When completed, build and run the server by executing this command:
yarn dsv
The first build can take ten or more minutes. Subsequent dev builds will take lesser time.
During the build, you may notice warnings about peer or transitive dependencies. These are typically safe to ignore unless you are developing the specific features or modules that require them
A successful running server will open up port
3000
on your machine where you can access Rocket.Chat using any browser or the Rocket.Chat client app throughhttp://localhost:3000
.
Step 5: Edit Rocket.Chat files
The recommended IDE is Visual Studio Code. To edit Rocket.Chat files,
Launch your IDE and open the cloned repository folder in your IDE
When you make changes to Rocket.Chat the server will automatically rebuild
Sometimes, changes can shut down the server. If that happens, run
yarn dsv
again
References
If you encounter any issues during the setup, refer to the development environment troubleshooting guide for assistance.
Now that your development server is running, you can contribute to the Rocket.Chat server! See participate in Rocket.Chat development to learn more about Rocket.Chat contributions.