this post was submitted on 01 Apr 2026
9 points (90.9% liked)

Selfhosted

58431 readers
706 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

  7. No low-effort posts. This is subjective and will largely be determined by the community member reports.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

I'm using TinyAuth for forwardauth but the service I'm trying to use consistently is saying the headers are not set (and I can verify, they're not there.)

Traefik: in static config

entryPoints:
  web:
    address: ':80'
    transport:
      respondingTimeouts:
        readTimeout: 600s
        idleTimeout: 600s
        writeTimeout: 600s
    http:
      redirections:
        entryPoint:
          to: websecure
          scheme: https
  websecure:
    address: ':443'
    http:
      tls:
        certResolver: letsencrypt
        domains:
          - main: domain.tld
            sans:
              - '*.domain.tld'
    forwardedHeaders:
      trustedIPs:
        - [TinyAuth IP]

in dynamic config:

   tinyauth-auth:
     forwardAuth:
       address: "http://[TinyAuth IP]:3000/api/auth/traefik"
       trustForwardHeader: true
       authResponseHeaders:
         - Remote-User
         - Remote-Groups
         - Remote-Name
         - Remote-Email

This is set as a middleware in the app I'm trying to use.

in tinyauth:

TINYAUTH_APPURL=https://tinyapp.domain.tld/
TINYAUTH_AUTH_TRUSTEDPROXIES=[Traefik IP]
TINYAUTH_APPS_APP_CONFIG_DOMAIN='app.domain.tld'
TINYAUTH_APPS_APP_RESPONSE_HEADERS='Remote-User,Remote-Email,Remote-Group,Remote-Name,X-Remote-Name,X-Remote-User,X-Remote-Group,X-Remote-Email,Forwarded-Host,Forwarded-URI'

(I kept adding response headers hoping something would change)

PocketID is set as an OAuth provider and seems to be working fine, but I can provide further detail if needed.

Curiously, I tried changing the address in the traefik config to "https://tinyauth.domain.tld/" and the headers came through properly, but the redirect went to https://tinyauth.domain.tld/api/auth/traefik.

I think this is actually my issue but they never posted their solution.

you are viewing a single comment's thread
view the rest of the comments
[–] kat@lemmy.blehiscool.com 2 points 1 week ago (1 children)

If you point Traefik’s forwardAuth at the internal service (e.g. http://:3000/api/auth/traefik), TinyAuth doesn’t see the correct X-Forwarded-* headers or original host, so it won’t return the auth headers properly.

if you switch to using the public URL instead, the headers should start working — but only once using the full endpoint:

https://tinyauth.domain.tld/api/auth/traefik

Not just the root URL.

That way:

  • the request goes through Traefik
  • forwarded headers are correct
  • TinyAuth trusts the proxy
  • and it returns the expected headers

Also worth double-checking that your header names match exactly (e.g. Remote-Groups vs Remote-Group).

So in short: don’t call TinyAuth directly by IP, go through the domain + correct path.

[–] meathappening@lemmy.ml 1 points 1 week ago* (last edited 1 week ago)

So that's what I did in that bottom section--I should have been more clear, I used the full path and not just https://tinyauth.domain.tld/. The redirect was broken.

Additionally, when I was trying to figure this out, I came across this bug report, where the author specifically says not to do that.

I assume this is easy but I have no experience with forwardauth. Thanks so much for your help.

And good catch on that groups/group issue.