34 changed files with 264 additions and 518 deletions

No files matched your search

+16
View File
@@ -1,5 +1,6 @@
<script setup lang="ts">
const appConfig = useAppConfig()
const { buildVersion, buildVersionUrl } = useRuntimeConfig().public
const { forced: forcedColorMode } = useDocusColorMode()
interface FooterLink {
@@ -44,6 +45,21 @@ const links = computed<FooterLink[]>(() => {
</script>
<template>
<template v-if="buildVersion">
<a
v-if="buildVersionUrl"
:href="buildVersionUrl"
target="_blank"
rel="noopener"
class="text-xs text-muted tabular-nums hover:text-default"
title="Build version, see the change behind it"
>v{{ buildVersion }}</a>
<span
v-else
class="text-xs text-muted tabular-nums"
title="Build version"
>v{{ buildVersion }}</span>
</template>
<template v-if="links.length">
<UButton
v-for="(link, index) of links"
-1
View File
@@ -298,7 +298,6 @@ ui:
Install and deploy Vaultwarden
::
::
::
### Advanced
@@ -231,11 +231,15 @@ ip -br link
You get something like `enp1s0 UP aa:bb:cc:dd:ee:ff`. Keep both: the interface name for the commands below, the MAC address for the machine that will send the packet.
::warning
The interface name `enp1s0` above is only an example. In the commands and the service file below, replace `<your-network-card-id>` with the name you got from `ip -br link` on your own machine, otherwise the setting will be applied to a card that doesn't exist.
::
#### Check the card supports it
```bash [Terminal]
sudo apt install ethtool
sudo ethtool enp1s0 | grep -i wake
sudo ethtool <your-network-card-id> | grep -i wake
```
The answer looks like `Supports Wake-on: pumbg` then `Wake-on: d`. The letter that matters is **g**, for magic packet. If the *Supports* line doesn't have it, the card can't do it and there's nothing to configure. `Wake-on: d` simply means disabled, which the next step fixes.
@@ -243,7 +247,7 @@ The answer looks like `Supports Wake-on: pumbg` then `Wake-on: d`. The letter th
#### Turn it on
```bash [Terminal]
sudo ethtool -s enp1s0 wol g
sudo ethtool -s <your-network-card-id> wol g
```
Run the check again, `Wake-on` should now be `g`. This setting is reset at every boot, so it needs to be reapplied automatically.
@@ -261,7 +265,7 @@ After=network.target
[Service]
Type=oneshot
ExecStart=/usr/sbin/ethtool -s enp1s0 wol g
ExecStart=/usr/sbin/ethtool -s <your-network-card-id> wol g
[Install]
WantedBy=basic.target
+20 -40
View File
@@ -189,11 +189,15 @@ sudo nano /srv/docker/swag/config/nginx/proxy-confs/tinyauth.subdomain.conf
Paste the following configuration:
```nginx [tinyauth.subdomain.conf]
## Version 2023/12/19
## Version 2025/07/18
# make sure that your tinyauth container is named tinyauth
# make sure that your dns has a cname set for tinyauth
server {
listen 443 ssl;
# listen 443 quic;
listen [::]:443 ssl;
# listen [::]:443 quic;
server_name tinyauth.*;
@@ -202,12 +206,14 @@ server {
client_max_body_size 0;
location / {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app tinyauth;
set $upstream_port 3000;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
}
```
@@ -227,7 +233,7 @@ __If it fails:__ check your firewall rules.
::
## Protecting an app via reverse proxy
SWAG doesn't ship a ready-made include file for TinyAuth, so we'll add the forward-auth check directly to the app's own `*.subdomain.conf`. We'll use Dockge as an example.
SWAG ships ready-made include files for TinyAuth: `tinyauth-server.conf` (the internal `/tinyauth` check, to include in the `server` block) and `tinyauth-location.conf` (the `auth_request` itself, to include in the `location` block). All that's left is to uncomment two lines in the app's own `*.subdomain.conf`. We'll use Dockge as an example.
::steps{level="3"}
### Open the app's subdomain.conf file
@@ -236,11 +242,11 @@ SWAG doesn't ship a ready-made include file for TinyAuth, so we'll add the forwa
sudo nano /srv/docker/swag/config/nginx/proxy-confs/dockge.subdomain.conf
```
### Add the forward-auth check
### Enable the TinyAuth includes
Add an internal `/tinyauth` location, and reference it from the app's `location /` block with `auth_request`:
Uncomment the `tinyauth-server.conf` include in the `server` block, and the `tinyauth-location.conf` include in the `location /` block:
```nginx [dockge.subdomain.conf]{9-11,25}
```nginx [dockge.subdomain.conf]{11,14}
server {
listen 443 ssl;
listen [::]:443 ssl;
@@ -251,23 +257,10 @@ server {
client_max_body_size 0;
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;
}
include /config/nginx/tinyauth-server.conf;
location / {
auth_request /tinyauth;
error_page 401 = @tinyauth_login;
include /config/nginx/tinyauth-location.conf;
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
@@ -281,7 +274,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. Also make sure the container is named `tinyauth`, since the include files rely on that name.
::
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
@@ -289,7 +282,7 @@ Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ct
### Done!
::
That's it! Visiting `https://dockge.mydomain.com` now redirects to TinyAuth first. Repeat this `location /tinyauth` / `auth_request` pattern in any other app's `*.subdomain.conf` to protect it the same way.
That's it! Visiting `https://dockge.mydomain.com` now redirects to TinyAuth first, which sends you back once you're logged in. The include also forwards the authenticated user to the app in the `Remote-User`, `Remote-Email`, `Remote-Name` and `Remote-Groups` headers, for apps that can use them. Uncomment the same two lines in any other app's `*.subdomain.conf` to protect it the same way.
::note
@@ -299,11 +292,11 @@ Repeat this process for each app you want to protect (unless it has native OIDC
## Leaving specific paths public
Sometimes you want most of an app locked behind TinyAuth, but a handful of paths left open, for example a public status page, or the API endpoints a mobile app relies on. Unlike Authentik, TinyAuth has no built-in "authenticated paths" setting for this: it's a plain nginx problem, and it's solved with nginx's own location matching.
A regex `location` block always takes priority over the plain `location /` block, no matter which one appears first in the file. So any path matched by a regex location you define runs its own `proxy_pass`, without ever reaching the `auth_request /tinyauth;` line in `location /`.
A regex `location` block always takes priority over the plain `location /` block, no matter which one appears first in the file. So any path matched by a regex location you define runs its own `proxy_pass`, without ever reaching the `include /config/nginx/tinyauth-location.conf;` line in `location /`.
For example, here's how to leave Uptime-Kuma's public status page and its assets open while protecting everything else. Only `api/status-page` is left public, not all of `/api`, since the rest of Uptime-Kuma's API is meant to stay behind authentication; `/metrics` (Uptime-Kuma's Prometheus endpoint) is left out of the regex entirely for the same reason:
```nginx [uptime-kuma.subdomain.conf]{9-16}
```nginx [uptime-kuma.subdomain.conf]{11-18}
server {
listen 443 ssl;
listen [::]:443 ssl;
@@ -312,6 +305,8 @@ server {
include /config/nginx/ssl.conf;
include /config/nginx/tinyauth-server.conf;
location ~ ^/(status|assets|icon\.svg|api/status-page|upload) {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
@@ -321,23 +316,8 @@ server {
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
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;
include /config/nginx/tinyauth-location.conf;
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
@@ -192,9 +192,9 @@ sudo nano /srv/docker/swag/config/nginx/proxy-confs/stats.subdomain.conf
### Add the forward-auth check and public paths
Replace the file's content with the following. The `location ~ ^/(...)` block matches Uptime-Kuma's public status page and its assets, and is served directly, without ever reaching the `auth_request` check in `location /`. Only `api/status-page` is left public, not all of `/api`, since the rest of Uptime-Kuma's API is meant to stay behind authentication; `/metrics` (Uptime-Kuma's Prometheus endpoint) is left out of the regex entirely for the same reason:
Replace the file's content with the following. The `location ~ ^/(...)` block matches Uptime-Kuma's public status page and its assets, and is served directly, without ever reaching the TinyAuth check in `location /`. Only `api/status-page` is left public, not all of `/api`, since the rest of Uptime-Kuma's API is meant to stay behind authentication; `/metrics` (Uptime-Kuma's Prometheus endpoint) is left out of the regex entirely for the same reason:
```nginx [stats.subdomain.conf]{9-16,32-33}
```nginx [stats.subdomain.conf]{9-16,18-19,22-23}
server {
listen 443 ssl;
listen [::]:443 ssl;
@@ -212,23 +212,12 @@ server {
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
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;
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
@@ -242,7 +231,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.
::
Press :kbd{value="Ctrl+O"}, then :kbd{value="Enter"} to save, and :kbd{value="Ctrl+X"} to exit.
+6 -17
View File
@@ -224,7 +224,7 @@ And there you go, Dozzle is now exposed!
## Protecting Dozzle with TinyAuth
Add [TinyAuth](/serveex/security/tinyauth)'s forward-auth check directly to `dozzle.subdomain.conf`, the same way as [the TinyAuth guide](/serveex/security/tinyauth#protecting-an-app-via-reverse-proxy):
```nginx [dozzle.subdomain.conf]{26-38,41-42}
```nginx [dozzle.subdomain.conf]{26-27,30-31}
## Version 2023/12/19
server {
@@ -250,23 +250,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";
@@ -294,7 +283,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=""}
@@ -202,7 +202,7 @@ Wait a moment, then visit `https://speedtest.yourdomain.com` in your browser. Yo
## Protecting Speedtest Tracker with TinyAuth
Add [TinyAuth](/serveex/security/tinyauth)'s forward-auth check directly to `speedtest.subdomain.conf`, the same way as [the TinyAuth guide](/serveex/security/tinyauth#protecting-an-app-via-reverse-proxy):
```nginx [speedtest.subdomain.conf]{22-34,37-38}
```nginx [speedtest.subdomain.conf]{22-23,26-27}
## Version 2023/12/19
server {
@@ -224,23 +224,12 @@ server {
#include /config/nginx/authelia-server.conf;
#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;
# Basic auth
#auth_basic "Restricted";
@@ -264,7 +253,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
@@ -294,7 +294,7 @@ That’s it! Beszel is now exposed!
## Protecting Beszel with TinyAuth
Add [TinyAuth](/serveex/security/tinyauth)'s forward-auth check directly to `beszel.subdomain.conf`, the same way as [the TinyAuth guide](/serveex/security/tinyauth#protecting-an-app-via-reverse-proxy):
```nginx [beszel.subdomain.conf]{26-38,41-42}
```nginx [beszel.subdomain.conf]{26-27,30-31}
## Version 2023/12/19
server {
@@ -320,23 +320,12 @@ server {
# enable for Authentik
#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;
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
@@ -357,7 +346,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
@@ -196,7 +196,7 @@ And that’s it! You’ve exposed UpSnap!
## Protecting UpSnap with TinyAuth
Add [TinyAuth](/serveex/security/tinyauth)'s forward-auth check directly to `upsnap.subdomain.conf`, the same way as [the TinyAuth guide](/serveex/security/tinyauth#protecting-an-app-via-reverse-proxy):
```nginx [upsnap.subdomain.conf]{26-38,41-42}
```nginx [upsnap.subdomain.conf]{26-27,30-31}
## Version 2023/12/19
server {
@@ -222,23 +222,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";
@@ -266,7 +255,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
@@ -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=""}
@@ -212,7 +212,7 @@ That's it! File Browser Quantum is now exposed.
## Protecting File Browser Quantum with TinyAuth
Add [TinyAuth](/serveex/security/tinyauth)'s forward-auth check directly to `fbq.subdomain.conf`, the same way as [the TinyAuth guide](/serveex/security/tinyauth#protecting-an-app-via-reverse-proxy):
```nginx [fbq.subdomain.conf]{22-34,37-38}
```nginx [fbq.subdomain.conf]{22-23,26-27}
## Version 2023/12/19
server {
@@ -234,23 +234,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";
@@ -277,7 +266,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=""}
+14 -7
View File
@@ -1,14 +1,19 @@
---
title: Pingvin
description: Install Pingvin Share, a self-hosted file sharing platform to send files securely without relying on WeTransfer or Google Drive.
description: Install Pingvin Share X, the maintained fork of Pingvin Share, a self-hosted file sharing platform to send files securely without relying on WeTransfer or Google Drive.
---
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
[Pingvin](https://github.com/stonith404/pingvin-share) is a tool for quickly sharing files, similar to WeTransfer. Its many sharing options (password, expiration time, custom link, etc.) make it the ideal tool for sharing files quickly. Pingvin can also create _upload requests_, i.e. a shareable link you can send to someone so they can upload their files for you to retrieve.
[Pingvin Share X](https://github.com/smp46/pingvin-share-x) is a tool for quickly sharing files, similar to WeTransfer. Its many sharing options (password, expiration time, custom link, etc.) make it the ideal tool for sharing files quickly. Pingvin can also create _upload requests_, i.e. a shareable link you can send to someone so they can upload their files for you to retrieve.
![Pingvin Share web interface for uploading and sharing files](/img/serveex/pingvin.png)
::note
Pingvin Share X is a fork that took over from the [original Pingvin Share](https://github.com/stonith404/pingvin-share), which is no longer maintained (the repository was archived). It keeps the same features and the same configuration, so an existing Pingvin Share install can switch to it by changing the image.
::
![Pingvin Share X web interface for uploading and sharing files](/img/serveex/pingvin.png)
## Installation
@@ -20,16 +25,18 @@ Open Dockge, click `compose`, name the stack `pingvin`, then copy-paste this:
```yaml [compose.yaml]
---
services:
pingvin-share:
pingvin-share-x:
container_name: pingvin
image: stonith404/pingvin-share
image: smp46/pingvin-share-x
restart: unless-stopped
environment:
- TRUST_PROXY=true # SWAG sits in front of the container
ports:
- 3600:3000
volumes:
- /srv/docker/pingvin/data:/opt/app/backend/data
- /srv/docker/pingvin/data/img:/opt/app/frontend/public/img
- /srv/docker/pingvin/uploads:/opt/app/backend/uploads # path to the folder where you want to store files uploaded to pingvin. Change to your preference.
- /srv/docker/pingvin/uploads:/opt/app/backend/data/uploads # path to the folder where you want to store files uploaded to pingvin. Change to your preference.
depends_on:
clamav:
condition: service_healthy
@@ -50,7 +57,7 @@ From here on, we assume the network name for SWAG is `swag_default`.
```yaml [compose.yaml]
services:
pingvin-share:
pingvin-share-x:
#...
labels:
- com.centurylinklabs.watchtower.enable=true
@@ -228,7 +228,7 @@ That’s it! code-server is now exposed!
## Protecting code-server with TinyAuth
Add [TinyAuth](/serveex/security/tinyauth)'s forward-auth check directly to `code.subdomain.conf`, the same way as [the TinyAuth guide](/serveex/security/tinyauth#protecting-an-app-via-reverse-proxy):
```nginx [code.subdomain.conf]{26-38,41-42}
```nginx [code.subdomain.conf]{26-27,30-31}
## Version 2023/12/19
server {
@@ -254,23 +254,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";
@@ -297,7 +286,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=""}
@@ -167,7 +167,7 @@ And that’s it! IT Tools is now exposed!
## Protecting IT Tools with TinyAuth
Add [TinyAuth](/serveex/security/tinyauth)'s forward-auth check directly to `tools.subdomain.conf`, the same way as [the TinyAuth guide](/serveex/security/tinyauth#protecting-an-app-via-reverse-proxy):
```nginx [tools.subdomain.conf]{26-38,41-42}
```nginx [tools.subdomain.conf]{26-27,30-31}
## Version 2023/12/19
server {
@@ -193,23 +193,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";
@@ -237,7 +226,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=""}
+9 -20
View File
@@ -240,9 +240,9 @@ server {
::
## Protecting AdGuard with TinyAuth
Add [TinyAuth](/serveex/security/tinyauth)'s forward-auth check directly to `adguard.subdomain.conf`, the same way as [the TinyAuth guide](/serveex/security/tinyauth#protecting-an-app-via-reverse-proxy). The `/dns-query` location is left out of the `auth_request` check, since DNS-over-HTTPS clients can't do an interactive login:
Add [TinyAuth](/serveex/security/tinyauth)'s forward-auth check directly to `adguard.subdomain.conf`, the same way as [the TinyAuth guide](/serveex/security/tinyauth#protecting-an-app-via-reverse-proxy). The `/dns-query` location is left out of the TinyAuth check, since DNS-over-HTTPS clients can't do an interactive login:
```nginx [adguard.subdomain.conf]{28-40,43-44,69-70}
```nginx [adguard.subdomain.conf]{28-29,32-33,58-59}
## Version 2023/05/31
# make sure that your adguard container is named adguard
# make sure that your dns has a cname set for adguard
@@ -270,23 +270,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";
@@ -311,8 +300,8 @@ server {
}
location /control {
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;
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
@@ -339,7 +328,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=""}
@@ -171,7 +171,7 @@ 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}
```nginx [files.subdomain.conf]{26-27,30-31}
## Version 2023/12/19
server {
@@ -197,23 +197,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";
@@ -240,7 +229,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=""}
-1
View File
@@ -298,7 +298,6 @@ ui:
Installer et déployer Vaultwarden
::
::
::
### Avancé
@@ -232,11 +232,15 @@ ip -br link
Vous obtenez quelque chose comme `enp1s0 UP aa:bb:cc:dd:ee:ff`. Gardez les deux : le nom de l'interface pour les commandes ci-dessous, l'adresse MAC pour la machine qui enverra le paquet.
::warning
Le nom d'interface `enp1s0` ci-dessus n'est qu'un exemple. Dans les commandes et le fichier de service ci-dessous, remplacez `<your-network-card-id>` par le nom obtenu avec `ip -br link` sur votre propre machine, sinon le réglage sera appliqué à une carte qui n'existe pas.
::
#### Vérifier que la carte le gère
```bash [Terminal]
sudo apt install ethtool
sudo ethtool enp1s0 | grep -i wake
sudo ethtool <your-network-card-id> | grep -i wake
```
La réponse ressemble à `Supports Wake-on: pumbg` puis `Wake-on: d`. La lettre qui compte est **g**, pour magic packet. Si la ligne *Supports* ne la contient pas, la carte ne sait pas le faire et il n'y a rien à configurer. `Wake-on: d` signifie simplement désactivé, ce que l'étape suivante corrige.
@@ -244,7 +248,7 @@ La réponse ressemble à `Supports Wake-on: pumbg` puis `Wake-on: d`. La lettre
#### L'activer
```bash [Terminal]
sudo ethtool -s enp1s0 wol g
sudo ethtool -s <your-network-card-id> wol g
```
Relancez la vérification, `Wake-on` devrait maintenant être à `g`. Ce réglage est réinitialisé à chaque démarrage, il faut donc le réappliquer automatiquement.
@@ -262,7 +266,7 @@ After=network.target
[Service]
Type=oneshot
ExecStart=/usr/sbin/ethtool -s enp1s0 wol g
ExecStart=/usr/sbin/ethtool -s <your-network-card-id> wol g
[Install]
WantedBy=basic.target
+20 -40
View File
@@ -189,11 +189,15 @@ sudo nano /srv/docker/swag/config/nginx/proxy-confs/tinyauth.subdomain.conf
Collez la configuration suivante :
```nginx [tinyauth.subdomain.conf]
## Version 2023/12/19
## Version 2025/07/18
# make sure that your tinyauth container is named tinyauth
# make sure that your dns has a cname set for tinyauth
server {
listen 443 ssl;
# listen 443 quic;
listen [::]:443 ssl;
# listen [::]:443 quic;
server_name tinyauth.*;
@@ -202,12 +206,14 @@ server {
client_max_body_size 0;
location / {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app tinyauth;
set $upstream_port 3000;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
}
```
@@ -227,7 +233,7 @@ __Si ça ne marche pas :__ vérifiez les règles de votre pare-feu.
::
## Protéger une application via le reverse proxy
SWAG ne fournit pas de fichier d'inclusion tout prêt pour TinyAuth, nous ajouterons donc la vérification forward-auth directement dans le `*.subdomain.conf` de l'application. Nous prendrons Dockge en exemple.
SWAG fournit des fichiers d'inclusion tout prêts pour TinyAuth : `tinyauth-server.conf` (la vérification interne `/tinyauth`, à inclure dans le bloc `server`) et `tinyauth-location.conf` (l'`auth_request` elle-même, à inclure dans le bloc `location`). Il suffit de décommenter deux lignes dans le `*.subdomain.conf` de l'application. Nous prendrons Dockge en exemple.
::steps{level="3"}
### Ouvrir le fichier subdomain.conf de l'application
@@ -236,11 +242,11 @@ SWAG ne fournit pas de fichier d'inclusion tout prêt pour TinyAuth, nous ajoute
sudo nano /srv/docker/swag/config/nginx/proxy-confs/dockge.subdomain.conf
```
### Ajouter la vérification forward-auth
### Activer les inclusions TinyAuth
Ajoutez un bloc `location /tinyauth` interne, et référencez-le depuis le bloc `location /` de l'application avec `auth_request` :
Décommentez l'inclusion `tinyauth-server.conf` dans le bloc `server`, et l'inclusion `tinyauth-location.conf` dans le bloc `location /` :
```nginx [dockge.subdomain.conf]{9-11,25}
```nginx [dockge.subdomain.conf]{11,14}
server {
listen 443 ssl;
listen [::]:443 ssl;
@@ -251,23 +257,10 @@ server {
client_max_body_size 0;
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.mondomaine.fr/login?redirect_uri=$scheme://$http_host$request_uri;
}
include /config/nginx/tinyauth-server.conf;
location / {
auth_request /tinyauth;
error_page 401 = @tinyauth_login;
include /config/nginx/tinyauth-location.conf;
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
@@ -281,7 +274,7 @@ server {
::note{to="/serveex/security/tinyauth#exposer-tinyauth-avec-swag"}
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
La vérification `/tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché. Assurez-vous aussi que le conteneur s'appelle bien `tinyauth`, car les fichiers d'inclusion reposent sur ce nom.
::
Appuyez sur :kbd{value="Ctrl+O"}, puis :kbd{value="Enter"} pour enregistrer, et :kbd{value="Ctrl+X"} pour quitter.
@@ -289,7 +282,7 @@ Appuyez sur :kbd{value="Ctrl+O"}, puis :kbd{value="Enter"} pour enregistrer, et
### Terminé !
::
Et voilà ! Visiter `https://dockge.mondomaine.fr` redirige désormais d'abord vers TinyAuth. Répétez ce motif `location /tinyauth` / `auth_request` dans le `*.subdomain.conf` de n'importe quelle autre application pour la protéger de la même façon.
Et voilà ! Visiter `https://dockge.mondomaine.fr` redirige désormais d'abord vers TinyAuth, qui vous renvoie vers l'application une fois connecté. L'inclusion transmet aussi l'utilisateur authentifié à l'application dans les en-têtes `Remote-User`, `Remote-Email`, `Remote-Name` et `Remote-Groups`, pour les applications qui savent les exploiter. Décommentez les mêmes deux lignes dans le `*.subdomain.conf` de n'importe quelle autre application pour la protéger de la même façon.
::note
@@ -299,11 +292,11 @@ Répétez cette procédure pour chaque application que vous voulez protéger (sa
## Laisser certains chemins publics
Il arrive qu'on veuille verrouiller l'essentiel d'une application derrière TinyAuth, mais laisser une poignée de chemins ouverts, par exemple une page de statut publique, ou les endpoints d'API sur lesquels une application mobile s'appuie. Contrairement à Authentik, TinyAuth n'a pas de réglage intégré de « chemins authentifiés » pour ça : c'est un simple problème nginx, et il se résout avec le système de correspondance de `location` de nginx.
Un bloc `location` en expression régulière est toujours prioritaire sur le bloc `location /` simple, quel que soit celui qui apparaît en premier dans le fichier. Tout chemin correspondant à une location en regex que vous définissez exécute donc son propre `proxy_pass`, sans jamais atteindre la ligne `auth_request /tinyauth;` du `location /`.
Un bloc `location` en expression régulière est toujours prioritaire sur le bloc `location /` simple, quel que soit celui qui apparaît en premier dans le fichier. Tout chemin correspondant à une location en regex que vous définissez exécute donc son propre `proxy_pass`, sans jamais atteindre la ligne `include /config/nginx/tinyauth-location.conf;` du `location /`.
Par exemple, voici comment laisser ouverte la page de statut publique d'Uptime-Kuma et ses ressources tout en protégeant le reste. Seul `api/status-page` est laissé public, pas tout `/api`, car le reste de l'API d'Uptime-Kuma doit rester derrière l'authentification ; `/metrics` (l'endpoint Prometheus d'Uptime-Kuma) est volontairement absent de la regex pour la même raison :
```nginx [uptime-kuma.subdomain.conf]{9-16}
```nginx [uptime-kuma.subdomain.conf]{11-18}
server {
listen 443 ssl;
listen [::]:443 ssl;
@@ -312,6 +305,8 @@ server {
include /config/nginx/ssl.conf;
include /config/nginx/tinyauth-server.conf;
location ~ ^/(status|assets|icon\.svg|api/status-page|upload) {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
@@ -321,23 +316,8 @@ server {
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
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.mondomaine.fr/login?redirect_uri=$scheme://$http_host$request_uri;
}
location / {
auth_request /tinyauth;
error_page 401 = @tinyauth_login;
include /config/nginx/tinyauth-location.conf;
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
@@ -192,9 +192,9 @@ sudo nano /srv/docker/swag/config/nginx/proxy-confs/stats.subdomain.conf
### Ajouter la vérification forward-auth et les chemins publics
Remplacez le contenu du fichier par ce qui suit. Le bloc `location ~ ^/(...)` correspond à la page de statut publique d'Uptime-Kuma et à ses ressources, et est servi directement, sans jamais atteindre la vérification `auth_request` du `location /`. Seul `api/status-page` est laissé public, pas tout `/api`, car le reste de l'API d'Uptime-Kuma doit rester derrière l'authentification ; `/metrics` (l'endpoint Prometheus d'Uptime-Kuma) est volontairement absent de la regex pour la même raison :
Remplacez le contenu du fichier par ce qui suit. Le bloc `location ~ ^/(...)` correspond à la page de statut publique d'Uptime-Kuma et à ses ressources, et est servi directement, sans jamais atteindre la vérification TinyAuth du `location /`. Seul `api/status-page` est laissé public, pas tout `/api`, car le reste de l'API d'Uptime-Kuma doit rester derrière l'authentification ; `/metrics` (l'endpoint Prometheus d'Uptime-Kuma) est volontairement absent de la regex pour la même raison :
```nginx [stats.subdomain.conf]{9-16,32-33}
```nginx [stats.subdomain.conf]{9-16,18-19,22-23}
server {
listen 443 ssl;
listen [::]:443 ssl;
@@ -212,23 +212,12 @@ server {
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
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.mondomaine.fr/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;
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
@@ -242,7 +231,7 @@ server {
::note{to="/serveex/security/tinyauth#exposer-tinyauth-avec-swag"}
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
La vérification `/tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
::
Appuyez sur :kbd{value="Ctrl+O"}, puis :kbd{value="Enter"} pour enregistrer, et :kbd{value="Ctrl+X"} pour quitter.
+6 -17
View File
@@ -224,7 +224,7 @@ Et voilà, Dozzle est maintenant exposé !
## Protéger Dozzle avec TinyAuth
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `dozzle.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protéger-une-application-via-le-reverse-proxy) :
```nginx [dozzle.subdomain.conf]{26-38,41-42}
```nginx [dozzle.subdomain.conf]{26-27,30-31}
## Version 2023/12/19
server {
@@ -250,23 +250,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.mondomaine.fr/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";
@@ -294,7 +283,7 @@ server {
::note{to="/serveex/security/tinyauth#exposer-tinyauth-avec-swag"}
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
La vérification `/tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
::
::tip{icon=""}
@@ -202,7 +202,7 @@ Patientez un instant, puis visitez `https://speedtest.mondomaine.fr` dans votre
## Protéger Speedtest Tracker avec TinyAuth
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `speedtest.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protéger-une-application-via-le-reverse-proxy) :
```nginx [speedtest.subdomain.conf]{22-34,37-38}
```nginx [speedtest.subdomain.conf]{22-23,26-27}
## Version 2023/12/19
server {
@@ -224,23 +224,12 @@ server {
#include /config/nginx/authelia-server.conf;
#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.mondomaine.fr/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;
# Basic auth
#auth_basic "Restricted";
@@ -264,7 +253,7 @@ server {
::note{to="/serveex/security/tinyauth#exposer-tinyauth-avec-swag"}
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
La vérification `/tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
::
::tip{icon=""}
+6 -17
View File
@@ -294,7 +294,7 @@ Et voilà ! Beszel est maintenant exposé !
## Protéger Beszel avec TinyAuth
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `beszel.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protéger-une-application-via-le-reverse-proxy) :
```nginx [beszel.subdomain.conf]{26-38,41-42}
```nginx [beszel.subdomain.conf]{26-27,30-31}
## Version 2023/12/19
server {
@@ -320,23 +320,12 @@ server {
# enable for Authentik
#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.mondomaine.fr/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;
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
@@ -357,7 +346,7 @@ server {
::note{to="/serveex/security/tinyauth#exposer-tinyauth-avec-swag"}
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
La vérification `/tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
::
::tip{icon=""}
+6 -17
View File
@@ -196,7 +196,7 @@ Et voilà ! Vous avez exposé UpSnap !
## Protéger UpSnap avec TinyAuth
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `upsnap.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protéger-une-application-via-le-reverse-proxy) :
```nginx [upsnap.subdomain.conf]{26-38,41-42}
```nginx [upsnap.subdomain.conf]{26-27,30-31}
## Version 2023/12/19
server {
@@ -222,23 +222,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.mondomaine.fr/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";
@@ -266,7 +255,7 @@ server {
::note{to="/serveex/security/tinyauth#exposer-tinyauth-avec-swag"}
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
La vérification `/tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
::
::tip{icon=""}
+6 -17
View File
@@ -339,7 +339,7 @@ Attendez quelques minutes, puis allez sur `https://seedbox.mondomaine.fr`. Vous
## Protéger qBittorrent avec TinyAuth
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `seedbox.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protéger-une-application-via-le-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.mondomaine.fr/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#exposer-tinyauth-avec-swag"}
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
La vérification `/tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
::
::tip{icon=""}
+6 -17
View File
@@ -516,7 +516,7 @@ Et voilà, Seerr est maintenant accessible publiquement !
## Protéger Seerr avec TinyAuth
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `films.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protéger-une-application-via-le-reverse-proxy). L'interface web (`/`) reçoit la vérification, `/api` en est exclu, puisque les appels d'API de Seerr (et tout ce qui s'y intègre) ne peuvent pas faire de connexion interactive dans un navigateur :
```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.mondomaine.fr/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#exposer-tinyauth-avec-swag"}
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
La vérification `/tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
::
::tip{icon=""}
@@ -212,7 +212,7 @@ Et voilà ! File Browser Quantum est maintenant exposé.
## Protéger File Browser Quantum avec TinyAuth
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `fbq.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protéger-une-application-via-le-reverse-proxy) :
```nginx [fbq.subdomain.conf]{22-34,37-38}
```nginx [fbq.subdomain.conf]{22-23,26-27}
## Version 2023/12/19
server {
@@ -234,23 +234,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.mondomaine.fr/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";
@@ -277,7 +266,7 @@ server {
::note{to="/serveex/security/tinyauth#exposer-tinyauth-avec-swag"}
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
La vérification `/tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
::
::tip{icon=""}
+14 -7
View File
@@ -1,14 +1,19 @@
---
title: Pingvin
description: Installer Pingvin Share, une plateforme de partage de fichiers auto-hébergée pour envoyer des fichiers en toute sécurité sans passer par WeTransfer ou Google Drive.
description: Installer Pingvin Share X, le fork maintenu de Pingvin Share, une plateforme de partage de fichiers auto-hébergée pour envoyer des fichiers en toute sécurité sans dépendre de WeTransfer ou de Google Drive.
---
:ellipsis{left=0px width=40rem top=10rem blur=140px zIndex=60}
[Pingvin](https://github.com/stonith404/pingvin-share) est un outil pour partager rapidement des fichiers, à la manière de WeTransfer. Ses nombreuses options de partage (mot de passe, durée d'expiration, lien personnalisé, etc.) en font l'outil idéal pour partager des fichiers rapidement. Pingvin peut aussi créer des _demandes d'envoi_, c'est-à-dire un lien partageable à envoyer à quelqu'un pour qu'il dépose ses fichiers et que vous les récupériez.
[Pingvin Share X](https://github.com/smp46/pingvin-share-x) est un outil pour partager rapidement des fichiers, à la manière de WeTransfer. Ses nombreuses options de partage (mot de passe, durée d'expiration, lien personnalisé, etc.) en font l'outil idéal pour partager des fichiers rapidement. Pingvin peut aussi créer des _demandes d'envoi_, c'est-à-dire un lien partageable à envoyer à quelqu'un pour qu'il dépose ses fichiers et que vous les récupériez.
![Interface web de Pingvin Share pour envoyer et partager des fichiers](/img/serveex/pingvin.png)
::note
Pingvin Share X est un fork qui a pris le relais du [Pingvin Share d'origine](https://github.com/stonith404/pingvin-share), qui n'est plus maintenu (le dépôt a été archivé). Il garde les mêmes fonctionnalités et la même configuration : une installation existante de Pingvin Share peut donc passer dessus en changeant simplement l'image.
::
![Interface web de Pingvin Share X pour envoyer et partager des fichiers](/img/serveex/pingvin.png)
## Installation
@@ -20,16 +25,18 @@ Ouvrez Dockge, cliquez sur `compose`, nommez la stack `pingvin`, puis copiez-col
```yaml [compose.yaml]
---
services:
pingvin-share:
pingvin-share-x:
container_name: pingvin
image: stonith404/pingvin-share
image: smp46/pingvin-share-x
restart: unless-stopped
environment:
- TRUST_PROXY=true # SWAG se place devant le conteneur
ports:
- 3600:3000
volumes:
- /srv/docker/pingvin/data:/opt/app/backend/data
- /srv/docker/pingvin/data/img:/opt/app/frontend/public/img
- /srv/docker/pingvin/uploads:/opt/app/backend/uploads # chemin du dossier où stocker les fichiers envoyés à pingvin. À adapter à votre convenance.
- /srv/docker/pingvin/uploads:/opt/app/backend/data/uploads # chemin du dossier où stocker les fichiers envoyés à pingvin. À adapter à votre convenance.
depends_on:
clamav:
condition: service_healthy
@@ -50,7 +57,7 @@ services:
```yaml [compose.yaml]
services:
pingvin-share:
pingvin-share-x:
#...
labels:
- com.centurylinklabs.watchtower.enable=true
@@ -228,7 +228,7 @@ Et voilà ! code-server est maintenant exposé !
## Protéger code-server avec TinyAuth
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `code.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protéger-une-application-via-le-reverse-proxy) :
```nginx [code.subdomain.conf]{26-38,41-42}
```nginx [code.subdomain.conf]{26-27,30-31}
## Version 2023/12/19
server {
@@ -254,23 +254,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.mondomaine.fr/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";
@@ -297,7 +286,7 @@ server {
::note{to="/serveex/security/tinyauth#exposer-tinyauth-avec-swag"}
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
La vérification `/tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
::
::tip{icon=""}
@@ -167,7 +167,7 @@ Et voilà ! IT Tools est maintenant exposé !
## Protéger IT Tools avec TinyAuth
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `tools.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protéger-une-application-via-le-reverse-proxy) :
```nginx [tools.subdomain.conf]{26-38,41-42}
```nginx [tools.subdomain.conf]{26-27,30-31}
## Version 2023/12/19
server {
@@ -193,23 +193,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.mondomaine.fr/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";
@@ -237,7 +226,7 @@ server {
::note{to="/serveex/security/tinyauth#exposer-tinyauth-avec-swag"}
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
La vérification `/tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
::
::tip{icon=""}
+9 -20
View File
@@ -240,9 +240,9 @@ server {
::
## Protéger AdGuard avec TinyAuth
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `adguard.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protéger-une-application-via-le-reverse-proxy). Le `location /dns-query` est laissé en dehors de la vérification `auth_request`, puisque les clients DNS-over-HTTPS ne peuvent pas faire de connexion interactive :
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `adguard.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protéger-une-application-via-le-reverse-proxy). Le `location /dns-query` est laissé en dehors de la vérification TinyAuth, puisque les clients DNS-over-HTTPS ne peuvent pas faire de connexion interactive :
```nginx [adguard.subdomain.conf]{28-40,43-44,69-70}
```nginx [adguard.subdomain.conf]{28-29,32-33,58-59}
## Version 2023/05/31
# make sure that your adguard container is named adguard
# make sure that your dns has a cname set for adguard
@@ -270,23 +270,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.mondomaine.fr/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";
@@ -311,8 +300,8 @@ server {
}
location /control {
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;
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
@@ -339,7 +328,7 @@ server {
::note{to="/serveex/security/tinyauth#exposer-tinyauth-avec-swag"}
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
La vérification `/tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
::
::tip{icon=""}
@@ -171,7 +171,7 @@ Et voilà ! File Browser est maintenant exposé !
## Protéger File Browser avec TinyAuth
Ajoutez la vérification forward-auth de [TinyAuth](/serveex/security/tinyauth) directement dans `files.subdomain.conf`, de la même façon que dans [le tutoriel TinyAuth](/serveex/security/tinyauth#protéger-une-application-via-le-reverse-proxy) :
```nginx [files.subdomain.conf]{26-38,41-42}
```nginx [files.subdomain.conf]{26-27,30-31}
## Version 2023/12/19
server {
@@ -197,23 +197,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.mondomaine.fr/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";
@@ -240,7 +229,7 @@ server {
::note{to="/serveex/security/tinyauth#exposer-tinyauth-avec-swag"}
Le bloc `location /tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
La vérification `/tinyauth` s'exécute dans le conteneur de SWAG lui-même, SWAG doit donc être sur le réseau Docker de TinyAuth pour le joindre par son nom (`tinyauth` ici). Cela devrait déjà être en place depuis **l'exposition de TinyAuth**. Si vous rencontrez une erreur, revérifiez que le fichier compose de SWAG a toujours ce réseau rattaché.
::
::tip{icon=""}
+14
View File
@@ -67,6 +67,15 @@ function scanContentIcons(): { collections: string[], icons: string[] } {
}
const contentIcons = scanContentIcons()
// Version shown in the footer. It is the release number of the production
// image (1.0.31, ...), decided by the docudjeex-build workflow, which passes
// it as BUILD_VERSION when it builds the image. Left empty everywhere else
// (dev, local builds, CI builds that are not published), and the footer then
// shows nothing.
function buildVersion(): string {
return (process.env.BUILD_VERSION || '').trim()
}
// ProseImg (app/components/content/ProseImg.vue) caps every markdown image
// at 1280px wide, but NuxtImg's `width` prop always becomes the rendered
// <img>'s HTML width attribute too, not just the resize target. Passing
@@ -191,6 +200,11 @@ export default defineNuxtConfig({
// Read by ProseImg to cap each image's width at its own real size
// instead of always requesting (and rendering) 1280px.
imageWidths: scanImageWidths(),
// Shown in the footer (AppFooterRight), changes at every production build.
buildVersion: buildVersion(),
// Where the version links to: the pull request behind the build, set by
// the same workflow (BUILD_VERSION_URL). The version stays plain text without it.
buildVersionUrl: (process.env.BUILD_VERSION_URL || '').trim(),
},
},
icon: {