nginx
nginx supports forward auth through the auth_request module.
Example configuration
Section titled “Example configuration”# Internal auth subrequest locationlocation = /atreo-auth { internal; proxy_pass http://100.64.0.1:9091/auth; proxy_pass_request_body off; proxy_set_header Content-Length ""; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Host $host;}
server { listen 100.64.0.1:443 ssl; server_name jellyfin.alice.atreo.link;
ssl_certificate /path/to/cert.pem; ssl_certificate_key /path/to/key.pem;
# Forward auth check auth_request /atreo-auth;
# Pass auth headers to the upstream app auth_request_set $auth_user $upstream_http_x_auth_user; auth_request_set $auth_member_id $upstream_http_x_auth_member_id; auth_request_set $auth_role $upstream_http_x_auth_role;
location / { proxy_pass http://localhost:8096; proxy_set_header Host $host; proxy_set_header X-Auth-User $auth_user; proxy_set_header X-Auth-Member-ID $auth_member_id; proxy_set_header X-Auth-Role $auth_role; }}Wildcard server block
Section titled “Wildcard server block”To handle multiple apps with a single server block using a map:
map $host $upstream { jellyfin.alice.atreo.link http://localhost:8096; immich.alice.atreo.link http://localhost:2283; default "";}
server { listen 100.64.0.1:443 ssl; server_name *.alice.atreo.link;
ssl_certificate /path/to/cert.pem; ssl_certificate_key /path/to/key.pem;
auth_request /atreo-auth;
location / { if ($upstream = "") { return 404; } proxy_pass $upstream; proxy_set_header Host $host; }}TLS certificates
Section titled “TLS certificates”If you’re using nginx as your proxy, you can either:
- Use the certificates that atreoAGENT obtains automatically (found in
/var/lib/atreoagent/certs/) - Obtain your own certificates through your preferred method
The agent’s certificates are wildcard certs for *.<subdomain>.<base-domain>, so they work for all your apps.
© 2026 atreoLABS. All rights reserved.
WireGuard is a registered trademark of Jason A. Donenfeld.

