Documentation Index

Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt

Use this file to discover all available pages before exploring further.

Linux and Windows Rocket.Chat Development Environment

Prev Next

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.

  1. 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
  2. Install the required build tools:

    sudo apt install git curl unzip make build-essential python3 g++
  3. Fork the Rocket.Chat repository on GitHub.

  4. From your home directory (~), clone the forked repository:

    git clone https://github.com/<your-username>/Rocket.Chat.git

All steps below must be executed from the Rocket.Chat root folder. Navigate to root folder:

cd Rocket.Chat

Step 1: Setting up Node.js and Yarn

  1. Navigate to the Rocket.Chat root folder and confirm the Node.js version required by your RocketChat project:

    cd Rocket.Chat
    cat package.json | grep -A4 engines | grep node
  2. Install that Node.js version with nvm, replacing x.x.x with the version from the previous step:

    nvm install x.x.x
  3. Verify the installed version:

    node -v
  4. Install Yarn:

    npm install -g yarn

    After installation, you can verify Yarn's version with:

    yarn --version

Step 2: Setting up Deno

  1. Confirm the Deno version required by your RocketChat project:

    cat .tool-versions | grep deno
  2. Install the required Deno version, replacing x.x.x with the version from the previous step:

    curl -fsSL https://deno.land/install.sh | sh -s vx.x.x

    For example:

    curl -fsSL https://deno.land/install.sh | sh -s v1.37.1

    For alternative installation methods, check the official Deno installation documentation.

  3. Reload the shell so the updated PATH is available.

  4. Confirm you have the correct version installed by running:

    deno --version

Step 3: Installing Meteor

Rocket.Chat pins its Meteor version in the .meteor/release file.

  1. Navigate to the Rocket.Chat directory and confirm the Meteor version required by your Rocket.Chat project:

    cd Rocket.Chat
    cat apps/meteor/.meteor/release
  2. Install Meteor, replacing x.x.x with the version from the previous step:

    curl https://install.meteor.com/\?release\=x.x | sh
  3. After installation, verify the version:

    meteor --version

    You should see the installed version displayed in your terminal.

Step 4: Run the Rocket.Chat project

The commands in this step must be run from the Rocket.Chat root folder. Otherwise, MongoDB will not start.

  1. Install all the dependencies:

    yarn
  2. 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 through http://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.