How to Install ONLYOFFICE Docs on Debian and Ubuntu

If you use the file sync & share platform and want to expand its functionality by adding online editing features, you should definitely give a try to ONLYOFFICE Docs.

ONLYOFFICE Docs allows you to create a collaborative environment by adding its online editors to the platform of your choice, whether it be Alfresco, Confluence, Liferay, Nextcloud, Nuxeo, ownCloud, SharePoint, or ONLYOFFICE Groups.

ONLYOFFICE Docs offers the following functionality:

  • Online editors for text documents, spreadsheets, and presentations.
  • Collaborative editing in real-time (two co-editing modes, track changes, version history, and version comparison, comments and mentions, built-in chat).
  • Different access permissions (full access, review, form filling, commenting, read-only as well as custom filter for spreadsheets).
  • Support for all popular formats: DOC, DOCX, TXT, ODT, RTF, ODP, EPUB, ODS, XLS, XLSX, CSV, PPTX, HTML.
  • Built-in plugins and micros for more editing capabilities (YouTube, Thesaurus, Translator, Zotero, and Mendeley for reference management, etc.).
  • Ability to create and connect third-party plugins via API.

What’s new in ONLYOFFICE Docs 6.1

Before installing ONLYOFFICE Docs, let’s have a look at the main improvements brought by version 6.1:

  • Sheet views.
  • Improved chart data editing
  • Endnotes
  • Cross-references
  • Line counting
  • New proofing options.

To find out more, please refer to the detailed changelog on GitHub.

System Requirements

First of all, you need to make sure that your machine meets the following requirements:

  • CPU: dual-core, 2 GHz, or better.
  • RAM: 2 GB or more.
  • HDD: at least 40 GB of free space.
  • Swap: at least 4 GB.
  • OS: 64-bit Debian, Ubuntu, or their derivatives with kernel version 3.13 or later.

It’s also necessary that PostgreSQL, NGINX, libstdc++6, and RabbitMQ be installed in the system.

List of the Required Dependencies

Please note that the installation of ONLYOFFICE Docs on Debian-based distributions requires libstdc++6 and NGINX (they are installed and configured automatically during the installation process) as well as PostgreSQL.

There are some other dependencies that are installed along with ONLYOFFICE Docs:

  • libcurl3
  • libxml2
  • supervisor
  • fonts-dejavu
  • fonts-liberation
  • ttf-mscorefonts-installer
  • fonts-crosextra-carlito
  • fonts-takao-gothic
  • fonts-opensymbol

These are installed automatically if you use Ubuntu 14.04 LTS or later.

In this article, we are going to learn how to install ONLYOFFICE Docs on Debian, Ubuntu, and their derivatives.

Installation of PostgreSQL on Ubuntu

ONLYOFFICE Docs uses NGINX and PostgreSQL as a database. The dependencies found in the system repository will be installed automatically in the ONLYOFFICE Docs installation using the apt-get command.

Install the version of PostgreSQL, included in your version of Ubuntu.

$ sudo apt-get install postgresql

After PostgreSQL is installed, create the PostgreSQL database and user. Please note that the created database must use onlyoffice both for user and password:

$ sudo -i -u postgres psql -c "CREATE DATABASE onlyoffice;"
$ sudo -i -u postgres psql -c "CREATE USER onlyoffice WITH password 'onlyoffice';"
$ sudo -i -u postgres psql -c "GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice;"
Create PostgreSQL Database
Create a PostgreSQL Database

Installation of RabbitMQ on Ubuntu

To install RabbitMQ, run the following command.

$ sudo apt-get install rabbitmq-server

If you use Ubuntu 18.04, you will also have to install nginx-extras by running the following command.

$ sudo apt-get install nginx-extras

Installation of ONLYOFFICE Docs on Ubuntu

To install ONLYOFFICE Docs, add the GPG key.

$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5

Then add the ONLYOFFICE Docs repository.

$ sudo echo "deb https://download.onlyoffice.com/repo/debian squeeze main" | sudo tee /etc/apt/sources.list.d/onlyoffice.list

Update the package manager cache.

$ sudo apt-get update

Then, you need to install mscorefonts (it’s required for Ubuntu).

