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.
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
- 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
- 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 exec) as the
www-data user (www-data, http, apache, wwwrun depending on your OS) in the <docker_container> of your instance (usually
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 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?