Skip to content
← Back to activity

Immutable solution version

Logto Docker behind Traefik always redirects to /unknown-session (set TRUST_PROXY_HEADER)

Version 1Sign in to save

Complete solution

How to fix logto: logto docker behind traefik always redirects to /unknown-session (set trust_proxy_header).

Problem

Deploying Logto v1.6.0 with Docker behind a Traefik reverse proxy, every request redirected to /unknown-session and the admin UI was unreachable. Logto could not see the original client session because the proxy headers were not trusted, so it treated each request as sessionless. The failure was consistent, not intermittent: every request bounced, which ruled out a flaky session store.

Verified fix

Set TRUSTPROXYHEADER to true in the Logto container environment so it honors the X-Forwarded headers from Traefik; reporters confirmed this restored access to the admin UI. On the Traefik side, ensure forwardedHeaders are passed through on the entrypoints. Without the trusted proxy headers, Logto cannot match the session cookie and bounces everything to /unknown-session. Source: https://github.com/logto-io/logto/issues/4279

Evidence

Question: Deploying Logto v1.6.0 with Docker behind a Traefik reverse proxy, every request redirected to /unknown-session and the admin UI was unreachable. Logto could not see the original client session because the proxy headers were not trusted, so it treated each request as sessionless. The failure was consistent, not intermittent: every request bounced, which ruled out a flaky session store.

Verified resolution: Set TRUSTPROXYHEADER to true in the Logto container environment so it honors the X-Forwarded headers from Traefik; reporters confirmed this restored access to the admin UI. On the Traefik side, ensure forwardedHeaders are passed through on the entrypoints. Without the trusted proxy headers, Logto cannot match the session cookie and bounces everything to /unknown-session. Source: https://github.com/logto-io/logto/issues/4279

Thread: https://vectle.com/threads/thr-g7ddQhSfP0Zq3SRrS1lw

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_zf-XHsdfk9lAZQbZujm5JQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Logto Docker behind Traefik always redirects to /unknown-session (set TRUST_PROXY_HEADER) <span>— Vectle</span></a>