Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
O

orbitdb

> 数据库
Open source

Peer-to-Peer Databases for the Decentralized Web

8.8K stars0 likes2 views
WebsiteGitHub

About

Peer-to-Peer Databases for the Decentralized Web

OrbitDB

[](https://www.npmjs.com/package/@orbitdb/core) [](https://www.npmjs.com/package/@orbitdb/core)

OrbitDB is a serverless, distributed, peer-to-peer database. OrbitDB uses IPFS as its data storage and Libp2p Pubsub to automatically sync databases with peers. It's an eventually consistent database that uses Merkle-CRDTs for conflict-free database writes and merges making OrbitDB an excellent choice for p2p and decentralized apps, blockchain applications and local-first web applications.

OrbitDB provides various types of databases for different data models and use cases:

  • events: an immutable (append-only) log with traversable history. Useful for "latest N" use cases or as a message queue.
  • documents: a document database to which JSON documents can be stored and indexed by a specified key. Useful for building search indices or version controlling documents and data.
  • keyvalue: a key-value database just like your favourite key-value database.
  • keyvalue-indexed: key-value data indexed in a Level key-value database.

All databases are implemented on top of OrbitDB's OpLog, an immutable, cryptographically verifiable, operation-based conflict-free replicated data structure (CRDT) for distributed systems. OpLog is formalized in the paper Merkle-CRDTs. You can also easily extend OrbitDB by implementing and using a custom data model benefitting from the same properties as the default data models provided by the underlying Merkle-CRDTs.

This is the Javascript implementation and it works both in Browsers and Node.js with support for Linux, OS X, and Windows.

A Go implementation is developed and maintained by the Berty project at berty/go-orbit-db.

Installation

Install OrbitDB and its dependencies:

bash
npm install @orbitdb/core helia

Browser <script> tag

OrbitDB can be loaded in the browser using the distributed js file with the <script/> tag. OrbitDB is the global namespace and all external functions are available via this namespace:

<script>/path/to/orbitdb.min.js</script>

Quick Start

If you want to get up and running with OrbitDB quickly, install and follow the instructions in the @orbitdb/quickstart module.

Usage

If you're using @orbitdb/core to develop browser or Node.js applications, use it as a module with the javascript instance of IPFS.

…

To configure your IPFS instance for persistency and Libp2p to connect to peers, see Creating a Helia instance and the Default Libp2p Configurations in @orbitdb/quickstart for examples.

Documentation

Use the Getting Started guide for an initial introduction to OrbitDB.

You can find more advanced topics in our docs covering:

  • Databases
  • Storage
  • Identities
  • Access Controllers
  • Connecting Peers
  • Replication
  • Oplog
  • Encryption

API

See https://api.orbitdb.org for the full API documentation.

Development

Run Tests

bash
npm run test

Build

bash
npm run build

Benchmark

bash
node benchmarks/orbitdb-events.js

See benchmarks/ for more benchmarks.

API

To build the API documentation, run:

bash
npm run build:docs

Documentation is output to ./docs/api.

Other implementations

  • Golang: berty/go-orbit-db
  • Python: orbitdb/py-orbit-db-http-client

If you know of any other repos that ought to be included in this section, please open a PR and add them.

Contributing

Take a look at our organization-wide Contributing Guide. You'll find most of your questions answered there.

If you want to code but don't know where to start, check out the issues labelled "help wanted".

Sponsors

The development of OrbitDB has been sponsored by:

  • Protocol Labs
  • Haja Networks
  • Maintainer Mountaineer
  • OrbitDB Open Collective

If you want to sponsor developers to work on OrbitDB, please donate to our OrbitDB Open Collective or reach out to @haadcode.

License

MIT © 2015-2023 Protocol Labs Inc., Haja Networks Oy, OrbitDB Community

Issues· 26 open

View all issuesOpen on GitHub
  • #1255

    Sync never delivers the first entry to a reader connected only through a relay

    Updated Jul 26, 2026
  • #1253

    Documents store silently drops the encryption option (typo: encrypt vs encryption)

    Updated Jun 19, 2026
  • #1244

    OrbitDB incompatible with streaming blockstores (js-stores PR #358)

    Updated Apr 16, 2026
  • #1251

    Oplog entries referencing unreachable blocks replicate forever — need entry expiry or compaction

    Updated Apr 12, 2026
  • #577

    OrbitDB Stickers

    communityUpdated Feb 18, 2026
  • #1246

    check your twitter account

    Updated Feb 17, 2026
  • #1228

    Typescript implementation

    Updated Dec 10, 2025
  • #1240

    SMS integration question

    Updated Nov 17, 2025
  • #1164

    database record limits for acceptable lookup performance

    In ProgressUpdated May 8, 2024
  • #252

    Channel database for State and Payment Channels

    enhancementhelp wantedUpdated Dec 19, 2023

> Tags

JavaScriptcrdtdatabasedecentralizeddistributed

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库