Raft Demo / Documentation

OnlyOffice

  1. OnlyOffice
    1. The documentserver container
    2. Integration
    3. Desktop Editors
    4. Configuration
      1. Document cache expiration

Some notes on the Onlyoffice Document Editor integration.

The documentserver container

Links:

  • docserver container image: https://hub.docker.com/r/onlyoffice/documentserver
  • configuration options: https://helpcenter.onlyoffice.com/docs/installation/docs-community-configuring.aspx
  • Source for documentserver: https://github.com/ONLYOFFICE/DocumentServer
  • Source for the documentserver container: https://github.com/ONLYOFFICE/Docker-DocumentServer
  • Source for the document editor itself: https://github.com/ONLYOFFICE/web-apps

Integration

There are two pieces that Raft is responsible for:

  • document manager - the list of the documents displayed in the user browser where the user can select the necessary document and perform some actions with it (depending on the provided rights, the user can open the document to view it or edit, share the document with other users).

  • document storage service - the server service which stores all the documents available to the users with the appropriate access rights. It provides the document IDs and links to these documents to the document manager which the user sees in the browser.

onlyoffice docs is responsible for:

  • browser document editors
  • document editing service (backend for the javascript editors)

Links:

  • Ruby example:
    • https://github.com/ONLYOFFICE/document-server-integration/releases/latest/download/Ruby.Example.zip
    • https://github.com/ONLYOFFICE/document-server-integration
  • integration documentation:
    • https://api.onlyoffice.com/docs/docs-api/get-started/how-it-works/opening-file/
    • https://api.onlyoffice.com/docs/docs-api/usage-api/advanced-parameters/

Desktop Editors

With the onlyoffice desktop editor applications it is possible to do true collaborative
editing that is e2ee.

The desktop editors can connect to the document storage service.

TODO: figure out what API we need to add to support using the desktop editors.

Configuration

Document cache expiration

Documents loaded in the web editor are stored in a file cache, (e.g. S3 or filesystem).

Unless using the desktop editor, these files are not encrypted. The storage backend
must therefor be encrypted and the file cache should be aggressively purged.

TODO: adjust the file cache expiration settings. the default expiration is very long (24 hours)

/etc/onlyoffice/documentserver/config.json:

{
  "services": {
    "CoAuthoring": {
      "expire": {
        "saveLock": 60,
        "presence": 300,
        "locks": 604800,
        "changeindex": 86400,
        "lockDoc": 30,
        "message": 86400,
        "lastsave": 604800,
        "forcesave": 604800,
        "forcesaveLock": 5000,
        "saved": 3600,
        "documentsCron": "0 */2 * * * *",
        "files": 86400,
        "filesCron": "00 00 */1 * * *",
        "filesremovedatonce": 100,
        "sessionidle": "1h",
        "sessionabsolute": "30d",
        "sessionclosecommand": "2m",
        "pemStdTTL": "1h",
        "pemCheckPeriod": "10m",
        "updateVersionStatus": "5m",
        "monthUniqueUsers": "1y"
      },
    }
  }
}