Local-first data

Offline Protocol vs Realm and Atlas Device Sync

Realm is a mobile database that runs inside the app on the device, and Atlas Device Sync kept Realm databases in sync with MongoDB Atlas. MongoDB deprecated the Atlas Device SDKs and Device Sync in September 2024 and set their end of life and removal for September 30, 2025; the on-device database continues as an open-source project, with community branches that remove the sync code. Offline Protocol is not a Realm replacement for syncing MongoDB data to devices. It replaces a narrower part of what some teams used sync for, keeping nearby devices in step with each other, and it can sit beside Realm's community database in the same app.

TL;DR

With Atlas Device Sync removed, a Realm sync app has to replace its local queries, MongoDB sync, permissions and sign-in. A backend sync engine such as PowerSync is the closer replacement for MongoDB data. Offline Protocol fits when nearby devices must share state while the backend is out of reach, and it can run beside Realm's community database.

Learning objectives

After reading this article you will be able to:

  • State what MongoDB deprecated in the Atlas Device SDKs and when it was removed
  • Compare what a Realm sync app relied on with what Offline Protocol provides
  • Choose a path for a Realm app that needs server sync, device-to-device sync, or both

Realm and Atlas Device Sync end of life

As MongoDB’s documentation sets out, the Atlas Device SDKs were deprecated as of September 2024, and they reached end of life and were removed on September 30, 2025. The SDKs had two parts: the on-device database, which continues as an open-source project, and Atlas Device Sync, which apps had to replace or remove before that date.

Other App Services features went with them. MongoDB’s deprecation pages say that App Services authentication and user management, which the Device SDKs were the main entry point for, is no longer available after the SDKs’ end of life, and that data access permissions (rules and roles) and the App Services wire protocol are deprecated too. Database triggers remain available in the Atlas UI.

For the database, MongoDB points to community branches of the C++, Flutter, Kotlin, .NET, JavaScript and Swift SDKs that remove the Device Sync code. The Realm JS repository states that Realm JS and Realm Core are published under the Apache License 2.0, and that a version without sync features can be installed from community on npm or taken from the community branch.

Replacing Realm Device Sync features

A Realm app with Device Sync typically needs a replacement for each thing it leaned on: a local database with queries, automatic two-way sync of that data with MongoDB Atlas, permissions enforced by App Services, and App Services sign-in. They do not have to come from the same place.

MongoDB’s Device Sync deprecation page lists alternative providers: Ditto, PowerSync, ObjectBox, AWS AppSync, HiveMQ, Ably, Parse and Cedalo. For the most common need, getting MongoDB data onto devices and back, a sync engine such as PowerSync, which supports MongoDB as a source database, is the closer replacement.

Realm sync features Offline Protocol replaces

Of what a Realm sync app used, Offline Protocol replaces the part where nearby devices stay in step while offline and partly covers permissions. It does not replace the local database or two-way sync with MongoDB Atlas, and sign-in is a separate product, OfflineID.

Offline Protocol is a mesh SDK in the app on each device. In version 0.30.0 it is a React Native native module for iOS and Android, with a Rust core on crates.io, a Python package on PyPI, a Java package on Maven Central, a C API, early native Swift and Android packages and a preview Flutter plugin. Devices discover each other over Bluetooth LE, open MLS-encrypted sessions and groups, and exchange messages and replicated documents. Each device edits its own copy of a document, and the copies merge deterministically when devices reconnect, with no server involved.

It has no query language and does not sync a backend database. Its documentation describes your existing database as the system of record for records outside the shared scope, and leaves enrollment and authorization to the application.

What a Realm sync app usedReplaced by Offline Protocol?
Local database with queriesNo. Keep Realm’s community database, or another local store
Two-way sync with MongoDB AtlasNo. Use a backend sync tool or your own API
Nearby devices staying in step while offlineYes, through replicated documents over Bluetooth LE
App Services permissionsPartly. Membership of an encrypted space decides which devices receive a document; your application still enforces business permissions
App Services sign-inSeparate product. OfflineID provides hosted sign-in, metered per monthly active user

Backend sync tools for Realm apps

A backend sync tool from MongoDB’s list fits a Realm app better when:

  • The app’s main need is MongoDB data on each device and changes flowing back to Atlas.
  • Devices reach the network often enough for changes to travel through a server.

For an app whose main need is this, a tool from MongoDB’s list will serve it better than Offline Protocol.

Offline Protocol for Realm apps

Offline Protocol is the better fit for a Realm app when:

  • Devices used together, such as handhelds on one shift or tablets in one vehicle, need to share state or hand off work when the backend is out of reach.
  • You also want encrypted messages or service calls between those devices.
  • You would rather keep your current database and backend as they are.

The saving is in the daily work that stays local: a handoff or a checklist edit between two nearby devices goes over Bluetooth LE without a server round trip, and that local traffic is never metered on any Offline Protocol plan. The mesh SDK is free under AGPL-3.0-only when the app meets its obligations; closed-source and App Store apps need the commercial license, which is annual with no published price.

Realm and Offline Protocol in one app

An app can keep Realm’s community database as its local store and add Offline Protocol for device-to-device state. The two are independent: the app reads a merged document from Offline Protocol and writes what it needs into Realm, or the reverse. Keep each record’s source of truth in one place, so the app never has to reconcile the same record from two directions.

Frequently asked questions

Is Realm still available?

The on-device database is. MongoDB's deprecation page says it continues as an open-source project, and the SDK repositories have community branches that remove Device Sync. Realm JS and Realm Core are published under the Apache License 2.0. What ended on September 30, 2025 was Device Sync and the Atlas Device SDKs as a MongoDB service.

Which tools does MongoDB suggest instead of Device Sync?

MongoDB's Device Sync deprecation page lists Ditto, PowerSync, ObjectBox, AWS AppSync, HiveMQ, Ably, Parse and Cedalo, plus custom solutions through its consulting partners. Offline Protocol is not on that list.

Does Offline Protocol sync data with MongoDB Atlas?

No. It has no query language and does not sync a backend database, and its documentation describes your existing database as the system of record for records outside the shared scope. Two-way sync with Atlas needs a backend sync tool or your own API.

What happened to App Services authentication after the Device SDKs' end of life?

MongoDB's deprecation pages say App Services authentication and user management is no longer available after the SDKs' end of life. Data access permissions (rules and roles) and the App Services wire protocol are deprecated too, while database triggers remain available in the Atlas UI.

How do I install Realm JS without sync?

The Realm JS repository says a version without sync features can be installed from community on npm or taken from the community branch.

How do Offline Protocol devices stay in step without a server?

Devices discover each other over Bluetooth LE, open MLS-encrypted sessions and groups, and exchange messages and replicated documents. Each device edits its own copy of a document, and the copies merge deterministically when devices reconnect, with no server involved.

Sources

Build it with Offline Protocol

The shared state guide shows replicated documents syncing between two devices with the internet disconnected, and how to check that both copies converge after the devices are separated and reconnect.

Read the shared state guide