Unable to generate PDF or Office Word Thumbnails

I have Nextcloud running on a headless Ubuntu Server 20.04, but I am having issues with getting previews to work.

I have configured the config file as shown below. I have also installed LibreOffice to the following directory: /usr/bin/libreoffice. Additionally, I have successfully set up an OnlyOffice server so the documents aer successfully opening, but still, previews don’t work. Previews are working for other things such as movies, pictures, etc.

‘enable_previews’ => true,

‘preview_libreoffice_path’ => ‘/usr/bin/libreoffice’,

‘preview_office_cl_parameters’ =>
’ --headless --nologo --nofirststartwizard --invisible --norestore '.
‘–convert-to png --outdir /var/nextcloud/libreoffice’,

‘enabledPreviewProviders’ => array(


Any assistance you might be able to provide would be incredibly helpful.


Enable verbose logging and check what is being logged when the system tries to generate a preview. The preview generation command is being executed by the web server user, e.g. www-data, and therefore you have to make sure that this user has the correct access rights to get the job done.

FYI, you know that enabling previews for office documents is a security nightmare, right?!