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
Create a GitHub account
Sign up for a Gitpod account
Generate a GitHub Personal Access Token (PAT) if you don’t already have one
Set up a runner for your Gitpod development environment using one of the following options:
Gitpod Desktop for local development
Remote self-hosted runners such as AWS
Fork the Rocket.Chat GitHub repository to your GitHub account
Step 1: Create a Gitpod environment
Once your runner is ready:
Navigate to Gitpod’s environment setup page
Provide the URL of your forked Rocket.Chat repository
Specify the environment class for your setup, i.e., the runner
Step 2: Authenticate and connect to GitHub
Generate a PAT (if you don't already have one)
Add this token to your Gitpod account to enable authentication and repository access
Step 3: Launch the project
Start the Gitpod environment for your forked Rocket.Chat repository.
The environment launch may take a few minutes as it processes the following:
Clone the repository
Load secrets (environment variables) and automation
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 runningMake 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.