Commit Graph

22 Commits

Author SHA1 Message Date
Will Anderson 4ef625ef3d qbittorrent: bake performance settings into initContainer
Switch qbt-config-patch from busybox/sed to python:3-alpine so we can
cleanly handle INI keys with backslashes. Now seeds both password hash
and high-throughput defaults (3000 max connections, 50 active downloads,
unlimited rate) on fresh PVC deployments. Existing configs are updated
in-place; API-applied values are preserved on restart.
2026-04-11 12:24:16 -05:00
Will Anderson c4cd91920a Fix qBittorrent auth: stamp known password hash via initContainer
LocalhostAuthEnabled=false isn't honored in this qBT version. Instead, initContainer
stamps the PBKDF2 hash for admin:adminadmin before startup so all three pods have
consistent credentials. portforward-helper and coordinator restored to cookie-based
SID auth.
2026-04-11 11:14:23 -05:00
Will Anderson 531df76a90 Patch qBittorrent config via initContainer before startup
Adds qbt-config-patch initContainer that sets WebUI\LocalhostAuthEnabled=false
in qBittorrent.conf before the main containers start. Prevents qBittorrent from
overwriting the setting (previously edited at runtime, lost on pod restart).
2026-04-11 11:11:23 -05:00
Will Anderson 854ccd1344 Disable qBittorrent localhost auth; remove credentials from helpers
LocalhostAuthEnabled=false set in all three qbt configs. portforward-helper and
coordinator now call the API directly without auth — no more ban risk from failed
login attempts.
2026-04-11 11:08:54 -05:00
Will Anderson ffd3068f78 Fix port forwarding: read file instead of HTTP API, fix server names
- portforward-helper now reads /tmp/gluetun/forwarded_port via shared emptyDir
  volume instead of polling gluetun HTTP API (which returned Unauthorized)
- Main qbt: SERVER_NAMES=US-IL#1 (valid entry in gluetun server list)
- Both manifests cleaned up
2026-04-11 10:12:19 -05:00
Will Anderson 69976ca172 Fix main qbt server selection; bump portforward-helper memory limit
- Main qbt: switch from pinned US-IL#149 (no PF) to SERVER_REGIONS=Illinois so
  gluetun picks any IL server with port forwarding enabled
- Fornax workers: portforward-helper 32Mi→96Mi to stop OOMKill
2026-04-11 10:03:52 -05:00
Will Anderson cce8c0a0d4 Fix server names to match gluetun's ProtonVPN server list
US-TX#253 and US-TX#34 aren't in gluetun's built-in list. Switching to:
- Main qbt: US-IL#149 (was US-IL#267)
- Fornax TX253: US-TX#179
- Fornax TX34: US-TX#220
Private keys are per-account and work with any ProtonVPN WireGuard server.
2026-04-11 09:59:23 -05:00
Will Anderson e1996d4396 Switch to gluetun native ProtonVPN port forwarding (VPN_PORT_FORWARDING=on)
Replaces DIY natpmpc sidecar with gluetun's built-in NAT-PMP handling for the protonvpn
provider. The natpmpc UDP response was being dropped by gluetun's firewall since conntrack
doesn't track stateless UDP from the gateway. With VPN_PORT_FORWARDING=on, gluetun handles
the NAT-PMP exchange internally and exposes the port at :8000/v1/openvpn/portforwarded.
Helper sidecar now just polls that endpoint.
2026-04-11 09:57:07 -05:00
Will Anderson 24e308202b Allow NAT-PMP response port through gluetun firewall (FIREWALL_INPUT_PORTS=5351) 2026-04-11 09:50:55 -05:00
Will Anderson c6aa006ec7 Switch VPN to US-IL#267 (NAT-PMP port forwarding supported) 2026-04-11 08:41:06 -05:00
Will Anderson 3f33a76ed2 media: natpmpc-helper sleep before apk install (VPN must be up first) 2026-04-11 08:29:54 -05:00
Will Anderson ca5f9e90da media: fix natpmpc-helper package name (libnatpmp not natpmpc) 2026-04-11 08:27:53 -05:00
Will Anderson f99965da0a media: fix natpmpc-helper OOM and API call format
Increase memory limit 32→64Mi (apk install was hitting the 32Mi ceiling).
Fix qBittorrent setPreferences call: use form-encoded json=<string> not
json body nesting.
2026-04-11 08:24:19 -05:00
Will Anderson fd08987e12 media: add natpmpc-helper sidecar for ProtonVPN port forwarding
Adds a lightweight Alpine sidecar that runs natpmpc against the ProtonVPN
NAT-PMP gateway (10.2.0.1) every 45s to maintain a forwarded port, then
updates qBittorrent's listen port via API. Without inbound port forwarding
peers can only be dialed out to, which severely limits download speeds on
a gigabit connection.
2026-04-11 08:21:37 -05:00
Will Anderson 7c17b8a93e fix(gluetun): remove shell wrapper, use default entrypoint
The /gluetun binary has restrictive permissions and cannot be exec'd
from a shell wrapper. The OOM fix (512Mi limit) prevents the crashes
that caused stale ip rules, so the wrapper is not needed.
2026-04-11 04:31:01 -05:00
Will Anderson 203233beca fix(gluetun): prevent OOM crash and stale ip rule on container restart
- Increase memory limit 128Mi → 512Mi (DNS block list download needs ~200MB)
- Add command wrapper that cleans stale ip rules before exec'ing gluetun
  so container restarts within the same pod don't fail with "file exists"
