shelfarr: switch to host networking so it can reach Prowlarr/SABnzbd

This commit is contained in:
rope 2026-07-21 10:28:59 +01:00
parent 964be8696b
commit 29d05123c6

View file

@ -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";