yjs-server

Deploy Yjs collaborative editing with DS-backed durable storage via Caddy TLS proxy.

1.7k|64|Updated Dec 4, 2025
One-click install
npx skills add https://github.com/durable-streams/durable-streams --skill yjs-server
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: yjs-server
Source: https://github.com/durable-streams/durable-streams/tree/main/packages/y-durable-streams/skills/yjs-server
Command: npx skills add https://github.com/durable-streams/durable-streams --skill yjs-server

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Deploys Yjs collaborative editing by wiring a YjsServer to a Durable Streams storage backend, with a Caddy-based TLS proxy and an optional Electric Cloud provisioning path. This setup enables real-time, snapshot-based synchronization across browser clients in a scalable, production-ready deployment.

Core Features & Use Cases

  • Yjs wire protocol support (snapshot discovery, updates, and awareness routing) with DS-backed storage.
  • Flexible deployment options: development server, self-hosted production using Caddy, or Electric Cloud managed hosting.
  • 3-layer architecture: Browser → Caddy → YjsServer → DS Server, with compaction-based snapshots to speed initial sync.
  • Production-grade deployment guidance and example configurations for TLS, proxy routing, and server orchestration.

Quick Start

Set up the DS server, start the YjsServer with a 1 MB compaction threshold, and proxy through Caddy using the provided development or production configurations.

Frequently Asked Questions about yjs-server

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy Yjs collaborative editing with durable storage in production?

Deploy Yjs collaborative editing by wiring a YjsServer to a Durable Streams storage backend and proxying browser traffic through Caddy. This 3-layer architecture provides real-time synchronization, snapshot-based discovery, and production-grade TLS routing for scalable collaborative apps.

What is the best way to set up a Yjs server for real-time document synchronization?

Setting up a Yjs server for real-time document synchronization involves running a YjsServer connected to a DS server backend. The server handles the Yjs wire protocol, routing updates and awareness events, while using compaction-based snapshots to speed up initial syncs across browser clients.

Does Yjs work with Durable Streams for backend storage?

Yes, Yjs works with Durable Streams for backend storage by wiring a YjsServer directly to a DS server. This integration enables snapshot discovery, update routing, and durable persistence for browser-based collaborative editing applications.

How do I configure Caddy as a proxy for a Yjs real-time collaboration server?

Configure Caddy as a proxy for a Yjs real-time collaboration server by setting up TLS and proxy routing with the flush_interval set to -1. This ensures proper handling of streaming connections between the browser and the YjsServer.

Can I use Yjs for browser-based collaborative apps requiring snapshot-based synchronization?

Yes, you can use Yjs for browser-based collaborative apps requiring snapshot-based synchronization. The deployment supports the Yjs wire protocol, applying compaction-based snapshots at a 1 MB threshold to speed up initial document synchronization across clients.

What deployment options are available for a Yjs and DS-backed collaboration server?

Available deployment options for a Yjs and DS-backed collaboration server include a local development server, self-hosted production using Caddy for TLS and proxy routing, or managed hosting via Electric Cloud provisioning.