LibreOffice Online – How to Integrate

LibreOffice Online is powerful online office suite that supports all major document, spreadsheet and presentation file formats, which can be integrated into Imixs-Documents. Key features are collaborative editing and excellent office file format support.

LibreOffice Online is available as a Docker image and is developed by Collabora. Collabora is the community mainly developing the LibreOffice Online code. You can get the collabora docker image from here.

General information about the Docker Image from Collabora can be found in the Official Integration Guide.

Setup with Docker-Compose

For test environments Imixs-Office-Workflow and Collabora can be setup with Docker-Compose. The following example shows a .yaml file including both services:

version: "3.6"

# PostgreSQL
    image: postgres:9.6.1
      POSTGRES_PASSWORD: adminadmin
      POSTGRES_DB: office
      - dbdata:/var/lib/postgresql/data

# Imixs-Documents
    image: imixs/imixs-documents:latest
      - db
      JAVA_OPTS: "-Dnashorn.args=--no-deprecation-warning"
      POSTGRES_USER: "postgres"
      POSTGRES_PASSWORD: "adminadmin"
      POSTGRES_CONNECTION: "jdbc:postgresql://db/office"      
      TZ: "Europe/Berlin"
      LANG: "en_US.UTF-8"
      MAILGATEWAY: "localhost"
      # Collabora integration
      WOPI_PUBLIC_ENDPOINT: "http://localhost:9980"
	  WOPI_DISCOVERY_ENDPOINT: "http://libreoffice-app:9980/hosting/discovery"
      WOPI_HOST_ENDPOINT: "http://imixs-documents:8080/api/wopi/"                
      - "8080:8080"
      - "9990:9990"
      - ./deployments:/opt/jboss/wildfly/standalone/deployments/

# Collabora 
	image: collabora/code:
	container_name: libreoffice-app
	- 9980
	- "9980:9980"
	- username=admin
	- password=adminadmin
	- extra_params=--o:ssl.enable=false
	- aliasgroup1=http://app:8080:443

Note: In this example the SSL configuration is disabled. You can also setup a Reverse Proxy configuration if you run in container environments like Kubernetes. You can find more details about the configuration in the official Integration Guide.

WOPI Parameters

To integrate LibreOffice Online into Imixs-Documents the following Environment Variables need to be set to configure the WOPI integration:

Variable Description Example
WOPI_PUBLIC_ENDPOINT Public access endpoint for the LibreOffice Online Suite. http://libreoffice-app:9980
WOPI_DISCOVERY_ENDPOINT Public WOPI discovery endpoint http://libreoffice-app:9980/hosting/discovery
WOPI_HOST_ENDPOINT Internal Wopi Host endpoint. This einpoint must point to the internal hostname of Imixs-Documetns http://imixs-documents:8080/api/wopi/
WOPI_FILE_EXTENSIONS Optional comma separated list of file extensions to be supported. .odt,.doc,.docx,.ods,.xls,.xlsx,.ppt,.pptx

You can find the technical details about the Imixs WOPI Protocol Adapter here.