Navigation

Enable Wire Protocol Connections

On this page

Overview

You must enable wire protocol connections for a linked MongoDB cluster before you can connect to a Realm app with a connection string. You can enable wire protocol connections for a cluster in the Realm UI or by importing an updated MongoDB service configuration:

Procedure

1
2

Enable Connection Strings For the Cluster

Set the toggle for MongoDB Connection String to Enabled and click Save.

../../_images/enable-wire-protocol.png
1

Export Your Realm Application

To enable wire protocol connections with realm-cli you need to export an application directory for your application. You can export your application from the Export tab of the Settings page in the Realm UI, or by running the following command from an authenticated instance of realm-cli:

realm-cli export --app-id=<App ID>
2

Enable Wire Protocol for the Cluster

The config.json configuration file in the linked cluster’s service directory configures wire protocol connections.

In the configuration file, set config.wireProtocolEnabled to true:

{
  "config": { "wireProtocolEnabled": true }
}
3

Import Your Application Directory

Save the cluster configuration file, then navigate to the root of the exported application directory and run the following command to import the directory:

realm-cli import