Nextcloud 33 Email Viewer (TrueNAS SCALE / Docker) – Works via CLI & SMB, but not in Web UI + resets after app restart

I’m trying to run the Nextcloud Email Viewer app (files_emailviewer) on a TrueNAS SCALE Docker-based Nextcloud instance, but I’m running into a very strange and inconsistent behavior.

Setup

  • TrueNAS SCALE (Nextcloud App running in Docker)

  • Nextcloud: 33.0.3

  • Email Viewer app: files_emailviewer (latest version from app store)

  • Email to PDF Converter: emailconverter-3.0.0-all.jar (v3.0.0)

  • Java: OpenJDK 21.0.11 (Debian Trixie)

  • wkhtmltopdf: 0.12.6.1 (patched Qt, manually installed)

  • PHP: proc_open enabled

  • Storage backend: SMB / ZFS dataset (/mnt/fastpool/...)

What works perfectly

CLI conversion test


java -jar emailconverter-3.0.0-all.jar test.eml -o test.pdf

:check_mark: Output PDF is generated correctly
:check_mark: Complex .eml files are parsed correctly
:check_mark: HTML + attachments are handled properly


SMB workflow test

  • .eml files are placed in SMB share

  • PDF is generated in the same directory

  • Files are immediately visible over network share

:check_mark: Fully working outside Nextcloud UI

Problem: Nextcloud Web UI (Email Viewer)

When opening .eml files in Nextcloud:

  • Email Viewer does not render properly

  • No PDF preview is shown in the browser

  • UI stays empty / loading state

  • No obvious error in the interface

Critical behavior after TrueNAS app restart

After restarting the Nextcloud app in TrueNAS:

  • Email Viewer stops working in the UI

  • converter execution becomes inconsistent

  • wkhtmltopdf / Java / jar sometimes appear missing or not accessible

  • CLI tests may still work or require reinitialization

It looks like the Docker container environment is reset or not fully persistent

Key observations

  • Tools can be installed successfully inside the running container

  • occ config:app:set files_emailviewer binary_path works correctly

  • CLI execution works reliably

  • Web UI still fails to render emails

  • After app restart, parts of the setup are effectively gone or reset

Hypothesis

It seems that:

  • The Email Viewer app does not fully persist external binary dependencies in this Docker setup

  • Runtime paths or mounted binaries are not stable across restarts

  • Web execution context differs from CLI context (permissions / PATH / sandboxing)

  • Preview generation may be failing silently in the UI layer

Use case

The goal is to use Nextcloud Email Viewer for a large archive of legacy emails:

  • .msg and .eml files (Outlook / mail archives)

  • directly viewable in Nextcloud web interface

  • no manual pre-conversion step required

Questions

Has anyone successfully run this setup in a stable way on:

  • TrueNAS SCALE + Docker-based Nextcloud 33

  • Email Viewer app (files_emailviewer)

Specifically:

  • Where should emailconverter.jar and wkhtmltopdf be placed to ensure persistence?

  • Is there a known issue with container restarts resetting runtime dependencies?

  • Why does CLI work perfectly while the web UI does not?

  • How can this setup be made stable across app restarts?