2025-10-30 by Zixuan Chen

The open-source Loro Protocol project includes the package, the adaptor suite in , and matching Rust client and server implementations that all interoperate on the same wire format.
The Loro Protocol is a wire protocol designed for real-time CRDT synchronization. Learn about the design in detail here.
It efficiently runs multiple, independent “rooms” over a single WebSocket connection.
This allows you to synchronize your application state, such as a Loro document, ephemeral cursor positions, and end-to-end encrypted docume…
2025-10-30 by Zixuan Chen

The open-source Loro Protocol project includes the package, the adaptor suite in , and matching Rust client and server implementations that all interoperate on the same wire format.
The Loro Protocol is a wire protocol designed for real-time CRDT synchronization. Learn about the design in detail here.
It efficiently runs multiple, independent “rooms” over a single WebSocket connection.
This allows you to synchronize your application state, such as a Loro document, ephemeral cursor positions, and end-to-end encrypted documents, over one connection. It is also compatible with Yjs.
Quick Start: Server & Client Example
The protocol is implemented by the client and a minimal for testing. These components are bridged to your CRDT state using .
Server
For development, you can run the (from ) in a Node.js environment.
Client
On the client side, you connect once and then join multiple rooms using different adaptors.
Features
Multiplexing
Each binary message is prefixed with four magic bytes that identify the data type, followed by the . This structure allows the server to route messages to the correct handler. A single client can join:
- (Loro Document)
- (Loro Ephemeral Store, for cursors and presence)
- (End-to-End Encrypted Loro Document)
- and (for Yjs Document and Awareness interoperability)
All traffic runs on the same socket.
Compatibility
The Loro Protocol is designed to accommodate environments like Cloudflare:
- Fragmentation: Large updates are automatically split into fragments under 256 KiB and reassembled by the receiver. This addresses platforms that enforce WebSocket message size limits.
- Application-level keepalive: The protocol defines simple and text frames. These bypass the binary envelope and allow the client to check connection liveness, which is useful in browser or serverless environments where transport-level TCP keepalives are not exposed.
This repository also ships Rust clients and servers that mirror the TypeScript packages.
Experimental E2E Encryption
End-to-end encrypted Loro is included in , but the feature is currently experimental: expect wire formats and key-management APIs to change, and do not rely on it for production-grade security audits yet. When paired with on the client, the server relays encrypted records without decrypting them.
Status and Licensing
The Loro Protocol is mostly stable. We welcome community feedback and contributions, especially regarding use cases that are difficult to satisfy with the current design.
All the packages in inside https://github.com/loro-dev/protocol are open-sourced under the permissive MIT license.