diff --git a/content/en/3.serveex/7.files/1.file-browser.md b/content/en/6.recycled/1.deprecated/2.file-browser.md similarity index 61% rename from content/en/3.serveex/7.files/1.file-browser.md rename to content/en/6.recycled/1.deprecated/2.file-browser.md index 99367c8..68c4f68 100644 --- a/content/en/3.serveex/7.files/1.file-browser.md +++ b/content/en/6.recycled/1.deprecated/2.file-browser.md @@ -158,6 +158,81 @@ Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ct That’s it! File Browser is now exposed! +## Protecting File Browser with TinyAuth +Add [TinyAuth](/serveex/security/tinyauth)'s forward-auth check directly to `files.subdomain.conf`, the same way as [the TinyAuth guide](/serveex/security/tinyauth#protecting-an-app-via-reverse-proxy): + +```nginx [files.subdomain.conf]{26-38,41-42} +## Version 2023/12/19 + +server { + listen 443 ssl; + listen [::]:443 ssl; + + server_name files.*; + + include /config/nginx/ssl.conf; + + client_max_body_size 0; + + #if ($lan-ip = yes) { set $geo-whitelist yes; } + #if ($geo-whitelist = no) { return 404; } + if ($geo-blacklist = no) { return 404; } + + # enable for ldap auth (requires ldap-location.conf in the location block) + #include /config/nginx/ldap-server.conf; + + # enable for Authelia (requires authelia-location.conf in the location block) + #include /config/nginx/authelia-server.conf; + + # 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; + } + + location / { + auth_request /tinyauth; + error_page 401 = @tinyauth_login; + + # enable the next two lines for http auth + #auth_basic "Restricted"; + #auth_basic_user_file /config/nginx/.htpasswd; + + # enable for ldap auth (requires ldap-server.conf in the server block) + #include /config/nginx/ldap-location.conf; + + # enable for Authelia (requires authelia-server.conf in the server block) + #include /config/nginx/authelia-location.conf; + + # enable for Authentik (requires authentik-server.conf in the server block) + #include /config/nginx/authentik-location.conf; + + include /config/nginx/proxy.conf; + include /config/nginx/resolver.conf; + set $upstream_app filebrowser; + set $upstream_port 80; + set $upstream_proto http; + proxy_pass $upstream_proto://$upstream_app:$upstream_port; + } +} +``` + +::note + +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](/serveex/security/tinyauth#exposing-tinyauth-with-swag). If you run into an error, double-check SWAG's compose file still has that network attached. +:: + ::tip{icon=""} -✨ __Tip:__ You can protect this app with [TinyAuth](/serveex/security/tinyauth) and [Pocket ID](/serveex/security/pocket-id) using the reverse-proxy pattern from the TinyAuth guide, or with Authentik by opening `files.subdomain.conf` and uncommenting `include /config/nginx/authentik-server.conf;`{lang=nginx} and `include /config/nginx/authentik-location.conf;`{lang=nginx}. Don’t forget to [create an application and provider in Authentik](/serveex/advanced/authentik#protecting-an-app-via-reverse-proxy). +✨ __Tip:__ You can protect this app with Authentik instead of TinyAuth by opening `files.subdomain.conf` and uncommenting `include /config/nginx/authentik-server.conf;`{lang=nginx} and `include /config/nginx/authentik-location.conf;`{lang=nginx}. Don’t forget to [create an application and provider in Authentik](/serveex/advanced/authentik#protecting-an-app-via-reverse-proxy). :: diff --git a/content/en/6.recycled/3.developer/.navigation.yml b/content/en/6.recycled/2.alternatives/.navigation.yml similarity index 53% rename from content/en/6.recycled/3.developer/.navigation.yml rename to content/en/6.recycled/2.alternatives/.navigation.yml index aebbb70..5cb1b41 100644 --- a/content/en/6.recycled/3.developer/.navigation.yml +++ b/content/en/6.recycled/2.alternatives/.navigation.yml @@ -1,2 +1,2 @@ -title: Developer +title: Alternatives icon: i-lucide-trash-2 diff --git a/content/en/6.recycled/2.plex/1.plex.md b/content/en/6.recycled/2.alternatives/1.plex.md similarity index 100% rename from content/en/6.recycled/2.plex/1.plex.md rename to content/en/6.recycled/2.alternatives/1.plex.md diff --git a/content/en/6.recycled/2.plex/2.qbittorrent.md b/content/en/6.recycled/2.alternatives/2.qbittorrent for plex.md similarity index 99% rename from content/en/6.recycled/2.plex/2.qbittorrent.md rename to content/en/6.recycled/2.alternatives/2.qbittorrent for plex.md index 85cb40f..d30526d 100644 --- a/content/en/6.recycled/2.plex/2.qbittorrent.md +++ b/content/en/6.recycled/2.alternatives/2.qbittorrent for plex.md @@ -1,5 +1,5 @@ --- -title: Qbittorrent +title: Qbittorrent for Plex description: Install qBittorrent with Gluetun and ProtonVPN to download torrents securely behind a VPN on your self-hosted server. --- diff --git a/content/en/6.recycled/2.plex/3.servarr.md b/content/en/6.recycled/2.alternatives/3.servarr for plex.md similarity index 99% rename from content/en/6.recycled/2.plex/3.servarr.md rename to content/en/6.recycled/2.alternatives/3.servarr for plex.md index edcce48..b051c03 100644 --- a/content/en/6.recycled/2.plex/3.servarr.md +++ b/content/en/6.recycled/2.alternatives/3.servarr for plex.md @@ -1,5 +1,5 @@ --- -title: Automation +title: Servarr for Plex description: Automate media downloads with the Servarr stack, Radarr, Sonarr, Bazarr, Prowlarr, and Overseerr for movies and TV shows. --- diff --git a/content/en/6.recycled/3.developer/1.gitea.md b/content/en/6.recycled/2.alternatives/4.gitea.md similarity index 100% rename from content/en/6.recycled/3.developer/1.gitea.md rename to content/en/6.recycled/2.alternatives/4.gitea.md diff --git a/content/en/6.recycled/2.plex/.navigation.yml b/content/en/6.recycled/2.plex/.navigation.yml deleted file mode 100644 index e0f6647..0000000 --- a/content/en/6.recycled/2.plex/.navigation.yml +++ /dev/null @@ -1,2 +0,0 @@ -title: Plex -icon: i-lucide-trash-2