Gitpod
    • Dark
      Light
    • PDF

    Gitpod

    • Dark
      Light
    • PDF

    Article summary

    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.

    Set up a Rocket.Chat development environment in Gitpod

    To set up a Rocket.Chat environment on Gitpod,

    1. Go to Gitpod.

    2. Create a New Workspace. Enter the Rocket.Chat GitHub project URL or the link to your forked Rocket.Chat repo.

    3. Initiate your workspace and, if needed, connect it to your GitHub account. This will set up a workspace with a familiar Visual Studio Code environment.

    4. Next, launch a terminal within your workspace and proceed to install Meteor with the command below, passing the required Metoer release:

      curl https://install.meteor.com/?release=x.x | sh

      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

      See the Rocket.Chat meteor release to confirm the required Metoer version for Rocket.Chat before installing.

      Alternatively, you can streamline the process by running this command:

      curl https://install.meteor.com/?release=$(
          curl -so- https://raw.githubusercontent.com/RocketChat/Rocket.Chat/develop/apps/meteor/.meteor/release | cut -d@ -f2
      ) | sh

      Expect warning messages during this process, and keep in mind that sudo (root access) is not necessary on Gitpod.

    5. Add the newly installed meteor to your path by running this command:

      export PATH=$PATH:/home/gitpod/.meteor
    6. Install Deno by following the official Deno installation guide

      Only Deno versions >=1.37.1 and <2.0.0 are supported.

    7. Install the node dependencies with this command:

      yarn

      You might encounter an error if your Node version doesn't meet Rocket.Chat's requirements. Check the release notes for the compatible Node.js version and install it accordingly.

    8. Set your ROOT_URL. Your Rocket.Chat server may produce unexpected results without it.

      export ROOT_URL=$(gp url 3000)
    9. Finally, build and start the Rocket.Chat server.

      yarn dsv # it will build the sub projects and then run meteor project

    The code is spread through the folders, packages/ and apps/meteor. After a few minutes, your development environment will be up and running.

    Once the server starts, you have three options to access the Rocket.Chat live environment:

    • Popup window: A popup window will appear, confirming that your server is active on port 3000. Click the "Open Browser" button in this popup to access your Rocket.Chat server instance.

    • Terminal confirmation: Check your terminal for a message confirming that the Rocket.Chat server is successfully deployed and running on port 3000. This message includes the port number, making it easy to verify.

    • Navigate to port in terminal: In VS Code’s terminal, locate port 3000. Clicking on this will open the Rocket.Chat environment directly.

    Once you’ve confirmed the deployment, you can edit the code directly in Gitpod’s code editor. All changes will reflect immediately in the Gitpod browser window, allowing you to see updates in real time.

    You can now start contributing to Rocket.Chat. To learn more about the contribution process, check out the contribution guide.


    Was this article helpful?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.
    ESC

    Eddy AI, facilitating knowledge discovery through conversational intelligence