Articles with the tag:
Try in the cloud
Help Center

About the ONLYOFFICE and Alfresco integration

ONLYOFFICE offers an official connector to integrate ONLYOFFICE Docs with Alfresco to create, edit, and convert office documents within the document library. You can download the ONLYOFFICE connector from the official Alfresco Add-ons directory or the ONLYOFFICE GitHub page.

To learn more about the ONLYOFFICE and Alfresco module and how it works in detail, please, visit our API documentation.

Main features

  • Creating, editing and viewing text documents, spreadsheets, and presentations.
  • Converting files.
  • Co-editing documents in real-time: two co-editing modes (Fast and Strict), the Track Changes mode, comments, and the built-in chat.
  • JWT support to secure your traffic so that no one can have access to your documents with the exception of the users with proper rights.

Supported formats

  • For creating, editing and viewing: DOCX, PPTX, XLSX
  • For conversion: ODT, ODP, ODS, DOC, XLS, PPT
  • For editing via conversion to OOXML: CSV, ODP, ODS, ODT, RTF, TXT
  • For viewing only: PDF

What's new in version 5.0.1


  • Error on the Document Details page when the Convert with ONLYOFFICE button is displayed

The full change log is available here.

Connecting ONLYOFFICE Docs to Alfresco Share


  • ONLYOFFICE Document Server v3.0 or later

    You need an instance of ONLYOFFICE Docs that is resolvable and connectable both from Alfresco and any end clients. It must be able to POST to Alfresco directly.

    Please refer to the official documentation page to learn more about installing ONLYOFFICE Docs.
  • Alfresco v.5.2 - 6.1
  • ONLYOFFICE Connector 5.0.0 for Alfresco

Installing ONLYOFFICE and Alfresco module package

The latest compiled package files are available on GitHub. You need the onlyoffice-integration-repo.jar and the onlyoffice-integration-share.jar files. If you plan to compile the ONLYOFFICE and Alfresco module package yourself for some reason (e.g. edit the source code and compile it afterwards), address the developer instruction.

  1. Download compiled packages in the repo and share directories:
    cd onlyoffice-alfresco/
    mvn clean install
  2. Upload the compiled *.jar packages to directories accordingly for your Alfresco installation:
    • from onlyoffice-alfresco/repo/target/ to the /webapps/alfresco/WEB-INF/lib/ for Alfresco repository.
    • from onlyoffice-alfresco/share/target/ to /webapps/share/WEB-INF/lib/ for Share.
  3. (Optional) Edit the file to specify correct hostnames, open ports and protocols as alfresco and share are deployed as two separate services.<hostname>
  4. Restart Alfresco
    sudo ./ stop
    sudo ./ start
  5. Check if the module is present in the list at /share/page/console/admin-console/module-package.

Configuring ONLYOFFICE and Alfresco module package

Go to Alfresco Administration Console. Open http://<alfrescohost>/alfresco/s/onlyoffice/onlyoffice-config and specify the following parameters.

Document Server settings:

Advanced server settings:

  • Document Editing Service address for internal requests from the Alfresco server - specify the address that is used to access Document Editing Service from Alfresco server.
  • Alfresco server address for internal requests from the Document Editing Service - specify the address that is used to access Alfresco server from Document Editing Service.

Common settings:

  • Ignore SSL Certificate - turns SSL off.
  • Enable Force Save - enables saving document changes directly to the Alfresco storage after clicking the Save button (if disabled, the document is saved in the document editor's cache until the document is closed).
  • Save docx, xlsx, pptx as a new version of the original file after conversion - if disabled, a separate file will be created and placed in the same folder.
  • Open the file for editing - allows administrators to choose the document formats to edit via conversion to OOXML formats.
Settings_menu Settings_menu

Enabling JWT for the ONLYOFFICE and Alfresco integration

To protects documents from unauthorized access, ONLYOFFICE editors use the JSON Web Token (JWT). The token is added in the configuration when the Document Editor is initialized and during the exchange of commands between inner ONLYOFFICE Docs services. The secret key is used to sign the JSON web token and validate the token upon the request to ONLYOFFICE Docs.

To protect your documents, you need to enable the token validation and specify your own secret key in the ONLYOFFICE Docs configuration file, then specify the same secret key in the connector settings.

Step 1: Configure ONLYOFFICE Docs

  1. Open the local.json file with any available text editor.
    • For Linux - /etc/onlyoffice/documentserver/local.json
    • For Windows - %ProgramFiles%\ONLYOFFICE\DocumentServer\config\local.json
    • For Docker – enter the ONLYOFFICE Docs container using the docker exec -it <containerID> bash command and open /etc/onlyoffice/documentserver/local.json
  2. Enable token validation by changing the false value to true in three sections:
    • services.CoAuthoring.token.enable.browser
    • services.CoAuthoring.token.enable.request.inbox
    • services.CoAuthoring.token.enable.request.outbox
  3. Specify your own secret key by replacing the secret value with your own text string in three sections. The secret key must be the same.
    • services.CoAuthoring.secret.inbox.string
    • services.CoAuthoring.secret.outbox.string
    • services.CoAuthoring.secret.session.string
      "services": {
        "CoAuthoring": {
          "token": {
            "enable": {
              "request": {
                "inbox": true,
                "outbox": true
              "browser": true
          "secret": {
            "inbox": {
              "string": "yoursecret"
            "outbox": {
              "string": "yoursecret"
            "session": {
              "string": "yoursecret"
  4. Save your changes.
  5. Restart the services for the config changes to take effect.
    supervisorctl restart all

Step2: Specify the same secret key in the connector settings

In the connector settings, specify the same secret in the Secret key field and save the settings.

Connecting to the demo ONLYOFFICE Docs

Starting from ONLYOFFICE connector version 5.0.0, you can try ONLYOFFICE online editors within Alfresco without installing ONLYOFFICE Docs.

To turn the connection on, click the Connect to demo ONLYOFFICE Document Server checkbox and click the Save button.

This is a public test server that will be available during a 30-day period. Don’t share your sensitive data there.

Start using ONLYOFFICE Docs within Alfresco

To create a document:

  1. Open the folder where you want to create a document.
  2. Click the Create new... button.
  3. Choose the file type you want to create: Document, Spreadsheet or Presentation.
new_menu new_menu

To edit or view a document:

  1. Find the required document.
  2. Click the Edit in ONLYOFFICE button.
edit_menu edit_menu

To convert a non-XML document into XML format (DOCX, XLSX or PPTX):

  1. Find the required document.
  2. Click the Convert using ONLYOFFICE button.

The document will be automatically converted into its XML analog. Resulting files are placed in the same folder. You can also configure automatic converting rules for a folder. For more information about the rule configuration, please read the official Alfresco documentation.

convert_menu convert_menu
Download Best editors on your website Let your site users view, edit and collaborate
on all types of text, spreadsheet and presentation files
You Might Also Like This: