Prepare qBittorrent for reverse proxy access

This commit is contained in:
Fabio Scotto di Santolo
2026-10-10 14:05:47 +02:00
parent c8df4dde87
commit 5f3792d603
5 changed files with 131 additions and 6 deletions

View File

@@ -5,7 +5,10 @@ admin-owned rootless `atlas-qbittorrent.service` Quadlet. No VPN is involved:
outbound traffic uses Atlas' normal home-network default route. Existing
WireGuard configuration is unchanged.
- LAN Web UI: `http://192.168.178.55:8090` (LAN-only firewalld rule).
- LAN Web UI: `http://192.168.178.55:8090` (LAN-only firewalld rule,
already including Aegis at `192.168.178.54`).
- Prepared public domain: `downloads.fscotto.co`, through NPM on Prometheus.
DNS and the NPM Proxy Host remain manual operations.
- Downloads: `/zpool/archive/Downloads`, available through SMB `Archive`.
- Private configuration dataset: `zpool/services/data/qbittorrent`.
- Only configuration and Downloads are mounted in the container.
@@ -13,8 +16,10 @@ WireGuard configuration is unchanged.
published and no router port forwarding is configured. Outbound connections
work; inbound peer connectivity and seeding are consequently limited.
- The Web UI keeps authentication and CSRF/Host-header protection enabled.
Initial settings are seeded only once, preserving passwords and settings
subsequently changed in the application.
Initial settings are seeded only once. Ansible owns only the declared Web
domain, reverse-proxy support, trusted Aegis source, and authentication/CSRF/Host
protections; it stops only qBittorrent before changing these settings and
preserves credentials and unrelated application settings.
## Deployment
@@ -63,3 +68,46 @@ A real torrent download and a host reboot have not been tested. The initial
WebUI port mapping was corrected to use 8090 internally and externally, preserving
Host-header validation. qBittorrent 5.2 uses `[Network] PortForwardingEnabled=false`
for its persistent UPnP/NAT-PMP option.
## Manual public endpoint setup
Atlas is prepared for `downloads.fscotto.co`, with reverse-proxy support enabled
and only `192.168.178.54` (the Aegis source-NAT gateway) trusted for forwarded
client addresses. Existing LAN access remains available. No new firewall opening
is required because the existing `192.168.178.0/24` rule includes Aegis.
Before publishing, set a strong permanent Web UI password. A temporary startup
password is not suitable for a public endpoint. Do not bypass authentication for
the reverse proxy or disable CSRF/Host validation.
Namecheap:
- Type: A Record; Host: `downloads`; Value: `179.237.102.172` (Prometheus).
- Do not point this record to Atlas' private LAN address.
NPM on Prometheus:
- Domain Names: `downloads.fscotto.co`
- Scheme: `http`
- Forward Hostname/IP: `192.168.178.55`
- Forward Port: `8090`
- SSL: request/select a certificate for the domain and enable Force SSL.
- No custom Advanced configuration is needed for the currently deployed NPM:
its standard include sets `Host $host`, `X-Forwarded-Proto`, and
`X-Forwarded-For`. Host has no explicit external port, avoiding the Web UI's
internal-port validation. Do not replace it with `Host $http_host` when the
latter includes `:443`.
Reference: <https://github.com/qbittorrent/qBittorrent/wiki/NGINX-Reverse-Proxy-for-Web-UI>.
Public DNS, TLS and end-to-end login remain unverified until the manual setup is
complete. Preparing the Web proxy does not change torrent peer connectivity.
### Reverse-proxy preparation verified on 2026-10-10
Atlas accepts `downloads.fscotto.co` with HTTPS forwarded headers from the NPM
container on Prometheus through Aegis (HTTP 200). Unauthenticated API access is
still denied (403), and an unrelated Host is rejected (401). No DNS record,
NPM Proxy Host, certificate, router forwarding or WireGuard configuration was
changed. The existing LAN firewall rule already permits Aegis. A permanent
Web UI password still needs to be configured before public exposure.