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:

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

All the necessary WOPI settings you can find and change in the configuration file which can be found (or created) at the following path:

For Linux - /etc/onlyoffice/documentserver/local.json.

For Windows - %ProgramFiles%\ONLYOFFICE\DocumentServer\config\local.json.

The default values are available in the default.json configuration file, which is available in the folders above (for Linux and Windows). Please do not edit the contents of the default.json file directly. The default values will be restored each time you restart Docker container or upgrade ONLYOFFICE Docs to a new version and all your changes will be lost.

Enabling WOPI

To enable WOPI, set the wopi.enable parameter in the ONLYOFFICE Docs config to true:

Parameters

NameTypeExampleDescription
wopi.enablebooleantrueDefines if WOPI is enabled or not. The default value is false.

Example

{
  "wopi": {
    "enable": true
  }
}

IP filter

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 ONLYOFFICE Docs IP filter:

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

    {
      "ipfilter": {
        "rules": [
          {
            "address": "ip_address",
            "allowed": true
          },
          {
            "address": "*",
            "allowed": false
          }
        ],
        "useforrequest": false,
        "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:

    For RPM/DEB packages:

    systemctl restart ds-*
    

    For Docker:

    supervisorctl restart all
    

WOPISrc

Starting from version 8.0, the WOPISrc query parameter is added to the requests from the browser to the server. This allows you to create several independent instances of ONLYOFFICE. Load balancing requests with WOPISrc ensure that collaborative editing works correctly: all users editing the same document are served by the same server.

For WOPI, the parameter sent by the integrator is used. For Docs API, the shardkey parameter is used.

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).