Finally one of the cool kids

Libreoffice Online

I am a huge fan of Nextcloud as my service of choice for just about everything. Many years ago they added integration for Libreoffice and OnlyOffice, even including allowing multiple people to edit the same files in real time. This is a feature I was fascinated with, but every time I tried to enable it, it would cause my system to be unstable, predominately by not responding if the office services were not responsive for any reason.

From my logs the cause of the instability on the part of the services, was they were trying to convince the web server to run binaries that were really designed for testing instead of a production service. Running under php-fpm also seemed to have a lot of overhead and the server I was running this on is rather old and wasn't top of the line the day it was put together.

The solution I desired was for my Linux distribution of choice to offer a package for either office service. Unfortunately none materialized over the years. I am already spread thin with my open source projects, and I didn't want to commit to packaging something that releases as frequently as either of these projects. The solution from OnlyOffice was to pay them. I don't have an issue with this answer I also like getting paid for the work I do, but on a system with only 1 heavy user I couldn't make the cost make sense. On top of that I have used Libreoffice on my desktop for decades (under different names obviously), and I really do prefer the user experience of Libreoffice. The answer from my preferred offering was to use docker.

I don't like docker that much

Docker is a convenient way to put things together in a pre-determined way so that a service/app has a stable environment to run in. My problem with Docker is that is very hard to get correct unless you publish images. I use it at work because it solves some issues with development environments very well, but that experience also has turned me off because building a reproducible image is extraordinarily hard. They also tend to make debugging a little more complicated and I have spent a significant portion of my life debugging applications. So when docker was suggested as a solution for my issue I just kept putting it off and not using embedded office in Nextcloud.

Time to be popular

I decided a couple of days ago I was tired of not being able to do what I wanted because the solution I wanted wasn't readily available and installed docker on my server.

Application Setup

Following the instruction at https://www.linuxbabe.com/cloud-storage/integrate-collabora-online-server-nextcloud-ubuntu, but it is too out of date to be useful.

I suggest following the Collabora documentation, but it wasn't easy to find what I was looking for from their website and google and to help me get the answer. By the time anyone reads this these instructions are likely to be out of date also, so good luck.

To get the docker image I followed these instructions:

https://sdk.collaboraonline.com/docs/installation/CODE_Docker_image.html

To get to the service I configured a reverse proxy on my nginx server:

https://sdk.collaboraonline.com/docs/installation/Proxy_settings.html#reverse-proxy-with-nginx-webserver

Be careful, by default the docker image does not run with SSL on the service. There are advantages and disadvantages to this, but make sure your proxy is using https: or http: correctly or you will end up with a completely blank white screen. If you end up with an issue remember to check the docker logs first, they have consistently been the most verbose making diagnosing what went wrong easier.

I used docker run -t -d -p 127.0.0.1:9980:9980 -e 'aliasgropu1=https://nextcloud.morgancomputers.net:443' -e "extra_params=--o:ssl.enable=false --o:ssl.termination=true" -e "username=<usernname>" -e "password=<password>" --restart always collabora/code to for my system.

Conclusion

The original out of date instructions were useful for configuring the app in Nextcloud. I am now running cool (Collabora Online) and am now both able to do fancy Office things on my server and get to say I am a cool kid.