Gitpod Rocket.Chat Development Environment Setup

The quickest way to set up a Rocket.Chat development environment is by using Gitpod. Gitpod offers a shared workspace for open-source project developers, including those working on SaaS projects like Rocket.Chat. It provides a hosted development environment accessible through a web browser, allowing you to contribute to Rocket.Chat conveniently.

This documentation is based on Gitpod Flex.

Follow the steps below to set up your Rocket.Chat development environment in Gitpod.

Prerequisites

  1. Create a GitHub account

  2. Sign up for a Gitpod account

  3. Generate a GitHub Personal Access Token (PAT) if you don’t already have one

  4. Set up a runner for your Gitpod development environment using one of the following options:

    1. Gitpod Desktop for local development

    2. Remote self-hosted runners such as AWS

  5. Fork the Rocket.Chat GitHub repository to your GitHub account

Step 1: Create a Gitpod environment

Once your runner is ready:

  1. Navigate to Gitpod’s environment setup page

  2. Provide the URL of your forked Rocket.Chat repository

  3. Specify the environment class for your setup, i.e., the runner

Step 2: Authenticate and connect to GitHub

  1. Generate a PAT (if you don't already have one)

  2. Add this token to your Gitpod account to enable authentication and repository access

Step 3: Launch the project

  1. Start the Gitpod environment for your forked Rocket.Chat repository.

  2. The environment launch may take a few minutes as it processes the following:

    1. Clone the repository

    2. Load secrets (environment variables) and automation

    3. Start the development container

Working with Rocket.Chat

  • Open Rocket.Chat in VS Code: Once the environment is running, click Open VS Code in the top-right corner of the Gitpod workspace. This will open the Rocket.Chat project in VS Code

  • Start the Rocket.Chat server: In the Gitpod environment page, scroll down to the Services section. Click on the Start button to build the project; this will run the necessary build commands

  • Verify port 3000: Open the terminal in VS Code. Navigate to the Ports tab and confirm that port 3000 is open with the dev container origin

  • Access the application: Open your browser and navigate to http://localhost:3000. You should see your Rocket.Chat app running

  • Make changes: Edit files directly in the VS Code instance. Rebuild the project by starting or stopping services as needed to see your changes reflected in the browser.

Always pull the latest changes from the Rocket.Chat upstream repository to stay up to date.

Following these steps, you can set up your development environment and start contributing to Rocket.Chat. To learn more about the contribution process, check out the contribution guide.