Edit Word, Exel , Powerpoint and PDF inside Obsidian with OnlyOffice.
This guide assumes zero prior knowledge. Follow in order; stop when everything works.
Edit Office docs (DOCX / XLSX / PPTX / PDF) directly inside Obsidian – locally – using an OnlyOffice Document Server Docker container.
| Obsidian | Host application for your vault | | Docker Desktop (Win/macOS) or Docker Engine (Linux) | Runs the OnlyOffice server | | Plugin runtime files | Provide integration |
- Download: https://www.docker.com/products/docker-desktop/
- Run installer (keep “Use WSL2”). Reboot if prompted.
- Launch Docker Desktop → wait for Running.
- Verify:
docker --versionwsl --update
wsl --shutdownRestart Docker Desktop. For deep reset: unregister docker-desktop* distributions (see older guide / SERVER_SETUP.md).
Install Docker Engine per distro docs; add user to docker group; re‑login; run docker run --rm hello-world.
- Obsidian: Settings → Community Plugins → disable Safe Mode.
- Install the OnlyOffice plugin.
- Or install manually: “Open plugins folder” →
<vault>/.obsidian/plugins/. - Create folder
OnlyOffice. - Copy runtime files:
-
manifest.json,main.js,embedded-editor.html-assets/Start.docx(+ optionalStart.xlsx,Start.pptx) - Scripts:start-onlyoffice.*,stop-*,update-*,remove-*,check-setup.*(Source.ts, build configs not needed on end‑user machines.)
All auth uses a shared secret. Default: your-secret-key-please-change (OK for testing).
I recommend trying with the default first and only change it if you need.
Recommended: long random (≥32 chars). Generate (PowerShell):
[guid]::NewGuid().ToString()+[guid]::NewGuid().ToString()Edit every script that sets JWT_SECRET=.
Dont forget to set the same JWT secret in the plugins settings later!
Windows: double‑click start-onlyoffice.bat.
What it does (first run): pulls image, creates container obsidian-onlyoffice, maps port 8080, sets headers + JWT.
macOS/Linux: run start-onlyoffice.sh (chmod +x) or replicate its docker run line.
Verify container:
docker ps --filter name=obsidian-onlyofficeOptional: open http://127.0.0.1:8080 in a browser.
- Settings → Community Plugins → enable “OnlyOffice”.
- Open plugin settings:
- Server URL:
http://127.0.0.1:8080- JWT Secret: match scripts - Open a
.docxfile to test.
Click any .docx, .xlsx, .pptx, .pdf.
If you have other plugins that reads for example .pdf you might need to right click on the file and choose open with OnlyOffice.
Ribbon icon or Command Palette → “New OnlyOffice Document” → choose type & name. Templates: place Start.<ext> in assets/. There are default template files in the assets folder but you can change them if you like as long as they are called: Start.docx, Start.xlsx or Start.pptx.
Use "Save" or "Save As" for duplicates (extension auto‑applied).
Open many simultaneously; they share the one container.
| Task | Script (Win) | Script (Unix) | Manual |
| Start/create | start-onlyoffice | start-onlyoffice | docker run/start | | Stop | stop-onlyoffice | stop-onlyoffice | docker stop obsidian-onlyoffice | | Update image | update-onlyoffice | update-onlyoffice | docker pull onlyoffice/documentserver | | Remove | remove-onlyoffice | remove-onlyoffice | docker rm -f obsidian-onlyoffice | | Check | check-setup | check-setup | docker ps -a |
Change port: edit HOST_PORT + update plugin setting.
Change secret: edit scripts, remove container, start again, update plugin setting.
| Symptom | Cause | Fix |
| Token / security error | Secret mismatch | Align JWT secret & recreate container |
| Read‑only toolbar | CORS / iframe headers missing | Ensure env vars in start script |
| Blank pane | Container stopped / wrong URL | Check docker ps, port, URL |
| XLSX/PPTX creation fails | Template missing | Add assets/Start.docx / Start.xlsx / Start.pptx |
Diagnostics:
docker logs obsidian-onlyoffice --tail 60Obsidian dev console: Ctrl+Shift+I (Win/Linux) / Cmd+Opt+I (macOS).
Reset sequence: close panes → remove-onlyoffice → start-onlyoffice → reopen doc.
| Item | Recommendation | | JWT secret | Long random; don’t share | | Exposure | Keep container bound to localhost | | Backups | Still back up your vault regularly |
Need internet? Only for first Docker desktop installation image pull.
Remote server? Yes; must allow app://obsidian.md in frame/CORS + matching secret.
Disable JWT? Possible but discouraged.
Where are files? In your vault; container caches temporary editing state.
Start: start-onlyoffice | Stop: stop-onlyoffice | Update: update-onlyoffice | Remove: remove-onlyoffice | Logs: docker logs obsidian-onlyoffice | New Doc: Ribbon / Command Palette | Templates: assets/Start.
You’re done. See SERVER_SETUP.md for deeper Nginx / reverse proxy options.