Use SWAG tinyauth include files in the TinyAuth setups

This commit is contained in:
Djeex committed 2026-11-30 13:59:20 +00:00
1 parent fb3db10639
commit 4e8a68c330
26 files changed
+192 -496

No files matched your search

+6 -17
View File
@@ -339,7 +339,7 @@ Wait a few minutes, then go to `https://seedbox.mydomain.com`. You should land o
## Protecting qBittorrent with TinyAuth
Add [TinyAuth](/serveex/security/tinyauth)'s forward-auth check directly to `seedbox.subdomain.conf`, the same way as [the TinyAuth guide](/serveex/security/tinyauth#protecting-an-app-via-reverse-proxy):
```nginx [seedbox.subdomain.conf]{26-38,41-42}
```nginx [seedbox.subdomain.conf]{26-27,30-31}
## Version 2023/12/19
server {
@@ -365,23 +365,12 @@ server {
# enable for Authentik (requires authentik-location.conf in the location block)
#include /config/nginx/authentik-server.conf;
location /tinyauth {
internal;
proxy_pass http://tinyauth:3000/api/auth/nginx;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Uri $request_uri;
}
location @tinyauth_login {
return 302 https://tinyauth.mydomain.com/login?redirect_uri=$scheme://$http_host$request_uri;
}
# enable for Tinyauth (requires tinyauth-location.conf in the location block)
include /config/nginx/tinyauth-server.conf;
location / {
auth_request /tinyauth;
error_page 401 = @tinyauth_login;
# enable for Tinyauth (requires tinyauth-server.conf in the server block)
include /config/nginx/tinyauth-location.conf;
# enable the next two lines for http auth
#auth_basic "Restricted";
@@ -409,7 +398,7 @@ server {
::note{to="/serveex/security/tinyauth#exposing-tinyauth-with-swag"}
The `location /tinyauth` block runs inside SWAG's own container, so SWAG needs to be on TinyAuth's Docker network to reach it by name (`tinyauth` here). This should already be set up from **exposing TinyAuth itself**. If you run into an error, double-check SWAG's compose file still has that network attached.
The `/tinyauth` check runs inside SWAG's own container, so SWAG needs to be on TinyAuth's Docker network to reach it by name (`tinyauth` here). This should already be set up from **exposing TinyAuth itself**. If you run into an error, double-check SWAG's compose file still has that network attached.
::
::tip{icon=""}
+6 -17
View File
@@ -516,7 +516,7 @@ And there you go, Seerr is now publicly accessible!
## Protecting Seerr with TinyAuth
Add [TinyAuth](/serveex/security/tinyauth)'s forward-auth check directly to `films.subdomain.conf`, the same way as [the TinyAuth guide](/serveex/security/tinyauth#protecting-an-app-via-reverse-proxy). The web UI (`/`) gets the check; `/api` is left out, since Seerr's own API calls (and anything integrating with it) can't do an interactive browser login:
```nginx [films.subdomain.conf]{24-36,39-40}
```nginx [films.subdomain.conf]{24-25,28-29}
## Version 2024/07/16
# make sure that your seerr container is named seerr
# make sure that your dns has a cname set for seerr
@@ -540,23 +540,12 @@ server {
# enable for Authentik (requires authentik-location.conf in the location block)
#include /config/nginx/authentik-server.conf;
location /tinyauth {
internal;
proxy_pass http://tinyauth:3000/api/auth/nginx;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Uri $request_uri;
}
location @tinyauth_login {
return 302 https://tinyauth.mydomain.com/login?redirect_uri=$scheme://$http_host$request_uri;
}
# enable for Tinyauth (requires tinyauth-location.conf in the location block)
include /config/nginx/tinyauth-server.conf;
location / {
auth_request /tinyauth;
error_page 401 = @tinyauth_login;
# enable for Tinyauth (requires tinyauth-server.conf in the server block)
include /config/nginx/tinyauth-location.conf;
# enable the next two lines for http auth
#auth_basic "Restricted";
@@ -594,7 +583,7 @@ server {
::note{to="/serveex/security/tinyauth#exposing-tinyauth-with-swag"}
The `location /tinyauth` block runs inside SWAG's own container, so SWAG needs to be on TinyAuth's Docker network to reach it by name (`tinyauth` here). This should already be set up from **exposing TinyAuth itself**. If you run into an error, double-check SWAG's compose file still has that network attached.
The `/tinyauth` check runs inside SWAG's own container, so SWAG needs to be on TinyAuth's Docker network to reach it by name (`tinyauth` here). This should already be set up from **exposing TinyAuth itself**. If you run into an error, double-check SWAG's compose file still has that network attached.
::
::tip{icon=""}