How to install OnlyOffice Docs and Oracle DB on Ubuntu

12 feb 2024 3 min di lettura
How to install OnlyOffice Docs and Oracle DB on Ubuntu
Indice dei contenuti

Introduction

LYONOFFICE Docs is an open source office suite that includes 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 the main format. Editors can be integrated with various cloud services such as CMS frameworks, collaboration and content platforms, issue trackers, e-learning solutions, etc. Out-of-the-box integrations include Redmine, Odoo, ownCloud, Moodle, WordPress, Confluence, Jira, and more. There is also the option to embed the suite into your app or web 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 will need at least:

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

Installing OnlyOffice

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

Once you have the latest version of Docker, you can install OnlyOFFICE Docs with all 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 regeneration during every reboot of the VMs or physical server, so there may be problems in integrations. It is recommended that you specify your value in -e JWT_SECRET=my_jwt_secret. If you won't be using 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, access http://localhost in your browser's address bar to launch the welcome page. An integration example is provided there by default together with the editors. It is a simple DMS used to test editors and see how the integration can be implemented.

To integrate OnlyOffice Docs with your required cloud platform, check out the corresponding instructions.

Storing data outside of containers

It is highly recommended to store data outside of Docker containers on the host computer as it allows you to easily update OnlyOffice Docs once the new version is released without losing data.

To gain access to 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 upgrade, you won't lose your data. You will also be able to update your certificates without interfering with the container.

Switching to HTTPS

The easiest way to switch OnlyOFFICE Docs to HTTPS is to obtain Let's Encrypt SSL certificates using certbot automatically.

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

sudo docker run -i -t -d -p 80:80 -p 443:443 --restart=always \
 -e LETS_ENCRYPT_DOMAIN=yourdomain.com -e [email protected] \
 -e JWT_SECRET=my_jwt_secret onlyoffice/documentserver

Once finished, OnlyOffice Docs will be available in https://yourdomain.com format.

Oracle database connection

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

To connect Oracle database, change the DB_TYPE parameter to oracle.

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

Conclusion

We showed you how to install OnlyOFFICE Docs on Ubuntu 22.04 and connect to Oracle DB. You can now edit and co-edit various Office documents within the cloud platform you already use.

If you have any questions, leave comments below.

Support us with a

Successivamente, completa il checkout per l'accesso completo a Noviello.it.
Bentornato! Accesso eseguito correttamente.
Ti sei abbonato con successo a Noviello.it.
Successo! Il tuo account è completamente attivato, ora hai accesso a tutti i contenuti.
Operazione riuscita. Le tue informazioni di fatturazione sono state aggiornate.
La tua fatturazione non è stata aggiornata.