Allow editing page files in common office formats directly in the ProcessWire backend with LibreOffice Online / Collabora CODE.


ProcessWire module - inline editing for office documents using Collabora CODE


This module adds inline editing capabilities for office documents to the ProcessWire OpenSource CMS. It uses the free Collabora CODE server that is used in other projects like OwnCloud or NextCloud.

Module Status



  • An Installation of ProcessWire CMS with Apache or NGINX on a docker-capable server
  • Docker runtime
  • HTTPS with a certificate trusted by the browser (e.g. from LetsEncrypt)
  • A working installation of the Collabora CODE docker image
  • This module, apparently

Step by step

  • Install ProcessWire 3 as documented here. If you are new to ProcessWire, you may want to select a site profile other than "blank"
  • Download this module through the green icon at the top right and extract the contents into the site/modules directory of your ProcessWire installation
  • Enter the ProcessWire admin backend, go to "Modules" -> "Refresh" and install ProcessLoolEditor (titled "LibreOffice Online Editor")
  • Copy the file "wopi-template.php" from the modules directory to site/templates, rename it there to "wopi.php" and make sure it is readable by the web server
  • Create a template named "wopi". It needs no additional fields
  • Create a page named "wopi" under /home and set it to "hidden"
  • Configure your webserver to use https encryption
  • Install Collabora CODE like documented here in steps 1 to 5 (no need to do dabble with the NextCloud app. Take care to follow all the instructions, especially regarding the docker run syntax and webserver configuration, to the point
  • Enable LoolEditor on a file field (go to Setup -> Fields, choose your file field there, change to the "Details" tab and scroll to the bottom. You will find a checkbox there to enable LoolEditor for this field: Screenshot of enabling LoolEditor
  • Edit a page with a file field in ProcessWire and upload an office document. After saving, you will see an edit icon right of the filename. Click on it.
  • Your LibreOffice editor should open in a modal and you should be able to edit the file and save any changes


  • Pass the correct locale to the CODE leaflet
  • Finish implementing file locking [X] Done
  • Make the editor modal look nicer and fit the editor more tightly into the available space [X] Done
  • Add a little more error handling and reporting
  • Allow more customization
  • Make editor use configurable on a per-field basis [X] Done


Screen capture of LoolEditor

More on installing CODE

If the container doesn't start on Ubuntu 16.04

I had a bit of trouble getting my Collabora CODE docker instance to run on Ubuntu 16.04. The container simply failed to spin up with a cryptic error message saying something about an invalid graphdriver. Despite how it sounds, this has nothing to do with graphics at all. The culprit apparently was that a disagreement about storage driver. I could fix this by adding a /etc/docker/daemon.js as described here.

Server behind NAT

I'm using my local development machine behind a NAT, so the official server name resolves to a public IP. CODE whoever needs to communicate with ProcessWire on the internal IP, as my router (like most) doesn't allow looping connections.

Thus, I had to tell the docker container to resolve the official hostname to the private IP instead of the public one. Fortunately, there's a command line argument for docker run that does just that. Use

docker run ...your other arguments...


This module is released under MPL 2.0. See the LICENSE file in this repository for details.


Big thanks go to

  • The LibreOffice folks who built a viable alternative for office software in a monopolized market and keep improving it
  • The folks at Collabora for their efforts in bringing LibreOffice into the web

Install and use modules at your own risk. Always have a site and database backup before installing new modules.

Latest news

  • ProcessWire Weekly #532
    In the 532nd issue of ProcessWire Weekly we'll cover the latest core updates, check out a couple of brand-new third party modules, and more. Read on! / 20 July 2024
  • Page List Custom Children module
    This simple module gives you the ability to customize the parent/child relationship as it appears in the admin page list, enabling child pages to appear under more than one parent.
    Blog / 28 June 2024
  • Subscribe to weekly ProcessWire news

“To Drupal, or to ProcessWire? The million dollar choice. We decided to make an early switch to PW. And in retrospect, ProcessWire was probably the best decision we made. Thanks are due to ProcessWire and the amazing system and set of modules that are in place.” —Unni Krishnan, Founder of PigtailPundits