Setup
Server
Client
Use the provider-agnostic API to connect SuperDoc:modules.collaboration = { ydoc, provider }.
Seed from DOCX only for empty rooms
A DOCX file can seed a new collaboration room. After that, the Yjs document is the source of truth. Wait for Hocuspocus to sync before you decide whether the room is empty. If you check before sync, the client can look empty while the server still has stored Yjs state.If your backend already knows whether a room has stored Yjs state, use that
metadata. The important part is the order: sync first, inspect the Yjs document
or room metadata, then decide whether to pass the DOCX seed.
React example
Server configuration
Basic options
Hooks
Persistence example
Provider options
Events
Provider events
Production deployment
Docker
With Redis (scaling)
Resources
Hocuspocus Docs
Official documentation
Working example
Complete source code
Next steps
Client Configuration
All SuperDoc collaboration options
Self-hosted overview
Compare Hocuspocus, YHub, and the SuperDoc Yjs reference server