- Fix deprecated VPN_ENDPOINT_IP/PORT → WIREGUARD_ENDPOINT_IP/PORT
2026-04-11 04:28:32 -05:00
Will Anderson 28a108a1d8 fix(gluetun): pin to US-TX#457 server to restore downloads
The protonvpn named provider rotates through P2P servers and DNS
health checks were failing on every server it tried. Switching back
to custom provider pinned to the specific US-TX#457 server/key combo
from the ProtonVPN conf file, which is confirmed to work.

This sacrifices automatic port forwarding but restores stable downloads.
2026-04-11 04:24:35 -05:00
Will Anderson e5785f3359 gluetun: fix ip rule cleanup in init container for VPN restart stability
Delete ip rule by priority 101 before table 51820 to prevent 'file exists'
errors when gluetun internally restarts the WireGuard connection.
2026-04-11 04:18:56 -05:00
Will Anderson 9cd3dd0134 gluetun: switch to protonvpn provider with port forwarding enabled
Custom WireGuard mode doesn't support NAT-PMP port forwarding — peers
can't connect inbound so most torrents stall. Switching to protonvpn
provider with SERVER_FEATURES=p2p picks a port-forwarding-capable server
and VPN_PORT_FORWARDING=on handles the NAT-PMP handshake. Up command
updates qBittorrent listen port automatically when gluetun gets the port.
2026-04-11 04:09:29 -05:00
Will Anderson 4ab5cf1e06 fix gluetun: flush stale IPv4 routing rules on pod start 2026-04-11 00:58:10 -05:00
Will Anderson a1c1c7b0f6 Switch Plex → Jellyfin, fix gluetun IPv6 VPN issue 2026-04-11 00:11:41 -05:00
Will Anderson ba99111753 Add media stack: Plex, Radarr, Sonarr, Prowlarr, qBittorrent, Bazarr, Overseerr
- Namespace: media (created via Terraform)
- Storage: hostPath PV at /media on Legion (movies, tv/shows, tv/anime, downloads)
- VPN: gluetun sidecar with ProtonVPN WireGuard (US-TX#253), all torrent traffic tunneled
- Radarr: movie automation with /media/movies root
- Sonarr: TV/anime automation with /media/tv/{shows,anime} roots
- Prowlarr: indexer aggregator (YTS, 1337x, Nyaa for anime)
- qBittorrent: torrent client, network namespaced behind gluetun VPN
- Bazarr: automatic subtitle downloads (connects to Radarr + Sonarr)
- Overseerr: family request portal at watch.nook.family
- Plex: media server at plex.nook.family
2026-04-10 22:50:13 -05:00