Help with Collabora Online with Nextcloud (both dockers in Ubuntu 24.04) sharing fonts

So I needed to load some fonts used for existing LO docs that I moved to Collabora Online. I’m going to walk through what I did. Maybe I did something wrong or missed a step. Please let me know. (btw I’m not a Ubuntu/Linux expert so pardon my fumbling)

I found an Admin setting that seems to allow uploading fonts to Nextcloud.

I upload the fonts, a bit sad the upload only allows one file to be uploaded at a time. Regardless, it is done.

At the bottom is a helpful note about linking these fonts uploaded in the Nextcloud docker to the Collabora Online docker.

When I manually pull that JSON file with a browser, I can see it and it has all the fonts seen in the screenshot above. So I know they are there on NextCloud.

Now I have to alter a configuration in the Collabora Online docker. Some research shows it is a file called coolwsd.xml and it has the referenced XML <remote_font_config> element seen above. That file is in the docker file system and the path there is /etc/coolwsd/coolwsd.xml.

However, I need to verify this (because that’s how my brain works). So I dig in and find that it is there and in the process learn you can’t sudo a cd command :slight_smile: but I still get there. I need to alter this file but I learn that may not be a good idea because the docker image will be updated someday and I would lose any changes.

Long story short, I’ll share the commands from my .bash_history that I used to “solve” my problem.

docker cp collabora_online:/etc/coolwsd/coolwsd.xml ./cool/coolwsd.xml

The cp docker command lets me copy files into and out of the docker file system. Now I alter the file, changing that <remote_font_config>so it looks like:

<remote_font_config>
	<url>http://[my_server_ip]:[port]/apps/richdocuments/settings/fonts.json</url>
</remote_font_config>

While I could put this changed file back into the docker file system, that is doomed to be overwritten so I find a way to change the docker run call so I don’t need to by using -v and making a permanent spot for the altered coolwsd.xml to sit outside the docker. Here are the commands I used.

docker stop collabora_online

docker rm collabora_online

Those two commands stop and delete the old docker. This makes way for my changed configuration.

docker run -t -d -p 9980:9980 -v /home/<usernam>/cool/coolwsd.xml:/etc/coolwsd/coolwsd.xml -e “extra_params=–o:ssl.enable=false --o:user_interface.use_intergration_theme=false” --name collabora_online --restart always collabora/code

This looks very much like the original but with an added -v section. That defines the new location for coolwsd.xmlthat is outside the docker file system and hence doesn’t get deleted when the docker image is overwritten. Then I restart Nextcloud because it seems like a good idea.

docker restart nextcloud

With my limited understanding, I think this should work, but it doesn’t. Even after rebooting, the list of fonts accessible by Collabora Online documents remains unchanged.

Any suggestions?

Thank you

hey @lochnar187

Hmm Most likely Collabora can’t reach that URL from inside its container. Your browser can hit it fine, but Collabora lives in its own little Docker world. Test it:

docker exec -it collabora_online bash
curl http://[my_server_ip]:[port]/apps/richdocuments/settings/fonts.json

If that fails, that’s your problem — use your host’s real LAN IP or the Nextcloud container name if they share a Docker network.

Two other quick things to check:

Your own screenshot warns that http only works for debug builds — production Collabora needs https. Check docker logs collabora_online 2>&1 | grep -i font for silent rejections.

Also, look at your docker run command — that –o:ssl.enable=false has an em-dash instead of a double hyphen. Classic copy-paste-from-a-blog issue. If that’s in your real command, the flag is being ignored entirely.

Start with the curl test from inside the container — that’ll tell you almost everything.

First, check the Collabora logs for any font-related errors or warnings. Then exec into the Collabora container and try to curl the fonts.json URL. Those two things will almost certainly reveal which of the above issues is biting you

Thanks
Darshan

Hi @darshan

That was very helpful! It reports a failure and the logs (I just discovered docker logs <container>) have several Remote config url should only use HTTPS protocol errors. That means I need to get SSL working, something I wanted to do this past weekend but then life happens :slightly_smiling_face:

I may have more questions about that but I’ll dig into it first.

Thank you again for all your help!