AndroidiOS

Where Does Couchbase Lite Store Databases?

Couchbase Lite stores each database as a cblite2 folder inside the app's files directory. Sync metadata lives beside the documents.

Last updated

Couchbase Lite differs from its embedded cousins by storing each database as a folder with a cblite2 suffix rather than a single file. That folder sits in the app's files directory by default and holds documents, indexes, blobs, and replication checkpoints together.

Treat the folder as one unit in every operation. Copying half its contents produces a database that opens yet misbehaves, the worst kind of backup. The directory based layout also means size tools that count files understate nothing: what you see is what syncs.

Where Couchbase Lite stores this, by platform

Android
/data/data/[package]/files

One cblite2 folder per database in app files. Copy or zip the whole folder with the app closed. The exact subfolder follows the app's database configuration.

iOS
App Container/Library/Application Support

App container files or Application Support depending on configuration. Same folder per database layout as Android.

Frequently asked questions

How do I back up a Couchbase Lite database?

Copy the cblite2 folder with the app closed. It is a directory, not a file, so zip it to keep the bundle intact. Replicator checkpoints inside mean a restore resumes sync cleanly.

Can the storage path be customized?

Pass a directory to the database configuration at open time. The default keeps everything under app files, which suits most apps. Custom paths help only when sharing storage with extensions or meeting backup policies.

Notice an outdated path? Let us know.