Integrating Office Applications

Introduction

If you install the WOPI (Web Application Open Platform Interface) server extension, you can integrate major office applications like Collabora and ONLYOFFICE in Infinite Scale.

For this purpose, ownCloud offers Docker containers with sample configurations available on GitHub.

For details on how WOPI integrates with Infinite Scale see: Office Applications using WOPI.

The docker stack consists of several containers:

  • One of them is Traefik, a modern HTTP reverse proxy and load balancer which is terminating SSL and forwards the requests to Infinite Scale in the internal Docker network.

  • Then there is Infinite Scale configured with a custom mimetype,

  • the WOPI server,

  • and Collabora and OnlyOffice containers.

Note that it is not mandatory to use and configure both example office application stacks. Configure only the application stacks that you need.

Hardware Requirements

With focus on the office container, ONLYOFFICE provides a link with some guidance for hardware requirements depending on concurrent active users when using their community edition and docker. See ONLYOFFICE Docs Community Edition for Docker system requirements for more details. This information gives estimates without any guarantees.

General Requirements

You need a Linux server with docker and docker-compose installed.

Then you need to set up the following domains pointing to your server:

  • ocis.* for serving Infinite Scale

  • collabora.* for serving Collabora

  • onlyoffice.* for serving OnlyOffice

  • wopiserver.* for serving the WOPI server

  • traefik.* for serving the Traefik dashboard

The Traefik stack can also be run locally. One downside is, that Traefik can not obtain valid SSL certificates and therefore will create self-signed ones. This means that your browser will show security warnings. Another downside is, that you cannot point DNS entries to your localhost. So you have to add static host entries to your system. On Linux and macOS you can add them to your /etc/hosts file like this:

127.0.0.1 ocis.owncloud.test
127.0.0.1 traefik.owncloud.test
127.0.0.1 collabora.owncloud.test
127.0.0.1 onlyoffice.owncloud.test
127.0.0.1 wopiserver.owncloud.test

For the clients, make sure that the addresses can be resolved to the server(s) running this setup.

Installation

Installing the Docker stacks only requires a few steps. Take care to use the relevant version. Select a base folder of choice for the target location. Note that the examples use the version corresponding to this release.

  1. Get the deployment example:

    Follow the WOPI Configuration Examples to download the example files.

    After all resources have been downloaded, change into the directory:

    cd ocis_wopi

Configuration

The configuration uses a docker-compose file with an environment variable file for ease of handling. This docker-compose file defines which additional containers are needed and how the containers are configured.

  1. Firstly, the environment definition file needs to be adapted. This file defines many basic settings in one location. Open it in a text editor and adjust it according to your needs.

    For some hints on what to take into consideration, check the notes listed here:

    • If you are installing Infinite Scale on a server and Traefik will obtain valid certificates for you, remove INSECURE=true or set it to false.

    • If you want to use the Traefik dashboard, set TRAEFIK_DASHBOARD to true (default is false and therefore not active). If you activate it, you must set a domain for the Traefik dashboard in TRAEFIK_DOMAIN=, for example TRAEFIK_DOMAIN=traefik.owncloud.test.

    • The Traefik dashboard is secured by Basic Auth. Default credentials are the user admin with the password admin. To set your own credentials, generate a htpasswd (e.g. by using an online tool or a CLI tool).

    • Traefik will issue certificates with LetsEncrypt. Therefore you must set an email address in TRAEFIK_ACME_MAIL=.

    • By default Infinite Scale will be started with the latest version. If you want to run a specific version of Infinite Scale, set the version to OCIS_DOCKER_TAG=. Available versions can be found on Docker Hub.

    • Set your domain for the Infinite Scale web frontend in OCIS_DOMAIN=, for example OCIS_DOMAIN=ocis.owncloud.test.

    • Set the initial admin user password in ADMIN_PASSWORD=. It defaults to admin.

    • By default, the CS3Org WOPI server will be started with the version from the examples, which might not be the latest stable released version. If you want to start a different or more recent version, you can set the WOPISERVER_DOCKER_TAG=. Available versions can be found on Docker Hub.

    • Set your domain for the CS3Org WOPI server in WOPISERVER_DOMAIN=, where all office suites can download the files via the WOPI protocol.

    • You also must override the default WOPI JWT secret for a secure setup. Do this by setting WOPI_JWT_SECRET to a long and random string.

    • For OnlyOffice, WOPI is not enabled by default. It has to be set explicitly via WOPI_ENABLED: "true".

    • To set up Collabora, you need to specify the domain of Collabora in COLLABORA_DOMAIN=.

    • If you want to use the Collabora admin panel, you need to set the username and password for the administrator in COLLABORA_ADMIN_USER= and COLLABORA_ADMIN_PASSWORD=.

    • Next, enter the OnlyOffice domain in ONLYOFFICE_DOMAIN=.

  2. Though no changes are needed, adapt the UI representation of the office applications for use in ownCloud Web if required. As an example, the settings currently do not have any icons defined that show up in the web UI with the names of available office applications to open. This can be changed if required.

  3. For Microsoft Office 365, adapt the wopiserver.conf.dist file by adding the correct proxy URL. For more details about the background and how to obtain this URL see Office Applications using WOPI.

Start the Docker Stack

  1. When the changed files have been saved, start the Docker stack with:

    docker-compose up -d

Access Infinite Scale

  1. Enter your Infinite Scale domain in a browser and you’re ready to log in and open office documents in the web client. It might take a few minutes for all services to become operational because the containers need to download first. Just keep reloading the pages from time to time or run:

    docker ps

    to see the process status of the containers if they are up and running before accessing Infinite Scale.