Adding new fonts to ONLYOFFICE docuserver installed from Snap

ONLYOFFICE cloud: Personal
Do you want to: Ask a how-to question
Browser version: Firefox

Dear ONLYOFFICE crew!

I have installed the document server on Debian from the Snap store, and use it behind a reverse proxy with NextColud integration. Everything works nice.

However, for installing new fonts, I’m a bit confused. I have installed new fonts with apt install from the official Debian repositories. These fonts are placed in /usr/share/fonts. Then, I ran sudo fc-cache -f -v which is supposed to refresh the font cache. This, however, is seemingly ineffectual for Onlyoffice, which has its own usr/share/fonts in the mount point under /snap/onlyoffice-ds/82/ managed by Snapd.

I have found on the documentation site, that I should run documentserver-generate-allfonts.sh to refresh the font cache for the document server, but I don’t find anything equivalent for this shell script for the snap version (and I also couldn’t find this shell script anywhere just to see what commands it contain).

I appreciate any help.
Thanks!

Hello @nicemicro
Please try to follow my steps to add additional font:

  1. Go to the host and run mkdir /usr/share/fonts/
  2. Copy your font to this folder.
  3. snap remove onlyoffice-ds and after that sudo snap install onlyoffice-ds.
  4. Clean browser cache and check the result.

Usually we recommend to prepare whole server snapshot\backup just in case before any server side actions.

One more thing. We have discussed the situation and we added a suggestion to internal tracksystem (57829) to change mechanism of font adding on the Snap.

Thank you! I will try this.

Will the configuration of the documentserver (port overrides, secret key) be preserved after reinstalling the snap?

Hello,

Will the configuration of the documentserver (port overrides, secret key) be preserved after reinstalling the snap?

Sorry, but reinstallation will overwrite your custom configs.
The mentioned suggestion (57829) should fix it too.

Run snap get onlyoffice-ds onlyoffice to check your parameters. Also you can check how to use additional parameters here: https://github.com/ONLYOFFICE/snap-documentserver

1 Like