# DOMAIN comes from .env (for example: example.com). # Every name below needs a DNS record pointing at this server. # A wildcard record (*.example.com) covers all of them. # Public front page. {$DOMAIN}, www.{$DOMAIN} { root * /srv/site encode zstd gzip file_server header { X-Content-Type-Options nosniff Referrer-Policy same-origin X-Frame-Options DENY } } # Login portal. auth.{$DOMAIN} { reverse_proxy authelia:9091 } # --------------------------------------------------------------- # Protected services. Anyone who isn't signed in is sent to the # login portal first. Copy one block per service. # --------------------------------------------------------------- # Test service, delete once the real ones work. whoami.{$DOMAIN} { forward_auth authelia:9091 { uri /api/authz/forward-auth copy_headers Remote-User Remote-Groups Remote-Email Remote-Name } reverse_proxy whoami:80 } # Example: a service published on this machine's port 8096 (Jellyfin). # Uncomment and change the name and port to match yours. # # media.{$DOMAIN} { # forward_auth authelia:9091 { # uri /api/authz/forward-auth # copy_headers Remote-User Remote-Groups Remote-Email Remote-Name # } # reverse_proxy host.docker.internal:8096 # } # Services with their own phone or desktop apps (Jellyfin, Immich, # Vaultwarden, Nextcloud) usually break behind forward_auth, because # the apps can't complete the login page. For those, leave out the # forward_auth block and rely on the service's own login: # # vault.{$DOMAIN} { # reverse_proxy host.docker.internal:8222 # }