Get Started
Document Editing (ONLYOFFICE)
Word, Excel, PowerPoint, and PDF files can be edited directly in the browser — no download/edit/re-upload round trip.
SmartKMS embeds an ONLYOFFICE Document Server for in-browser editing. Edits save straight back to MinIO through a callback the Document Server calls when the user hits save.
Starting It
docker compose up -d onlyoffice
The first run downloads the ONLYOFFICE image (roughly 1–1.5 GB) and can take a minute or two to become healthy.
Verify:
docker compose ps
skms_onlyoffice should show as healthy (its healthcheck hits its own /healthcheck endpoint).
How It Fits Together
- The browser loads the editor's JS API from
ONLYOFFICE_URL(http://localhost:8080by default). - The ONLYOFFICE container fetches the source file directly from MinIO using
ONLYOFFICE_S3_ENDPOINT, and calls the API back atONLYOFFICE_INTERNAL_CALLBACK_URLto save edits — both of these are container-to-container addresses on the Docker network, notlocalhost, since from inside a containerlocalhostmeans itself. ONLYOFFICE_JWT_SECRETis set once, in.env.docker-compose.ymlpasses it to both the API and theonlyofficecontainer, so both sides sign and verify with the same secret. ONLYOFFICE rejects requests with a missing or wrong signature once JWT is enabled.
Resource Requirements
Previewing
Opening a Word, Excel or PowerPoint document shows it in ONLYOFFICE's read-only viewer — the same rendering engine as the editor, so what you see is exactly what Edit opens — both in the Documents page and in the quick preview from AI Search results, chat citations and the Dashboard. PDFs and images use the browser's own viewer and don't need the Document Server. If the viewer can't be reached, the pane falls back to a file-type icon with a "Preview unavailable" note.
Saving and Closing
While editing, the top bar shows Save and Close:
- Save writes your changes to SmartKMS right away (a new version, re-analyzed in the background) and keeps the editor open. ONLYOFFICE's own File → Save does the same.
- Close with nothing changed just closes. With unsaved changes it asks Save & close, Discard changes or Keep editing. The viewer's ✕ button and closing the browser tab ask the same question.
- Discard throws the session's unsaved edits away for good: the document reopens as it was last saved.
Edits are synced to the Document Server continuously while you type, but they only reach SmartKMS' storage on Save (or when you close and choose Save & close) — a browser crash mid-session is recovered by the Document Server's own autosave, which delivers the session's edits once it notices the disconnect.
Version History
Every save from the editor creates a new version of the document. For Word, Excel, PowerPoint and PDF files, history lives inside the editor itself: open the document with Edit, then choose File → Version History in ONLYOFFICE's menu.
- Each version shows who saved it and when. Clicking one opens it read-only in the same editor.
- Versions saved since 1.8.0 also carry ONLYOFFICE's change record, so the panel can highlight what changed compared with the version before it. Older versions open fine but without highlighting.
- Restore puts that version's file back as the current document. The version you're replacing is kept as its own entry first, so a restore can always be undone, and the document is re-analyzed (summary, search index) in the background.
- Closing the history view reopens the editor on the current version.
Behind the scenes the panel reads the same document_versions rows the rest of the app uses — see Architecture → How Editing and Version History Work.
Troubleshooting
Document editor stuck loading forever, or "SignatureDoesNotMatch" in the container logs
Check the logs for the actual error:
docker logs skms_onlyoffice --tail 100
Two known causes:
- If it's a MinIO
SignatureDoesNotMatcherror:S3_ENDPOINTandONLYOFFICE_S3_ENDPOINTmust both point somewhere MinIO is actually reachable from that respective caller — a presigned URL is signed for one specific host and will be rejected if used against a different one. - If there's no error at all and it's just slow: see Resource Requirements above — this is usually a resource-constraint symptom, not a bug.