Docs Menu

Enable Realm Syncicons/link.png

On this page

  • Overview
  • Prerequisites
  • Enable Partition-Based Sync
  • Enable Flexible Sync

You can enable Realm Sync via the Realm app UI, Realm CLI, or the Realm Admin API. If it is your first time enabling Sync, the UI is a great choice because it walks you through the required steps.

If you're re-enabling it after pausing or terminating it, see: Resume or Re-Enable Sync.

While you are configuring Realm Sync, you must define the data access patterns and rules for your Realm app. If you haven't already decided how you want to configure your data model and access Sync, see:

Important

Before defining sync rules and enabling sync, you must specify at least one valid schema for a collection in the synced cluster unless you are using development mode.

At a minimum, the schema must define _id and the field that you intend to use as your partition key. A partition key field may be a string, integer, or objectId.

For more details on how to define a schema, see Enforce a Schema.

Important

Flexible Sync is currently in preview. We encourage you to try out the feature and give feedback, but please be aware that:

  • Configuration details may change.
  • SDK API implementation details may change.

We do not recommend using Flexible Sync in production applications while it is still in preview.

Note
Flexible Sync Prerequisites

Enabling Flexible Sync in Your Node.js Application requires the following:

  • A non-sharded MongoDB Atlas cluster running MongoDB 5.0 or greater
  • A Realm app without Partition-Based Sync enabled. While Flexible Sync is in preview, you cannot use Flexible Sync & Partition-Based Sync in the same Realm app.
Give Feedback
MongoDB logo
© 2021 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2021 MongoDB, Inc.