$ sudo apt-get install ttf-mscorefonts-installer

For Debian, add the contrib component to /etc/apt/sources.list file.

$ sudo echo "deb http://deb.debian.org/debian $(grep -Po 'VERSION="[0-9]+ \(\K[∧)]+' /etc/os-release) main contrib" | sudo tee -a /etc/apt/sources.list

Now it’s time to install ONLYOFFICE Docs.

$ sudo apt-get install onlyoffice-documentserver

During the installation process, you will be asked to enter a password for the onlyoffice PostgreSQL user. Please use the onlyoffice password that you have specified when configuring PostgreSQL.

Configure OnlyOffice Document Server
Configure OnlyOffice Document Server

When the installation is over, the package will be updated just like any other deb package.

Changing the Default ONLYOFFICE Docs Port

By default, ONLYOFFICE Docs uses port 80. You can change the default port for ONLYOFFICE Docs if you plan to use another one.

To do that, you will need to change the default port for the debconf system by running the command.

$ echo onlyoffice-documentserver onlyoffice/ds-port select <PORT_NUMBER> | sudo debconf-set-selections

Please write the port number instead of the <PORT_NUMBER> in the above command.

There are some additional options that can be used for ONLYOFFICE Docs installation. They are described in this article.

Testing ONLYOFFICE Docs with Example

By default, ONLYOFFICE Docs (packaged as Document Server) includes only the editors. To start using them, you have to integrate the editors either with ONLYOFFICE Groups (packaged as Community Server) or with another sync & share platform.

If you want to test the editors before integration, you can use the test example. It’s a simple document management system that helps you check if the editors work correctly. If there are some issues, the test example will allow you to identify them.

OnlyOffice Document Server
OnlyOffice Document Server

The test example is disabled by default, but you can see the instructions on how to start it on your start screen. After starting the example, you’ll see this at http://docserverurl/example (this is the default address, it may be different for your installation):

OnlyOffice Document Editors
OnlyOffice Document Editors

The test example allows you to:

  • upload local files to see what they will look like in ONLYOFFICE Docs.
  • create new docx, xlsx, and pptx files.
  • test the editors’ functionality.
  • open files in different sharing modes available in ONLYOFFICE (for reviewing/commenting, etc.) and much more.
Conclusion

Now ONLYOFFICE Docs is installed and ready for integration with a third-party platform. ONLYOFFICE Docs is distributed under a dual-license model. This means that as long as you respect the terms of GNU AGPL v.3 licenses, you can use the ONLYOFFICE open source solution available on GitHub. There are a lot of successful integration options: ownCloudNextcloud, Liferay, HumHub, Nuxeo, etc.

If you need professional technical support and scalability and want to get access to professional editing features (e.g. document comparison and content controls) as well as ONLYOFFICE mobile web editors, you will need a commercial version of ONLYOFFICE Docs. It’s up to you to decide what suits your needs best.

We hope this guide was useful to you. Please feel free to share your thoughts in the comments section 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.

1 thought on “How to Install ONLYOFFICE Docs on Debian and Ubuntu”

  1. I’m working with members of my extended family to launch e-commerce activities on the micro-enterprise scale, as a way of avoiding their need for person-to-person contact in the present circumstances. My role is to provide what IT know-how I possess, bearing in mind that my contribution may be time-limited due to age-related factors.

    Thank you for introducing me to ONLYOFFICE, and particularly of its links with cloud storage facilities. This may be useful to us because setting up a project requires collaboration between an IT-geek and someone who’s on the learning curve with the intention of becoming capable of working on their own.

    Linux is not the obvious choice in this situation, though it could be one way of persuading users to dedicate a low-end machine that no longer works with Windows exclusively to their commercial activities. Perhaps, therefore, the presentation could have started with a few words to explain that the procedure is nothing to be frightened about if you just copy-paste the “geek stuff”. Point of detail: as always, it’s worth reminding users that in Linux terminals paste is Ctrl+Shift+V.

    It might also be useful to explain what dependencies are… and that – we hope – the latest developments will spare users the present hassle involved in installing, and above all maintaining, software applications under Linux.

    Reply

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.