ONLY OFFICE Docs and Nextcloud integration to create a collaborative environment in Ubuntu

In this article you will learn how to install the ONLYOFFICE documents on your Ubuntu computer and connect the ONLYOFFICE documents server to Nextcloud via the official connector. This integration allows you to build a collaborative environment where you can edit the documents together with other users in real time.

Benefits of ONLYOFFICE Docs

ONLYOFFICE documents is a self-hosted office package that allows you to create a secure collaboration environment on a local server. It is 100% open source, so its source code is publicly available GitHub (ONLYOFFICE Document Server) under the terms of the AGPL v3 license.

Here’s what ONLYOFFICE Docs has in its arsenal:

    • Complete office package with a word processor, a spreadsheet program, a form builder and a presentation tool.
    • Integrated viewer for PDF, PDF/A, DjVu and XPS files.
    • PDF to DOCX conversion.
    • Perfect compatibility with the OOXML formats and therefore with Word documents, Excel spreadsheets and PowerPoint slides.
    • Multiple formatting features and styling tools.
    • Various document access permissions and public sharing.
    • Fast and rigorous co-editing modes.
    • Collaborate on documents in real time with change tracking, version history, comments and communication.
    • document comparison.
    • Digital signatures and watermarks.
    • Dark mode and up to 500% scaling options.
    • Free desktop editors for Windows, Linux and macOS.
    • Mobile apps for Android and iOS available for free.

All editing and collaborating features of ONLYOFFICE Docs are available in the free version called Community Edition. However, there are also scalable commercial editions with access to ONLYOFFICE web editors, technical support and regular updates for businesses and software developers.

system configuration

    • CPU: 2GHz dual core processor
    • RAM: 2GB or more
    • Hard disk: at least 40 GB
    • Swap: 4GB or more
    • OS: Ubuntu 18.04 or 20.04

Various requirements

Also, the latest version of Docker must be installed on your Ubuntu machine, as this is the easiest way to deploy the ONLYOFFICE documents. Please read this guide if you don’t already have Docker.

Also, the latest version of ONLYOFFICE Docs (aka ONLYOFFICE Document Server) must be installed. Install it by following the detailed instructions in this article.

After all, you can’t get along with the latest version of Nextcloud. This article will help you go through the installation and configuration process with less hassle.

Once you have installed and configured all the required components on your server, you can proceed with the integration process. For the sake of simplicity, the whole process is divided into several steps that you need to follow properly to ensure that the ONLYOFFICE and Nextcloud combined solution works as it is supposed to.

Step 1. Installation of ONLYOFFICE Connector

The official ONLYOFFICE integration app can be installed in two ways. The easiest way is to find them in the built-in marketplace for Nextcloud applications. All you have to do is log in to your Nextcloud instance with administrator rights and follow these steps:

    • In the top right corner of the screen, find your username and click on it.
    • Choose Applications.
    • Find the Tools category.
    • Choose ONLYOFFICE.
    • Click Download and Activate.

If done correctly, the integration app will be downloaded automatically.

Alternatively, you can also install the connector manually. For manual installation, download the official integration app from the Netxcloud App Store or from the GitHub. This command will help you get what you need from GitHub:


Please note that vX.XX indicates the version of the connector. Ideally, the most recent version should be specified here.

After launching the previous command, unzip the archive:

tar -xvzf vX.XXtar.gz

Now you need to change the folder name to only office:

mv onlyoffice-nextcloud-XXX onlyoffice

Then clone ONLYOFFICE connector source code and compile it with this command:

git clone onlyoffice
CD only office
git submodule To update –inside – recursively

Copy the resulting folder to the nextcloud server apps directory:

see -r /root/only office/ /Var/www/html/app/

Then enter the Nextcloud apps directory:

CD /Var/www/html/app

Now you need to change the owner. This operation is required to update the integration app via the Nextcloud interface:

chown -R www data: www data office only

After that, return to the Nextcloud instance and go to Settings by clicking on your username in the top right corner. Click Apps and select Disabled apps in the left pane. Locate ONLYOFFICE and click the Activate button.

Step 2. Configuration of the connector

Now you need to configure the installed integration app. To do this, please go to the Settings page and locate the Administration section on the left. Click the ONLYOFFICE icon and you will see the following options:

    • ONLYOFFICE Docs address. This mandatory option specifies the URL address of the ONLYOFFICE document server. If you installed ONLYOFFICE Docs with a custom port, please specify that port. For example, https://127.0. 0.1:8081/.
    • Disable certificate verification. This option is used to disable certificate verification that allows Nextcloud to connect to ONLYOFFICE document server when using your own self-signed certificates. However, it is recommended to use certificates issued by a Certificate Authority (CA).
    • secret key. This option signs the data.

In the Advanced Server Settings section you will find the following options:

    • ONLYOFFICE Docs address for internal requests from the server. This is the URL address used to access Nextcloud’s ONLYOFFICE documents.
    • Server address for ONLYOFFICE Docs internal requests. This is the URL address developed to access Nextcloud from the ONLYOFFICE docs.

These two options are useful if your network does not allow requests between ONLYOFFICE Docs and Nextcloud via the public addresses. After configuring the required options, don’t forget to click Save.

Also, there are some additional settings that you can enable or disable as needed. For example, the general and customization options.

When you’re done with the configuration process, you can enable the JWT to make document editing more secure.

Step 3. Enable JWT

JSON Web Token (JWT) is used in ONLYOFFICE documents to prevent unauthorized access to documents. To enable this option, you must first enable token validation and enter your secret key in ONLYOFFICE settings.

To do this, open the local.json file with any text editor. Access the ONLYOFFICE Docs Docker container by typing the docker exec -it bash command and find the /etc/onlyoffice/documentserver/local.json File.

To enable token validation, set all false values ​​to true in the following sections:

    • services.CoAuthoring.token.enable.browser
    • services.CoAuthoring.token.enable.request.inbox
    • services.CoAuthoring.token.enable.request.outbox

Enter your own secret key. It must be the same:


“Services”: {

“Co-Authoring”: {

“Sign”: {

“enable”: {

“Inquiry”: {

“Inbox”: Is correct,
“Exit”: Is correct

“browser”: Is correct


“Secret”: {

“Inbox”: {

“Line”: “Your Secret”

“Exit”: {

“Line”: “Your Secret”

“Meeting”: {

“Line”: “Your Secret”





Save your changes and restart the services:

restart supervisorctl all

Finally, enter the same secret key in ONLYOFFICE settings.

That’s it! Now you have created a collaborative environment on your Ubuntu server where you can do the following:

    • Open, edit and save text documents, spreadsheets, fillable forms and presentations.
    • Share files with the other users by using advanced sharing permissions.
    • Protect the documents with watermarks.
    • Collaborate on the documents online using the two fast and rigorous co-editing modes, change tracking and version history features, comments, user mentions and an integrated chat for text messages.

Collaborative editing over the ONLYOFFICE documents is also available between multiple connected Nextcloud instances connected to the same ONLYOFFICE document server.

Don’t forget that Nextcloud is not the only integration option for the ONLYOFFICE documents. You can integrate this open source office suite with a variety of Sync&Share platforms and document management systems to enable real-time document editing and collaboration:

    • ownCloud
    • WordPress
    • Seafile
    • red mine
    • Strapi
    • Nuxeo
    • plots, etc.

For the full list of all available integration options for the ONLYOFFICE documents see the official website.

Related Posts