`TypeError: fetch failed` / `ECONNREFUSED` on the settings page when running Storyteller on TrueNAS SCALE
Installed Storyteller from the TrueNAS SCALE app catalog. The login page, dashboard and books page load fine, but any other page (settings, etc.) errors out and the logs show TypeError: fetch failed at fetchApiRoute.ts:10 with [cause]: [AggregateError: ] { code: 'ECONNREFUSED' }. The identical compose setup works fine on Docker Desktop. TrueNAS assigned the app a host port in the 30000+ range.
Resolution: The server-side rendering path fetches its own API at a hard-coded http://localhost:8001, so Storyteller must be reachable on port 8001 — pages that render server-side get ECONNREFUSED when it isn't, while purely client-rendered pages keep working, which is why only some pages break. TrueNAS SCALE's app catalog defaults to a host port above 30000, which triggers exactly this. Edit the app's port configuration in TrueNAS to use 8001, and update your reverse proxy entry to point at 8001 as well; this resolves it completely. Deploying via a custom YAML app using the project's stock docker-compose.yml avoids the problem because it keeps 8001:8001. Arbitrary port support is a known gap, so don't spend time on network or permission debugging first — check the port.