Overview

Starting from version 6.4, ONLYOFFICE Docs offers support for the Web Application Open Platform Interface Protocol (WOPI) - a REST-based protocol that is used to integrate your application with an online office. WOPI operations allow you to open files stored on a server, edit and save them.

This documentation describes:

  • file properties that can be specified via WOPI discovery;
  • a host page that must be built to create an iframe element within the online office;
  • proof keys which are used to check that the request is received from the online office;
  • supported WOPI REST API functions;
  • available messages that can be posted via PostMessage.

For further information on the WOPI protocol, please read the WOPI documentation.

To enable WOPI, set the wopi.enable parameter in the Document Server config to true.

Parameters
Name Description Type Example
wopi.enable Defines if WOPI is enabled or not. The default value is false. boolean true
Example
{
    "wopi": {
        "enable": true
    }
}

ONLYOFFICE Docs can accept WOPI requests only from the trusted integrator. The IP address of such an integrator must be included in the WOPI domain allow list. At the same time, access for all the other integrators must be denied.

By default, all the IP addresses are considered trusted.

Follow the steps below to configure the Document Server IP filter:

  1. Open the /etc/onlyoffice/documentserver/default.json file using any available text editor:

    "ipfilter": {
        "rules": [
        {
            "address": "ip_address",
            "allowed": true
        },
        {
            "address": "*",
            "allowed": false
        }
        ],
        "useforrequest": true,
        "errorcode": 403
    }
    
  2. Change the following default settings. Enter your "ip_address" that can contain:

    • IP in the X.X.X.X format for ipv4,
    • IP in the xxxx.xxxx.xxxx.xxxx.xxxx.xxxx.xxxx.xxxx format for ipv6,
    • dns-name,
    • * wildcard to replace any symbol/symbols.
  3. Change the "allowed" rule that can be true or false.
  4. Restart the services for the config changes to take effect:

    supervisorctl restart all