Mac OSX Rocket.Chat Development Environment Setup

You can set up and configure a Rocket.Chat development environment on your macOS system, whether running on Apple Silicon or non-Apple Silicon chips.

Prerequisites

Install the following:

  1. Yarn

  2. Homebrew

Step 1: Clone the Rocket.Chat GitHub project

  1. Fork the Rocket.Chat repository on GitHub. Clone the forked repository to your local dev box using this command:

    git clone https://github.com/<your-username>/Rocket.Chat.git
  1. Navigate into the project directory and configure a remote to connect your local copy and the original Rocket.Chat repository. This allows you to easily pull updates and bug fixes from the main project without needing to clone it again.

    cd Rocket.Chat
    git remote add upstream https://github.com/RocketChat/Rocket.Chat.git

Step 2: Install Node.js

  1. Install Node Version Manager (nvm) with this command:

    brew install nvm

    Confirm that your nvm version is 0.39.2 or higher by running the command nvm --version in your terminal.

  2. 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
  3. Install Node.js, replacing x.x.x with the required Node.js version number obtained from the step above.

    nvm install x.x.x
  4. Check the node version installed by running:

    node -v

    Verify that this is the required version.

Step 3: Set up Deno

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

    cd Rocket.Chat
    cat .tool-versions | grep deno
  2. Install the required version of Deno, replacing x.x.x with the appropriate number:

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

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

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

    deno --version

    Ensure Deno is added to your system's PATH.

Step 4: Install 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.

  1. Confirm the Meteor version version required by your RocketChat project by running this command:

    cd Rocket.Chat
    cat apps/meteor/.meteor/release
  2. Install Meteor with the command below, replacing x.x with the correct version number:

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

    meteor --version

    You should see the installed version displayed in your terminal.

Step 5: Run the Rocket.Chat project

  1. 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

  2. Install all needed packages and proceed to build the Rocket.Chat app with these commands:

    yarn
    yarn build

    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

  3. Start your development server.

    For systems with 16 GB of memory or higher, use this command:

    yarn dev

    For systems with less than 16 GB of memory, use:

    yarn dsv

    The first build can take ten or more minutes. Subsequent dev builds will take lesser time.

    Once it is finished, check your terminal for a message confirming the successful deployment. The local server will now be running on http://localhost:3000.

See troubleshooting if you encounter any issues.

Step 6: 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

You're now ready to contribute. Check out the contribution guide to learn more about the contribution process.