Server SDK
Prepare document services, storage, and access permissions for your application.
Univer Server SDK is a set of modules that you assemble yourself. Select the modules that the application needs, add them to your own backend, and then deploy the application. Authentication, permissions, document ownership, file storage, and operations remain your responsibility.
This page covers backend setup, storage, and permissions. Collaboration integration connects the editor to shared documents, and File exchange integration covers file upload, conversion, and download. Read the guide for the feature that the application requires. If a feature requires a license, configure the license first, starting with license configuration. Editing only in the browser does not require a collaboration service.
Integration sequence
- Run Quick Start: open the same document in two browser windows and confirm that edits propagate in both directions.
- Add persistence: restart the SQLite example and confirm that the value persists.
- Add identity and permissions: sign in as an editor and as a viewer, then compare the operations that each role permits.
- Connect your browser application: replace the demo identity, document creation, and protocol addresses with your own implementations.
- Choose an extension: after the core path works, add history, comments, worktree, or exchange. If only file conversion is required, start with Exchange.
Choose the services you need
| Requirement | Backend preparation | Implementation guide |
|---|---|---|
| Shared document editing | Collaboration SDK, document storage, and permissions | Collaboration Quick Start |
| Office file import/export | Conversion, uploads, task queries, and downloads | File conversion and the Exchange example |
| History or shared comments | Their respective services, storage, and permissions | Extension modules |
Integrate only the services that the application actually uses. File conversion alone does not require collaborative editing. Set up the SDK environment first, and keep the Univer package versions compatible with each other.
Connect your application and storage
Run the example for the selected service, then connect it to your own backend. For collaborative documents, the application creates the document, records its owner, and returns the document ID to the browser; module boundaries lists the creation APIs. Users, projects, and folders remain in the application.
Quick Start keeps edits in memory until the server stops. Connect a database as described in Database Adapters, then confirm that a saved document remains readable after a restart.
File conversion requires storage for uploads, tasks, and downloads, together with a way to clean them up. The Exchange example shows how to implement this.
Connect login and permissions
Follow identity and authorization to validate the login credentials that the application already has and to decide whether a user may read or modify a document. Replace the fixed example users and the allow-all rules that come with them.
Permission checks must cover document reads, collaboration connections, edit submissions, and, when enabled, history, comments, and downloads. A read-only browser editor does not replace permission checks on the server.
Deploy and connect the frontend
Serve the interfaces from the application's domain. With collaboration, proxies must forward both HTTP and WebSocket traffic, and an HTTPS page should use WSS. Limit upload sizes, and handle conversion failures and timeouts. When one machine is no longer sufficient, the Deployment guide describes how to split the services and run multiple collaboration nodes.
After the backend is ready, complete the feature integration:
- Collaboration integration: connect the editor, create and open shared documents, and confirm that changes appear on both sides.
- File exchange integration: connect uploads, conversion, and downloads, then verify the result with real files.
How is this guide?