Couchbase · Mobile and offline
Mobile database offline sync: keeping field apps working without a connection
Mobile database offline sync means the app keeps its own copy of the data on the device, reads and writes it with no network, and exchanges changes with the server whenever a connection returns. Couchbase provides this with Couchbase Lite on the device and Sync Gateway or Capella App Services as the sync layer. Interkey is a Couchbase technology partner and sells Couchbase Capella; we help you decide whether the model fits and set up the data behind it.
Published 5 min read
In short
- The problem: an app that needs the network for every read and write stops when the signal does, in a basement, a remote site or a moving vehicle.
- The approach: a local database on the device, plus a sync service that moves changes both ways when a connection exists.
- Couchbase parts: Couchbase Lite on the device; Sync Gateway, or Capella App Services as the managed version, as the sync layer; Couchbase Server or Capella behind it.
- Who it is for: teams building field-service, inspection, delivery, sales and similar apps that must keep working offline.
- What decides success: who may see which data, and what happens when two people change the same record.
Why online-only apps fail in the field
Many apps are built as screens over a web service. On a desk that works. In the field it breaks in familiar ways: a form is lost when the connection drops, a worker waits at a spinner, or a team copies data to paper and types it in later.
Teams usually choose between three options:
- Retry on failure. The app queues a failed request and sends it later. This is simple and covers short drops, but the app still cannot read data it does not already hold.
- Cache some screens. Selected data is stored on the device. This helps reading, but writing and merging changes become your own code to write and test.
- A local database with built-in sync. The device holds a real database and a sync service reconciles it with the server. This is the model Couchbase Mobile is built for.
The third option costs more to design, but it removes the part teams usually get wrong, which is merging changes made at different times in different places.
The parts of a Couchbase offline sync stack
| Part | Role | What Couchbase states |
|---|---|---|
| Couchbase Lite | The database inside the app | An embedded NoSQL JSON document database for mobile and edge devices. It stores, syncs and queries data locally, even without network connectivity, with SQL++ queries and local encryption |
| Sync Gateway | The sync server you run | The synchronization server in a Couchbase Mobile deployment, with bi-directional sync between edge devices and the cloud, plus users, roles and channels for access control |
| Capella App Services | The managed sync backend | A fully managed application backend that synchronizes data between Capella and mobile and edge apps; paired with Couchbase Lite for offline-first apps |
| Couchbase Server or Capella | The central database | Holds the shared data that devices sync with |
Couchbase Lite supports Android with Java and Kotlin, iOS with Swift and Objective-C, .NET, and C and C++. Check Couchbase's current platform list for the version you plan to use.
How sync behaves when the connection comes and goes
In Couchbase Lite, a replicator moves changes between the device and Sync Gateway. Couchbase's documentation describes the behaviour that matters offline:
- Continuous or one-shot. A continuous replication stays active to replicate changed documents; a one-shot run is the ad-hoc alternative.
- Offline and retry. On a temporary error the replicator goes into an offline state and retries, with the interval between attempts growing over time. Continuous replications retry without limit.
- Channels. By default the device pulls the channels its user may access. You can limit a pull to chosen channels, so a device holds only the data it needs.
- Access control. Sync Gateway checks that only authorised users connect, and which documents each user may read and write.
Channel design matters more than it looks. It decides how much data lands on each phone, and so storage use, sync time and what is exposed if a device is lost.
When two people change the same record offline
Conflicts are not rare in offline apps. Two technicians open the same job, both edit it with no signal, and both sync later. Couchbase Lite handles this during pull replication. By default, a deleted document wins over an update, and if both are updates, the revision with the most revisions wins. From Couchbase Lite 2.6, a custom resolver can pick the winner with your own logic, and built-in strategies include Local Wins, Remote Wins and Merge.
The default may be wrong for your business. A work order edited in two places may need both sets of notes kept. Decide the rule per record type with the business owners, and test it with real devices going offline, before the first release.
Where Interkey fits
Couchbase is an Interkey technology partner, and the platform is Couchbase's. Interkey sells Couchbase Capella, and as of 2 November 2026 Couchbase's region list shows App Services available in Google Cloud's Dammam region (me-central2), as set out on our Capella page. Check Couchbase's current list before you decide.
We start with a workload review: the access patterns, how often devices are offline, volumes, and any rule on where data must stay. That is enough to say whether the model fits and whether Capella or self-managed Couchbase Server suits it. Some apps need none of this, and a simple retry queue is the honest answer.
Questions buyers ask
What is the difference between Couchbase Lite and Sync Gateway?
Couchbase Lite is the embedded database inside the app. Sync Gateway is the server that synchronizes it with the central database and controls who can see which data.
Do we have to run Sync Gateway ourselves?
No. Capella App Services is Couchbase's fully managed version. Self-managed Couchbase Server pairs with Sync Gateway, which you run.
What happens when a device has no signal for days?
The app keeps working against its local database. When a connection returns, the replicator resumes and exchanges changes. How much history to hold, and for how long, is a design decision.
How are conflicts settled?
By default a deleted document wins, and otherwise the revision with the most revisions wins. A custom resolver can apply your own rule, such as Local Wins, Remote Wins or a merge.
Which phones and platforms are supported?
Couchbase Lite documents Android, iOS, .NET, and C and C++, with React Native documented separately. Confirm the exact versions on Couchbase's pages for your project.
Does Interkey sell Couchbase Capella?
Yes. Interkey sells Couchbase Capella, and reviews the workload, models the data and helps run either Capella or self-managed Couchbase.
Next
Related pages
Next step
Ask whether offline sync fits your app
Tell us what the app does, how often devices lose connection, and any rule about where the data must stay. We will reply with whether the model fits and what a first step would be.
Or directly
+966-11-2180999 [email protected]Tawuniya Towers, North Tower, 7th Floor, King Fahad Highway, Olaya, P.O. Box 56835, Riyadh 11564, Saudi Arabia