The latest connector signed versions are available in the official store for Nextcloud.
You will need an instance of ONLYOFFICE Docs (Document Server) that is resolvable and connectable both from Nextcloud and any end clients. If that is not the case, use the official ONLYOFFICE Docs documentation page. ONLYOFFICE Docs must also be able to POST to Nextcloud directly.
ONLYOFFICE Docs and Nextcloud can be installed either on different computers, or on the same machine. In case you select the latter variant, you will need to set up a custom port for Document Server as by default both ONLYOFFICE Docs and Nextcloud work on port 80. Or you can use Document Server behind a proxy, please refer to this article to learn how you can configure it.
The easiest way to start an instance of ONLYOFFICE Docs is to use Docker.
You can also use our Docker installation to get installed and configured Document Server and Nextcloud installation with a couple of commands.
The Nextcloud administrator can install the integration app from the in-built application market. To do this, go to the user name and select Apps. After that, find ONLYOFFICE in the list of available applications and install it.
If the server with the Nextcloud installed does not have the Internet access, or if you need it for some other reason, the administrator can install the application manually. To start using ONLYOFFICE Docs with Nextcloud, the following steps must be performed:
In Nextcloud, open the ~/settings/admin/onlyoffice page with administrative settings for ONLYOFFICE section. Enter the following address to connect ONLYOFFICE Docs:https://<documentserver>/
where the documentserver is the name of the server with the ONLYOFFICE Docs installed. The address must be accessible for the user browser and from the Nextcloud server. The Nextcloud server address must also be accessible from ONLYOFFICE Docs for correct work.
Sometimes your network configuration might not allow the requests between installed Nextcloud and ONLYOFFICE Docs using the public addresses. The Advanced server settings allows to set the ONLYOFFICE Docs address for internal requests from Nextcloud server and the returning Nextcloud address for the internal requests from ONLYOFFICE Docs. You need to enter them in the appropriate fields.
Starting from version 7.2, JWT is enabled by default and the secret key is generated automatically to restrict the access to ONLYOFFICE Docs and for security reasons and data integrity. Specify your own Secret key in the Nextcloud administrative configuration. In the ONLYOFFICE Docs config file, specify the same secret key and enable the validation.
Enable or disable the Open file in the same tab setting.
The Open in ONLYOFFICE action will be added to the file context menu. You can specify this action as default and it will be used when the file name is clicked for the selected file types.
You can check the connection to ONLYOFFICE Docs by using the following occ command:occ onlyoffice:documentserver --check
You will see a text either with information about the successful connection or the cause of the error.
The ONLYOFFICE integration follows the API documented here.
The app prepares a JSON object with the following properties:
Validating certificate. If you are using a self-signed certificate for your Document Server, Nextcloud will not validate such a certificate and will not allow connection to/from Document Server. This issue can be solved in two ways:
'onlyoffice' => array ( 'verify_peer_off' => true )
This will disable the certificate verification and allow Nextcloud to establish connection with Document Server.
Background task. If the editors don't open or save documents after a period of proper functioning, the reason can be a problem in changing network settings or disabling any relevant services, or issues with the SSL certificate.
To solve this, we added an asynchronous background task which runs on the server to check availability of the editors. It allows testing the connection between your Nextcloud instance and ONLYOFFICE Document Server, namely availability of server addresses and the validity of the JWT secret are being checked.
If any issue is detected, the ONLYOFFICE integration connector (consequently, the ability to create and open files) will be disabled. As a Nextcloud admin, you will get the corresponding notification.
This option allows you to avoid issues when the server settings become incorrect and require changes.
By default, this background task runs once a day. If necessary, you can change the frequency. To do so, open the Nextcloud config file (_/nextcloud/config/config.php_). Insert the following section and enter the required value in minutes:
"onlyoffice" => array ( "editors_check_interval" => 3624 )
To disable this check running, enter 0 value.
Converting files. ONLYOFFICE Docs uses Office Open XML format as a basis when opening and editing files. If the file format is different from OOXML, it will still be converted to the corresponding OOXML for the Document Server proper work and faster performance. After that you can edit the file, making any changes available for the base OOXML format and save the file to this base OOXML format.
In case the source Nextcloud file format was different from the base one, and you still want to save it to the original format, the file will be converted to this format from OOXML. As the formats are fundamentally different, some data (such as charts, tables, autoshapes or images) and formatting can be lost due to the simple reason that some formats (csv, txt, etc.) do not support them or treat them differently than OOXML standard does. That is why all the non-OOXML files by default are opened for viewing only, although there is an option to convert the file in the context menu. If you realise the data/formatting loss risks after the conversion, but still want to open non-OOXML files for editing, you can check them in the list in the settings. Editing for csv and txt files is available by default.
Download the Nextcloud ONLYOFFICE integration app here.