From 29d05123c685daf393e230c6e31c457c94f75755 Mon Sep 17 00:00:00 2001 From: rope Date: Tue, 21 Jul 2026 10:28:59 +0100 Subject: [PATCH] shelfarr: switch to host networking so it can reach Prowlarr/SABnzbd --- services/shelfarr.nix | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/services/shelfarr.nix b/services/shelfarr.nix index 7df69a4..505a0ce 100644 --- a/services/shelfarr.nix +++ b/services/shelfarr.nix @@ -6,11 +6,13 @@ # Ebooks volume also skipped (audiobooks-only use case); mount /ebooks later # if that turns out to be required for the container to start cleanly. # -# Prowlarr/qBittorrent hookup isn't wired into arr-interconnect.nix: unlike -# Sonarr/Radarr/Prowlarr/Bazarr, Shelfarr has no config.xml API key written -# before first boot — the first registered user becomes admin via the web UI, -# so that connection has to be made once by hand at -# https://shelfarr.nordhammer.it after first boot. +# Runs on the host network rather than the docker bridge: Shelfarr calls +# back out to Prowlarr/SABnzbd on localhost, and SABnzbd only binds +# 127.0.0.1 on the host (see sabnzbd.nix) — unreachable from a bridged +# container. HTTP_PORT tells Thruster (the Rails 8 front proxy baked into +# the image) to listen on 5056 directly instead of its 80 default, so it +# doesn't collide with nginx's own :80. Prowlarr/SABnzbd hookup is scripted +# in arr-interconnect.nix via `rails runner` (no public settings API here). { config, lib, ... }: { config = lib.mkIf (config.networking.hostName == "FredOS-Mediaserver") { @@ -26,11 +28,11 @@ "/mnt/storage/torrents/audiobooks:/audiobooks" "/mnt/storage/torrents/downloads:/downloads" ]; - # Localhost-only; nginx fronts it at shelfarr.nordhammer.it behind Authelia - ports = [ "127.0.0.1:5056:80" ]; + extraOptions = [ "--network=host" ]; environment = { TZ = "Europe/London"; SOLID_QUEUE_IN_PUMA = "1"; + HTTP_PORT = "5056"; # Matches fred:media ownership (2775) on /mnt/storage/torrents/audiobooks PUID = "1000"; PGID = "3000";