Sitemap

Day 0

4 min readDec 18, 2025

This is the day 0 to start with Rocket.Chat, I have setup the project locally using copilot.

# Complete Guide: Setting Up Rocket.Chat Development Environment on macOS

## Introduction

Rocket.Chat is an open-source, secure team communication platform built with TypeScript. If you’re looking to contribute to the project or run it locally for development, this guide will walk you through the entire setup process.

**Prerequisites:**

- macOS system

- Basic terminal knowledge

- Git installed

— -

## Step 1: Install Node Version Manager (nvm)

The first critical step is installing nvm, which allows you to manage multiple Node.js versions on your machine.

### What is nvm?

nvm (Node Version Manager) is a tool that lets you install and switch between different Node.js versions. This is essential because different projects require different Node versions.

### Installation

If you haven’t already installed nvm, run:

```bash

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

```

This script clones the nvm repository to `~/.nvm` and attempts to add the source lines to your profile (~/.bashrc, ~/.zshrc, etc.).

— -

## Step 2: Configure Your Shell Profile

After installing nvm, you need to configure it in your shell profile so it loads automatically when you open a terminal.

### For zsh Users (macOS default)

Create or edit your `~/.zshrc` file:

```bash

cat > ~/.zshrc << ‘EOF’

export NVM_DIR=”$HOME/.nvm”

[ -s “$NVM_DIR/nvm.sh” ] && \. “$NVM_DIR/nvm.sh” # This loads nvm

[ -s “$NVM_DIR/bash_completion” ] && \. “$NVM_DIR/bash_completion” # This loads nvm bash_completion

EOF

```

### Load nvm in Your Current Session

After creating the configuration, load it immediately:

```bash

source ~/.zshrc

```

### Verify nvm Installation

Test that nvm is working:

```bash

nvm — version

```

You should see the nvm version number (e.g., `0.39.7`).

— -

## Step 3: Clone the Rocket.Chat Repository

Now that nvm is set up, clone the Rocket.Chat repository:

```bash

git clone https://github.com/RocketChat/Rocket.Chat.git

cd Rocket.Chat

```

— -

## Step 4: Understand Node Version Requirements

Rocket.Chat specifies its Node.js requirements in the `package.json` file.

Check the required Node version:

```bash

cat package.json | grep -A 5 ‘“engines”’

```

For this setup, Rocket.Chat requires:

- **Node**: 22.16.0

- **Yarn**: 4.11.0

— -

## Step 5: Create .nvmrc File

The `.nvmrc` file tells nvm which Node version to use for this project. Create it in the project root:

```bash

echo “22.16.0” > .nvmrc

```

This file contains just the version number. When you navigate to the project directory and run `nvm use`, it automatically switches to this version.

— -

## Step 6: Install Node.js with nvm

Now install the required Node version:

```bash

nvm install 22.16.0

```

This command:

1. Downloads Node.js version 22.16.0

2. Verifies the checksum

3. Installs it locally on your machine

4. Sets it as the default version

**Output example:**

```

Downloading and installing node v22.16.0…

Downloading https://nodejs.org/dist/v22.16.0/node-v22.16.0-darwin-arm64.tar.xz...

Computing checksum with sha256sum

Checksums matched!

Now using node v22.16.0 (npm v10.9.2)

Creating default alias: default -> 22.16.0 (-> v22.16.0)

```

— -

## Step 7: Activate the Correct Node Version

Use the specified Node version for this project:

```bash

nvm use

```

You should see:

Get Shashank Kumar’s stories in your inbox

Join Medium for free to get updates from this writer.

```

Found ‘/Users/[username]/path/to/Rocket.Chat/.nvmrc’ with version <22.16.0>

Now using node v22.16.0 (npm v10.9.2)

```

— -

## Step 8: Verify Installation

Confirm that the correct versions are installed:

```bash

node — version

```

Expected output: `v22.16.0`

```bash

npm — version

```

Expected output: `10.9.2` (comes with Node)

Check nvm is working:

```bash

nvm — version

```

Expected output: `0.39.7` (or similar)

— -

## Step 9: Install Project Dependencies (Optional Next Steps)

Now that your Node environment is set up, you can proceed with installing Rocket.Chat dependencies:

**For Yarn:**

```bash

yarn install

```

**For npm:**

```bash

npm install

```

Note: Rocket.Chat uses Yarn as the package manager (version 4.11.0 is required).

— -

## Troubleshooting Common Issues

### Issue: “nvm: command not found”

**Solution:** You likely missed Step 2. Verify that your `~/.zshrc` file contains the nvm initialization code:

```bash

cat ~/.zshrc | grep “NVM_DIR”

```

If it’s empty, run the configuration commands from Step 2 again and reload your shell.

### Issue: “No .nvmrc file found”

**Solution:** Make sure you’re in the Rocket.Chat project directory and have created the `.nvmrc` file as described in Step 5.

```bash

ls -la .nvmrc

```

### Issue: Node version doesn’t switch automatically

**Solution:** Make sure you’re using the correct shell. Check:

```bash

echo $SHELL

```

If it’s not `/bin/zsh`, update your shell configuration for the one you’re using.

— -

## Automatic Node Switching (Bonus)

After this setup, every time you navigate to the Rocket.Chat project directory in a new terminal, nvm will automatically use version 22.16.0. Just ensure you have the `.nvmrc` file in your project root.

— -

## Directory Structure After Setup

After completing all steps, your directory should look like:

```

Rocket.Chat/

├── .nvmrc (Node version specification)

├── package.json (Project dependencies)

├── apps/

│ └── meteor/

├── packages/

├── README.md

└── … (other files)

```

— -

## Next Steps

Now that your development environment is ready, you can:

1. **Install Dependencies**: Run `yarn install` to install all project dependencies

2. **Start Development Server**: Refer to Rocket.Chat’s official documentation

3. **Contribute**: Check out the [Contributing Guide](https://github.com/RocketChat/Rocket.Chat/blob/develop/CONTRIBUTING.md)

4. **Join the Community**: Connect with other developers on the [Rocket.Chat Community Server](https://open.rocket.chat)

— -

## Useful Resources

- [nvm GitHub Repository](https://github.com/nvm-sh/nvm)

- [Rocket.Chat Developer Documentation](https://developer.rocket.chat/)

- [Node.js Official Website](https://nodejs.org/)

- [Rocket.Chat GitHub Repository](https://github.com/RocketChat/Rocket.Chat)

— -

## Summary

Here’s a quick recap of the setup process:

1. ✅ Install nvm

2. ✅ Configure ~/.zshrc with nvm initialization

3. ✅ Clone Rocket.Chat repository

4. ✅ Check Node version requirements in package.json

5. ✅ Create .nvmrc file with the required Node version

6. ✅ Install Node 22.16.0 using nvm

7. ✅ Activate the correct Node version

8. ✅ Verify all installations

You’re now ready to contribute to or develop with Rocket.Chat! Happy coding! 🚀

— -

**Author’s Note:** This guide is based on the setup experience for Rocket.Chat on macOS. While most steps apply to other Unix-based systems, Windows users may need to use alternative tools like nvm-windows or Windows Subsystem for Linux (WSL).