# Help with config for file logging on Docker/Truenas Scale

**URL:** <https://community.traefik.io/t/help-with-config-for-file-logging-on-docker-truenas-scale/30308>\
**Category:** Traefik v3 (latest)\
**Tags:** file, docker\
**Created:** [October 26, 2026, 8:01am UTC](https://community.traefik.io/t/help-with-config-for-file-logging-on-docker-truenas-scale/30308 "2026-10-26T08:01:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SolaAesir](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/solaaesir/32/11365_2.png) [@SolaAesir](https://community.traefik.io/u/SolaAesir)\
**Post date:** [October 26, 2026, 8:01am UTC](https://community.traefik.io/t/help-with-config-for-file-logging-on-docker-truenas-scale/30308/1 "2026-10-26T08:01:01Z")

</div>

Truenas is set up with both docker and file providers, with the file provider pointed to a mapped folder. I am successfully using the file provider to configure both importing my certs and the reverse proxy connection for the Truenas administration interface.

I'm trying to add both error and access logs to a mapped folder (`/mnt/logs` in the container). I can enter the docker shell for the container and `touch` a test file so the permissions seem to be set up correctly for the mount.

The dashboard shows Tracing, Metrics, & Access Log as Off. I must have something wrong and/or missing in my configuration files but I can't figure out what they are based on documentation and no errors/warnings are surfacing anywhere.

`error_logs.yaml`

```yaml
log:
  filePath: "/mnt/logs/error.log"
  format: common
  level: ERROR
  maxAge: 7
  maxBackups: 2

```

`access_logs.yaml`

```yaml
accessLog:
  filePath: "/mnt/logs/access.log"
  format: common
  addInternals: true

  # Filter on status codes, retry attempts and minimal duration
  filters:
    statusCodes:
      - "200"
      - "300-302"
    retryAttempts: true
    minDuration: "10ms"

  fields:
    defaultMode: keep # Keep all the fields by default
    names:
      ClientUsername: drop # Drop the Field ClientUserName
    headers:
      defaultMode: keep # Keep all the headers by default
      names:
        User-Agent: redact # Redact the User-Agent header value
        Authorization: drop # Drop the Authorization header value
    queryParameters:
      defaultMode: drop # Drop all query parameters

  buffering:
    maxMessages: 100 # Log messages are buffered before being written.
    maxAge: 10s # Flush buffer every 10 seconds.
    flushInterval: 5s # Or flush every 5 seconds, whichever comes first.

```

What am I missing? Do I need a plugin or something? Am I missing a piece of configuration?

---

<div class="post-metadata">

**Author:** ![BreezeDelegate](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/breezedelegate/32/11402_2.png) [@BreezeDelegate](https://community.traefik.io/u/BreezeDelegate)\
**Post date:** [October 31, 2026, 11:27am UTC](https://community.traefik.io/t/help-with-config-for-file-logging-on-docker-truenas-scale/30308/2 "2026-10-31T11:27:54Z")

</div>

I think the issue is where you're loading those YAML files. `log` and `accessLog` belong to Traefik's static configuration, not the dynamic file provider.

Try moving them into your main `traefik.yml` (or using CLI flags) and restarting Traefik. Your `/mnt/logs` mount sounds fine if you can already write to it.
