How to Integrate ONLYOFFICE Docs with Alfresco on Ubuntu

If your team and you work with content a lot, it might be a good idea to use an ECM (Enterprise Content Management) system. Taking into consideration a vast array of available solutions, it’s very difficult to choose the right tool for your purposes and needs.

One of the best software tools in this category is Alfresco. Using it, you can easily store and collaborate on content with your teammates. In this guide, you will learn how to enable document editing within Alfresco with the help of ONLYOFFICE Docs.

About Alfresco

Alfresco is an open-source ECM (Enterprise Content Management) system that makes it possible to manage different types of content from anywhere and connect information with users on any device. Alfresco helps companies and businesses to increase productivity by allowing users to easily share and collaborate on content.

Alfresco offers tools for:

  • document management.
  • content collaboration.
  • analytics.
  • process management.
  • case management.

This versatility makes Alfresco a product aimed at large and medium-sized companies, which can take advantage of all the benefits it offers. However, it can also be used by small teams and even individuals who deal with various content tasks.

About ONLYOFFICE Docs

ONLYOFFICE Docs is an open-source office package that is designed for deployment on a local server. This software offers three editors for text documents, spreadsheets, and presentations.

ONLYOFFICE Docs is based on Office Open XML, so the editors are completely compatible with Word documents, Excel spreadsheets, and PowerPoint presentations.
ONLYOFFICE Docs allows you to make the most of the real-time collaboration process due to some useful collaborative features, such as:

  • different access permissions.
  • two co-editing modes (Fast and Strict).
  • change tracking.
  • version history and version control.
  • comments.
  • user mentions.
  • built-in chat.

What makes ONLYOFFICE unique is its integration capabilities. This software can be easily embedded into various services and platforms with ready-to-use connectors, including Moodle, Nextcloud, Seafile, ownCloud, Confluence, SharePoint, Liferay, Nuxeo, Redmine, etc.

Install Alfresco in Ubuntu

First of all, you need to install Alfresco. To install the latest version of Alfresco Community Edition, please refer to our detailed guide on How to Install Alfresco in Linux.

Install ONLYOFFICE Docs in Ubuntu

Now that you have a working instance of Alfresco Community Edition, it’s time to install ONLYOFFICE Docs. There are several installation ways, and one of them is described in detail in this guide – Install ONLYOFFICE Docs on Debian and Ubuntu.

If you follow the installation instructions correctly, you will have an instance of ONLYOFFICE Docs (ONLYOFFICE Document Server) that can be connected both to Alfresco and to any other end clients.

Alternatively, you can install ONLYOFFICE Docs via Docker. A detailed guide can be found on GitHub.

Install ONLYOFFICE Module for Alfresco Share

The easiest way to integrate Alfresco and ONLYOFFICE is to download the already compiled ONLYOFFICE module package from GitHub.

After downloading the required files, you need to put them from the onlyoffice-alfresco/repo/target/ directory to /webapps/alfresco/WEB-INF/lib/ for the Alfresco repository. For Alfresco Share, put the files from onlyoffice-alfresco/share/target/ to /webapps/share/WEB-INF/lib/.

After that, you need to make sure that your instance of ONLYOFFICE Docs (ONLYOFFICE Document Server) can POST to Alfresco directly.

For this, you can change the following lines in the alfresco-global.properties file located at /usr/local/tomcat/shared/classes/alfresco-global.properties:

alfresco.host=<hostname>
alfresco.port=443
alfresco.protocol=https

For Alfresco Share:

share.host=<hostname&gt
share.port=443
share.protocol=https

Now you need to restart your Alfresco instance.

$ sudo ./alfresco.sh stop
$ sudo ./alfresco.sh start

Configure ONLYOFFICE Docs within Alfresco

To set up ONLYOFFICE Doc within Alfresco, open the Alfresco Admin Console or enter the following URL in your browser.

http://alfrescohost/alfresco/s/onlyoffice/onlyoffice-config

You will see the ONLYOFFICE configuration page where you will need to specify the URL addresses of your ONLYOFFICE Document Server:

  • internal address that Alfresco will use to access the ONLYOFFICE editors.
  • public address that users will use to access the editors.

Also, you can specify a secret key to protect your data using JSON Web Token (JWT). Alternatively, you can configure this option by adding onlyoffice.jwtsecret to the alfresco-global.properties file.

To turn off the SSL protocol, tick the Ignore SSL certificate box.

If you enable the Force Save option, you will be able to create a backup of your document each time you click the Save button in the editor. All your changes to the document will be directly sent to the storage.

The ONLYOFFICE web preview feature allows you to view a document without opening it. Enable this if necessary.

The file conversion option is really useful when you manually convert different formats (for example, DOC, ODT, etc.) to OOXML and don’t want to create a new file instead of the original one.

OnlyOffice Configuration
OnlyOffice Configuration

Edit and Collaborate on Documents

When you adjust all the settings, a new “Edit in ONLYOFFICE” action will appear in the Alfresco document library for documents, spreadsheets, and presentations.

Now you can not only create and edit DOCX, XLSX, and PPTX files but also share documents with other users and collaborate together in real-time using a full range of collaborative features:

  • two co-editing modes (Fast and Strict);
  • change tracking;
  • comments;
  • text messaging in the built-in chat.

The “Convert using ONLYOFFICE” option makes it possible to convert the following formats:

  • DOC, ODT to DOCX.
  • XLS, ODS to XLSX.
  • PPT, ODP to PPTX.

Converted files will appear in the same folder. If the conversion option is enabled, these files will be saved as new versions of the original files.

Conclusion

Congratulations! Now you know how to enable document editing and real-time co-editing within your Alfresco instance. Please don’t forget to share your opinion about the ONLYOFFICE and Alfresco integration by leaving a comment below.

If you read this far, tweet to the author to show them you care. Tweet a thanks
Sergey Zarubin
A former university teacher, Sergey has been passionate about open-source software since 2019. He writes about software for several websites and contributes to the ONLYOFFICE open-source project.

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

Got something to say? Join the discussion.

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.