How to connect MongoDB tunnel with Robo 3T

Goal

In this tutorial, we’ll explain how to connect the Platform.sh MongoDB using SSH tunnel with a MongoDB GUI such as Robo 3T

Preparation

This tutorial assumes you have

Problems

The simplest way to run a project locally is to use a tethered development environment - that means running a local web server, but keeping all other services on Platform.sh and connecting to them over an SSH tunnel. Furthermore, you can check the production data using a GUI interface such as Robot 3T.

Steps

  1. Download the project using the platform-cli

  2. platform get <PROJECT_ID>

  3. Go into the project folder:

  4. cd PROJECT_NAME

  5. Open the SSH tunnel with the following command:

  6. platform tunnel:open

image2
4. Based on the tunnel output information, that is time to create a new connection from Platform.sh tunnel.
image3
image1
5. The last step is to check the connection using the “Test” button.
image4
6. Done, you can save and use this connection while the tunnel is open.