Server SDK
Prepare document services, storage, and access permissions for your application.
Univer Server SDK is a set of composable modules. Integrate the modules your application needs into your own backend, then deploy that 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. File exchange integration covers file upload, conversion, and download. Follow the guide for the feature you need. For features that require a license, start with license configuration. Browser-only editing does not require a collaboration service.
Integration sequence
- Run Quick Start: edit the same document in two independent browser contexts and verify both directions.
- Add persistence: restart the SQLite example and confirm the value survives.
- Add identity and permissions: compare editor and viewer sessions.
- Connect your browser application: replace the demo identity, document creation and protocol addresses with your application’s implementations.
- Choose an extension: add history, comments, worktree or exchange after the core path works. For file conversion alone, 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 |
Choose only the capabilities you need. File conversion alone does not require collaborative editing. Prepare the SDK environment and keep Univer package versions compatible.
Connect your application and storage
Run the chosen service's example, then connect it to your backend. For collaborative documents, your application creates the document, records its ownership, and returns its ID to the browser. See module boundaries for creation APIs. Your application continues to manage users, projects, and folders.
The collaboration example uses memory storage and loses content on restart. Follow Database Adapters to connect a database, then verify that saved documents survive a restart.
File conversion also needs storage and cleanup for uploads, tasks, and downloads. Follow the Exchange example.
Connect login and permissions
Follow identity and authorization to verify existing login credentials and check whether a user may read or modify a document. Replace fixed example users and allow-all rules.
Protect document reads, collaboration connections, edit submissions, and any enabled history, comments, and downloads. A read-only browser editor does not replace server permission checks.
Deploy and connect the frontend
Deploy interfaces on your application's domain. For collaboration, forward both HTTP and WebSocket traffic through proxies; HTTPS pages should use WSS. Limit file uploads and handle conversion failures and timeouts.
Once the backend is ready, finish the relevant feature integration:
- Collaboration integration: connect the editor, create and open shared documents, and verify synchronization.
- File exchange integration: connect uploads, conversion, and downloads, then check real files.
How is this guide?