Allow Docker logging driver configuration for TrueNAS Apps

Problem / Justification

Standard TrueNAS Apps currently do not provide a way to configure the Docker logging driver or its driver-specific options.

Docker Compose supports this natively through the logging: section of a service. My specific use case is forwarding stdout/stderr logs from existing TrueNAS Apps to a centralized GELF-compatible logging server.

Docker already supports the gelf logging driver, but there is currently no supported way to add the necessary configuration to a standard TrueNAS App. For example:

logging:
  driver: gelf
  options:
    gelf-address: "udp://192.168.1.100:12201"
    tag: "myapp"

The alternatives appear to be modifying TrueNAS-generated Compose configuration, which is not persistent/upgrade-safe, or converting the application to a Custom App, which gives up some of the benefits of using the standard catalog App.

Proposed Solution

Add a Logging section to the configuration available for TrueNAS Apps that allows the Docker logging driver and its associated options to be configured.

Ideally this would expose Docker logging generically rather than implementing GELF as a special case. For example, supported drivers could include:

  • json-file

  • local

  • journald

  • syslog

  • gelf

Selecting a driver could expose the applicable options for that driver. For GELF, this would include at minimum the GELF destination address and tag.

The resulting generated Compose configuration would simply use Docker’s existing logging: functionality.

Impact / User Story

As a TrueNAS user running standard catalog Apps, I want to configure their Docker logging driver so that container logs can be forwarded to my centralized logging system without converting the Apps to Custom Apps or modifying TrueNAS-generated files.

This would allow standard Apps to retain their normal TrueNAS configuration and upgrade lifecycle while supporting centralized logging platforms such as GELF/Graylog and syslog.

This could also provide a common solution for requests to control Docker json-file log rotation (max-size, max-file) rather than implementing log-size controls separately.

The logging configuration should persist across App upgrades and redeployments.

1 Like