How to integrate Redmine with ONLYOFFICE Docs on Ubuntu

1. Overview

ONLYOFFICE Docs is an open-source online office suite that is available under the terms of the GNU AGPL v3.0 license. It comes with a free community version and commercial editions for businesses and software developers. ONLYOFFICE Docs includes web-based editors for text documents, spreadsheets and presentations that are highly compatible with Open Office XLM (DOCX, XLSX and PPTS). This office suite allows you to enable real-time document editing and co-authoring within various file-sharing services and electronic document management systems, including Nextcloud, Seafile, ownCloud, Confluence, Alfresco, Nuxeo, Moodle, etc.

In this guide, we will tell you how to integrate ONLYOFFICE Docs with Redmine, an open-source project management and issue-tracking solution that makes it possible to manage multiple projects and corresponding subprojects using a variety of tools, such as role-based access control, Gantt charts, calendars, Wiki, project forums, time-tracking and much more.

What you’ll learn

This guide describes how to connect ONLYOFFICE Docs to the Redmine web application on Ubuntu via an official connector enabling users to create and collaborate on documents, spreadsheets and presentations attached to some of the Redmine modules, like Issues, Files, Documents, Wiki and News.

What you’ll need

  • ONLYOFFICE Docs (Community Edition or Enterprise Edition)
  • Redmine instance (the latest version is available on the official website)
  • ONLYOFFICE integration app for Redmine

2. Installing ONLYOFFICE Docs

To enable document editing as part of the Redmine functionality, you need to install an instance of ONLYOFFICE Docs (also known as ONLYOFFICE Document Server). Please note that the instance should be resolvable and connectable both from Redmine and any other end clients. Importantly, ONLYOFFICE Docs must also be able to POST to the Redmine instance directly.

The easiest way to get the latest version of ONLYOFFICE Docs is GitHub. Alternatively, you can read this guide and choose the most suitable installation method, either a Docker script or a Deb package.


3. Installing the ONLYOFFICE integration app for Redmine

After successful installation of ONLYOFFICE Docs, you need to get the latest version of the official integration plugin for Redmine. You can download the zipped archive either from the Redmine website or from GitHub. Also, you can clone the master branch using this command:

git clone https://github.com/ONLYOFFICE/onlyoffice-redmine

Before installing the ONLYOFFICE plugin, don’t forget to stop your Redmine instance.

After that, you need to put the onlyoffice_redmine plugin directory into the /home/redmine/redmine/plugins folder. This can be done with this command:

cp -r /root/onlyoffice_redmine/. /redmine/plugins/onlyoffice_redmine

The plugins subdirectory’s name must be onlyoffice_redmine. If necessary, rename onlyoffice_redmine-x.y.z to onlyoffice_redmine.

Now you should go to Redmine’s root directory:

cd redmine

The next step is to install all the required dependencies:

bundle install

Finally, just initialize or update the database:

RAILS_ENV=production bundle exec rake db:migrate

RAILS_ENV=production bundle exec rake redmine:plugins:migrate NAME=onlyoffice_redmine

Now you can restart your Redmine instance.


4. Configuring the ONLYOFFICE plugin for Redmine

Now that the ONLYOFFICE connector is installed, go to the Redmine Administration panel, choose Plugins, find the required plugin and click Configure. You can adjust the following parameters:

  • Document Editing Service address, the URL address where ONLYOFFICE Docs is installed (e.g. https://documentserver:8080). This field is obligatory.
  • Secret key, the secret used to validate the JSON web token upon a request to the ONLYOFFICE Document Server. Find out more about JWT configuration in the ONLYOFFICE API documentation. If you don’t need this option, just leave this field blank.

You can also adjust the customization settings but they are not necessary. If you want to change something, check the corresponding box.

Click Apply to finish the configuration process.


5. Using ONLYOFFICE Docs within Redmine

Viewing or editing text documents, spreadsheets and presentations in each Redmine module (Issues, Files, Documents, Wiki and News) depend on the corresponding user roles and permissions. To change roles and permissions, open the Administration panel, find Roles and permissions, choose what you need and click Save. You can read more about how it works on GitHub.

The ONLYOFFICE and Redmine integration allows you to edit and collaborate on DOCX, XLSX and PPTX files. Other formats are available for viewing only. To open a file for viewing or editing, you just need to click the ONLYOFFICE icon. The file will open in the corresponding editor.

With ONLYOFFICE Docs integrated with Redmine, you can:
· Edit text documents, spreadsheets and presentations in your browser;
· Co-edit documents in real-time using a range of collaborative tools, including two co-editing modes (Fast and Strict), Track Changes, comments, and a built-in chat.