Install ONLYOFFICE Docs on Ubuntu 22.04 and connect Oracle DB

Published on

4 min read


Tatiana Kochedykova
Install ONLYOFFICE Docs on Ubuntu

ONLYOFFICE Docs is an open-source office suite that comprises collaborative editors for text documents, spreadsheets, presentations, forms and PDFs. The package is distributed under the AGPL v3.0 license. OOXML (DOCX, XLSX, and PPTX) is used as a core format. The editors can be integrated with various cloud services such as CMS frameworks, collaboration & content platforms, issue trackers, e-learning solutions, etc. Among ready-to-use integrations, there are Redmine, Odoo, ownCloud, Moodle, WordPress, Confluence, Jira, and others. There is also a possibility to embed the suite into your own web app or service.

This article explains how to install ONLYOFFICE Docs on Ubuntu 22.04 using Docker and connect Oracle Database.

Hardware Requirements

To install ONLYOFFICE Docs, you’’ll need at least:

  • CPU: dual-core 2 GHz or better
  • RAM: 4 GB or more
  • HDD: at least 40 GB of free space
  • SWAP: at least 4 GB (but it depends of the host OS)
  • The latest Docker version


The easiest way to install the suite is to use Docker. The developers officially recommend this method. If you do not have Docker installed, you can refer to the Docker installation instructions .

Once you have the latest version of Docker, you can install ONLYOFFICE Docs with all the dependencies using a single command:

sudo docker run -i -t -d -p 80:80 --restart=always \  -e JWT_SECRET=my_jwt_secret onlyoffice/documentserver
In ONLYOFFICE Docs, a JWT secret is generated randomly. If the JWT secret is not specified with the environment variable, it leads to its re-generation during every VMs or physical server reboot, so there might be problems in integrations. It’s recommended to specify your own value in -e JWT_SECRET=my_jwt_secret. If you are not going to use JWT in your installation, use -e JWT_ENABLED=false.

If you want to change the port, use the -p option:

sudo docker run -i -t -d -p <PORT_NUMBER>:80 --restart=always \  -e JWT_SECRET=my_jwt_secret onlyoffice/documentserver

Once ready, enter http://localhost in your browser address bar to launch the welcome page. There, an integration example is provided by default together with the editors. It’’s a simple DMS used to test the editors and see how the integration can be implemented.

To integrate ONLYOFFICE Docs with the required cloud platform, check the corresponding instructions .


Storing Data Outside Containers

Storing the data outside the Docker containers on the host machine is highly recommended as it allows easily updating ONLYOFFICE Docs once the new version is released without losing data.

To get access to the data located outside the container, mount the volumes. It can be done by specifying the -v option in the Docker run command:

sudo docker run -i -t -d -p 80:80 --restart=always \    -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice  \    -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data  \    -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \    -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql \    -e JWT_SECRET=my_jwt_secret onlyoffice/documentserver

If you delete the container or something goes wrong during the update, you won’t lose your data. You will also be able to update your certificates without messing with the container.

Switching to HTTPS

The easiest way to switch ONLYOFFICE Docs to HTTPS is to get Let’s Encrypt SSL Certificates using certbot automatically.

Run the ONLYOFFICE Docs Docker container. Specify ports 80 and 443 and set your domain name and email:

sudo docker run -i -t -d -p 80:80 -p 443:443 --restart=always \    -e -e \    -e JWT_SECRET=my_jwt_secret onlyoffice/documentserver

Once done, ONLYOFFICE Docs will be available under

Connecting Oracle DB

Refer to the docker run command options for the --env-file flag, where you can specify all required environment variables in a single file. This will save you from writing a potentially long docker run command.

To connect the Oracle Database, adjust the DB_TYPE parameter to oracle.

To use the advanced connection settings for Oracle, use the oracleExtraOptions parameter.


We have shown you how to install ONLYOFFICE Docs on Ubuntu 22.04 and connect to the Oracle DB. Now, you can edit and co-edit various office documents within the cloud platform you already use.

If you have any questions, please leave comments below.

About the authors

Tatiana Kochedykova