HOWTO Functional Collabora Online + Collabora CODE Server on a Raspberry Pi 4 (ARM64)

It only took two months to figure out how to make this the Collabora Online document server work on a Raspberry Pi 4. Heh.

This was stupidly over-complicated for what ended up being a relatively simple fix.

The root problem that prevented Collabora Online from working using a Collabora CODE Server is the PHP_MEMORY_LIMIT not working the way it should.
Without a PHP_MEMORY_LIMIT=512M set when installing the Collabora CODE Server it will time out and fail even if it says it was successfully installed.

It took three or four hours of playing before I was finally able to find the precise command necessary to get everything up and running. It was NOT easy and I am not quite sure why the documentation and support across the web was so unclear about this issue.

Without further ado here are the steps that I took to get Collabora Online using a Collabora CODE Server on NextcloudPi installed with Docker and running on a Raspberry Pi 4 (ARM64) platform:

NOTE: I ran these commands from a terminal while SSHed into my NextcloudPi server. While these commands are tailored specifically for a Docker installation the issue with Collabora Online/CODE rendering systems unusable seems to be platform agnostic and this solution (and the accompanying commands for each installation method) should fix the problem across platforms.


FIXING COLLABORA ONLINE

  1. INSTALL COLLABORA CODE

sudo docker exec -it -u www-data <docker_container> php -d memory_limit=512M /var/www/nextcloud/occ app:install richdocumentscode_arm64

  1. INSTALL COLLABORA ONLINE

sudo docker exec -it -u www-data <docker_container> php -d memory_limit=512M /var/www/nextcloud/occ app:install richdocuments


That’s it. That should fix everything.

First Collabora CODE Server, then Collabora Online.

Each command needs to be run through docker (docker exec) as the www-data user (www-data, http, apache, wwwrun depending on your OS) in the <docker_container> of your instance (usually nextcloudpi).

I could not find a single instance where the PHP_MEMORY_LIMIT=512M ever worked. php -d memory_limit=512 was the only combination of arguments that actually raised the memory limit.

Also neither the /.occ, occ nor the ncc commands worked for me. It was only after running the string /var/www/nextcloud/occ that I finally cracked the code.


Could anyone explain to me the logic behind this? I have coded in C++ but never played in Python before.

Why did so many command/argument structures fail but this one work?

2 Likes

I may have found some hint through this command :
sudo docker exec -it -u root nextcloud ls -lh
Moreover my path to occ was not the same as you, and i should have found it with:
sudo docker exec -it -u root nextcloud find / occ

So, all problems to execute occ should be solved through the docker exec command.

Hope this could help some people