Installing new fonts in Collabora

I installed collabora on a debian stretch instance without docker.
After some struggles I got it to work.
did the trick.
Still fonts used on the users laptops and desktops (microsoft) using LibreOffice and some MSOffice are not available.
A possibile solution in did not work.
(Same I found in

The way to add fonts that did work I found here:
It is explained for Ubuntu, but also works in debian.

For the core MS fonts:

sudo apt-get install ttf-mscorefonts-installer

You may be asked to accept the license agreement, i was not asked.

They end up in /usr/share/fonts/truetype/msttcorefonts

Next is to install the clear types such as calibri.

This is a bit different but can be done with the vista fonts installer script.
Make sure you have the appropriate permissions.
Create a .font folder as the script needs that.

mkdir .font
wget -qO- | bash

all new fonts are installed in the .font folder

in /usr/share/fonts/truetype create folder msttvistafonts

copy all fonts from the .fonts folder to /usr/share/fonts/truetype/msttvistafonts
change the ownerships to the same as that in the other fonts if needed.

Now run


Restart loolwsd.service and the fonts are available.

I am reviving this old topic as it is applicable to “Installing new fonts in Collabora” and I could not find a solution to my problem on the NextCloud forums.

I attempted to add my own fonts on a non-docker server as well and ran into an issue similar to that is mentioned here (also described in the next paragraph).

Where fonts were displayed in the drop down list of fonts to choose form in Collabora, but they didn’t actually appear on the document, even though the text was still there it was not actually visible.

It took me a few hours but I solved it and I posted my solution at the above link, but I will also post it in here since I have nothing to do with the nethserver community and I originally searched for the answer here but could not find it.

So, here’s what I’ve done
Installed five additional custom fonts.
Four of which are copied straight from the Windows 10 Fonts folder (Arial, Calibri, Consolas, Verdana)
One from Google Fonts (Roboto); downloaded directly from as a zip file

Uploaded them all to the server manually (SFTP) and placed each font set in their own respective folders like so, ensuring all were world readable:

ls -al /usr/share/fonts/truetype/
drwxr-xr-x 9 root root 4096 Apr 14 14:41 .
drwxr-xr-x 4 root root 4096 Apr 14 14:33 ..
drwxr-xr-x 2 root root 4096 Apr 14 14:34 arial
drwxr-xr-x 2 root root 4096 Apr 14 14:34 calibri
drwxr-xr-x 2 root root 4096 Apr 14 14:34 consolas
drwxr-xr-x 2 root root 4096 Apr 14 14:34 dejavu
drwxr-xr-x 2 root root 4096 Apr 14 14:34 lato
drwxr-xr-x 2 root root 4096 Apr 14 14:34 roboto
drwxr-xr-x 2 root root 4096 Apr 14 14:34 verdana

Copy all fonts to the following folders


Now this next command - you have to make sure that you adjust the version number to the one matching your Collabora installation for this folder: /opt/collaboraoffice6.2

Run AS ROOT (or just execute the actual command as the lool user)
su lool --shell=/bin/sh -c "loolwsd-systemplate-setup /opt/lool/systemplate /opt/collaboraoffice6.2 >/dev/null 2>&1"

And finally
systemctl restart loolwsd

Hopefully this works as well for others as it did for me.

Thanks @Sylice for this “update”! You mention:

I get no fc-update command on my Ubuntu server, here’s what fc commands I find:

fc-cache (1) - build font information cache files
fc-cat (1) - read font information cache files
fc-list (1) - list available fonts
fc-match (1) - match available fonts
fc-pattern (1) - parse and show pattern
fc-query (1) - query font files
fc-scan (1) - scan font files or directories
fc-validate (1) - validate font files

Did you mean fc-cache?

Hi, another problem is all the undesirable fonts (such as Noto* for instance) are back when you upgrade CODE…

My apologies you’re right it’s fc-cache, not fc-update. I will update that original post above.

As to getting rid of existing fonts and not allowing them to come back, I do not not how to help with that.

I did a crontab scheduled bash script to remove every night the list of fonts I don’t need in /opt/collaboraoffice6.2/share/fonts/truetype, followed by fc-cache and a systemctl loolwsd restart


I followed both @pieter and @Sylice instructions but I cannot even get the new fonts to show up in the list.
I installed msttcorefonts and msttvistafonts in both /usr/share/fonts/truetype/ and /opt/lool/systemplate/usr/share/fonts/truetype.
I run fc-cache and restarted loolwsd.service.
I did all with root user (not Nextcloud user) and the permissions for every folder are ```
drwxr-xr-x 2 root root 4096.

What could I have missed? Could it be I need to change permissions to include Nextcloud user, or maybe www-data?

1 Like

I did install this on a NON docker setup. The fonts are installed on the machine to be available to all.
For that, the fonts need the same permissions and ownership as all other already existing fonts available.

For running applications to accept, you need fc-cache and apps (loolwsd) to be restarted.

Is there any update to this tutorial? I performed all steps, renaming some of the “loolwsd” to “coolwsd”, but Fonts are not displayed proper.

Have you resolved this yet? I’ve followed the steps above renaming for cool where needed but the font basically is blank while the text is there. For example, I can see the data in a spreadsheet formula bar but it is blank in the cell.

Nevermind… I missed a step…

I’m on Ubuntu 20.04 with Collabora 22.05

I copied the ttf to both:
/opt/cool/systemplate/usr/share/fonts/truetype (thought I had it here but went back and did not)

Then ran the fc-cache
Then ran the systemctl restart coolwsd

I did run the ‘coolwsd-systemplate-setup /opt/cool/systemplate /opt/collaboraoffice >/dev/null 2>&1’ as root but not sure if this was necessary since I had to move the ttf to the folder I missed, re-ran the cache and restart and then it worked.

It works for me! I am adding new fonts to NextCloud Office ( Collabora Online - Built-in CODE Server ) as I found that it does not support Chinese characters originally.

My settings are: Ubuntu, Apache 2.4.52, MySQL 8.0, PHP 8.1 ( LAMP, non docker environment )

Here’s how i made it:

  1. Put fonts files in any path that are listed in /etc/fonts/fonts.conf (i.e. /usr/share/fonts/truetype by default)
  2. Run fc-cache -f -v
  3. Supposingly, you should see some output like this:
    /usr/share/fonts: caching, new cache contents: 0 fonts, 1 dirs
    /usr/share/fonts/truetype: caching, new cache contents: 0 fonts, 2 dirs
    /usr/share/fonts/truetype/dfkai-sb: caching, new cache contents: 6 fonts, 0 dirs
    /usr/share/fonts/truetype/dfkai-sb: caching, new cache contents: 1 fonts, 0 dirs
    /usr/local/share/fonts: caching, new cache contents: 0 fonts, 0 dirs
    /home//.local/share/fonts: skipping, no such directory
    /home//.fonts: skipping, no such directory
    /usr/share/fonts/truetype: skipping, looped directory detected
    /usr/share/fonts/truetype/dejavu: skipping, looped directory detected
    /usr/share/fonts/truetype/dfkai-sb: skipping, looped directory detected
    /var/cache/fontconfig: not cleaning unwritable cache directory
    /home//.cache/fontconfig: cleaning cache directory
    /home//.fontconfig: not cleaning non-existent cache directory
    fc-cache: succeeded

dfkai-sb is the font i added.
The above command do the caching job and shows the output.

  1. It is done.
  2. Back to the Nextcloud Office Editor ( Collabora Online - Built-in CODE Server ), you can see the font you added listed in the font selector. ( If not, try restart the apache service by sudo systemctl reload apache or even sudo systemctl restart apache and reboot your server. For me, I cannot see it after these all because I am using Cloudflare, so after these, turn on Development Mode in Cloudflare (only if you are using Cloudflare caching) to see effects immediately. )

This should help those using Collabora with Nextcloud in LAMP environment.