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.

The docker stack consists of several containers. One of them is Traefik, a proxy 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.

Three Infinite Scale app driver containers register Collabora and ONLYOFFICE at the app registry. Then there is the WOPI server plus Collabora and OnlyOffice.

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 oCIS

  • collabora.* for serving Collabora

  • onlyoffice.* for serving OnlyOffice

  • wopiserver.* for serving the WOPI server

  • traefik.* for serving the Traefik dashboard

This docker 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 and on Windows to C:\Windows\System32\Drivers\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

Installation

Installing the Docker stack only requires a few steps. Take care to use the relevant tag in the URL for copying or switch to the relevant tag after cloning. Select a base folder of choice for the target location:

  1. Get the deployment examples by either cloning or copying:

    1. Clone the Infinite Scale repository :

      git clone https://github.com/owncloud/ocis.git

      Checkout the relevant tag, replace <tag> accordingly:

      checkout tags/<tag> -b master

      If wanted, create a local branch for any local configuration changes to easily keep track on updates when switching to an updated tag.

      Change into the ocis_wopi/ directory:

      cd ocis/deployments/examples/ocis_wopi
    2. Or copy all files and folders from the examples location of github, replace master in the link with the tag you want to use before copying. For ease of reference, the directory where all content has been copied to is named ocis_wopi.

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

      cd ocis_wopi
  2. Open the .env file in a text editor and adjust it according to your needs.

    For some hints on what to take into consideration, check the example .env file listed here:

    # If you're on an internet facing server please comment out the following line.
    # It skips certificate validation for various parts of oCIS and is needed if you use self-signed certificates.
    INSECURE=true
    
    ### Traefik settings ###
    # Serve Traefik dashboard. Defaults to "false".
    TRAEFIK_DASHBOARD=
    # Domain of Traefik, where you can find the dashboard. Defaults to "traefik.owncloud.test"
    TRAEFIK_DOMAIN=
    # Basic authentication for the dashboard. Defaults to user "admin" and password "admin"
    TRAEFIK_BASIC_AUTH_USERS=
    # Email address for obtaining LetsEncrypt certificates, needs only be changed if this is a public facing server
    TRAEFIK_ACME_MAIL=
    
    ### oCIS settings ###
    # oCIS version. Defaults to "latest"
    OCIS_DOCKER_TAG=
    # Domain of oCIS, where you can find the frontend. Defaults to "ocis.owncloud.test"
    OCIS_DOMAIN=
    # oCIS admin user password. Defaults to "admin".
    ADMIN_PASSWORD=
    # The demo users should not be created on a production instance
    # because their passwords are public. Defaults to "false".
    DEMO_USERS=
    
    ### Wopi server settings ###
    # cs3org wopi server version. Defaults to "v8.3.3"
    WOPISERVER_DOCKER_TAG=
    # cs3org wopi server domain. Defaults to "wopiserver.owncloud.test"
    WOPISERVER_DOMAIN=
    # JWT secret which is used for the documents to be requested by the Wopi client from the cs3org Wopi server. Must be changed in order to have a secure Wopi server. Defaults to "LoremIpsum567"
    WOPI_JWT_SECRET=
    
    ### Collabora settings ###
    # Domain of Collabora, where you can find the frontend. Defaults to "collabora.owncloud.test"
    COLLABORA_DOMAIN=
    # Admin user for Collabora. Defaults to blank, provide one to enable access
    COLLABORA_ADMIN_USER=
    # Admin password for Collabora. Defaults to blank, provide one to enable access
    COLLABORA_ADMIN_PASSWORD=
    
    ### OnlyOffice settings ###
    # Domain of OnlyOffice, where you can find the frontend. Defaults to "onlyoffice.owncloud.test"
    ONLYOFFICE_DOMAIN=
    
    # If you want to use debugging and tracing with this stack,
    # you need to uncomment the following line. Please see documentation at
    # https://owncloud.dev/ocis/deployment/monitoring-tracing/
    #COMPOSE_FILE=docker-compose.yml:monitoring_tracing/docker-compose-additions.yml
    • 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 also be started in the latest version. If you want to start a different 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 done by setting WOPI_JWT_SECRET to a long and random string.

    • 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=.

  3. Save the file and start the Docker stack:

    docker-compose up -d
  4. Enter your Infinite Scale domain in a browser and you’re ready to log in and open OpenOffice documents in the web client. It might take a few minutes for all services to become operational. Just keep reloading the pages from time to time.