Post

Sonarr - TV Show Management from the Arr family of applications

Sonarr - TV Show Management from the Arr family of applications

Sonarr is a PVR for Usenet and BitTorrent users. It can monitor multiple RSS feeds for new episodes of your favorite shows and will grab, sort and rename them. It can also be configured to automatically upgrade the quality of files already downloaded when a better quality format becomes available.

I use PostgreSQL instead of SQLite

Since this uses media from my NAS i have simply decided to run this as a Docker Container on UnRAID on my NAS instead of having it as part of my kubernetes cluster to remove the need to access the NAS media remotely

Kubernetes Manifest

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
---
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: sonarr
    app.kubernetes.io/instance: sonarr
    app.kubernetes.io/name: sonarr
  name: sonarr
  namespace: arr
spec:
  replicas: 1
  strategy:
    type: Recreate
  selector:
    matchLabels:
      app: sonarr
  template:
    metadata:
      labels:
        app: sonarr
        app.kubernetes.io/name: sonarr
    spec:
      nodeSelector:
        nas: "true"
      containers:
      - image: hotio/sonarr
        name: sonarr
        ports:
        - containerPort: 8989
          name: web
          protocol: TCP
        env:
        - name: TZ
          value: Europe/London
        volumeMounts:
        - mountPath: "/tv"
          readOnly: false
          name: smb
          subPath: "TV Shows"
        - mountPath: "/downloads"
          readOnly: false
          name: smb
          subPath: "Downloads"
        - mountPath: "/config"
          readOnly: false
          name: config
      volumes:
        - name: smb
          persistentVolumeClaim:
            claimName: pvc-sonarr-smb
        - name: config
          persistentVolumeClaim:
            claimName: sonarr
---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: sonarr
  name: sonarr
  namespace: arr
spec:
  ports:
  - name: web-tcp
    port: 8989
    protocol: TCP
    targetPort: 8989
  selector:
    app: sonarr
---
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: sonarr
  namespace: arr
  annotations: 
    kubernetes.io/ingress.class: traefik-external
    gethomepage.dev/href: "https://sonarr.f9.casa"
    gethomepage.dev/enabled: "true"
    gethomepage.dev/description: TV Show Management
    gethomepage.dev/group: Media Management
    gethomepage.dev/icon: sonarr.png
    gethomepage.dev/name: Sonarr
    gethomepage.dev/widget.type: sonarr
    gethomepage.dev/widget.url: "http://sonarr.arr:8989"
    gethomepage.dev/widget.key: "[REDACTED]"
spec:
  entryPoints:
    - websecure
  routes:
    - match: Host(`sonarr.f9.casa`)
      kind: Rule
      services:
        - name: sonarr
          port: 8989
      middlewares:
        - name: default-headers
          namespace: default
        - name: authentik
          namespace: authentik
  tls:
    secretName: f9-casa-tls

Docker Compose

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
version: '3.9'
services:
  sonarr:
    image: ghcr.io/hotio/sonarr
    hostname: sonarr
    networks:
      - traefik-public
    environment:
      - PUID=1000
      - PGID=1000
    volumes:
      - /srv/cephfs/docker/appdata/sonarr:/config
      - /srv/media/TV Shows:/tv
      - /srv/media/Downloads:/downloads
    deploy:
      labels:
        - "traefik.enable=true"
        - "traefik.http.routers.sonarr.rule=Host(`sonarr.f9.casa`)"
        - "traefik.http.services.sonarr.loadbalancer.server.port=8989"
        - "traefik.http.routers.sonarr.entrypoints=https"
        - "traefik.http.routers.sonarr.tls=true"
        - "traefik.http.routers.sonarr.tls.certresolver=letsencrypt"
        - "traefik.http.routers.sonarr.middlewares=authentik@docker"

                
        - homepage.group=Media Management
        - homepage.name=Sonarr
        - homepage.icon=sonarr.png
        - homepage.href=https://sonarr.f9.casa
        - homepage.description=TV Show Management
        - homepage.siteMonitor=http://sonarr:8989
        - homepage.widget.type=sonarr
        - homepage.widget.url=http://sonarr:8989
        - homepage.widget.key=[REDACTED]
      mode: replicated
networks:
  traefik-public:
    external: true

Configuration

config.xml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<Config>
  <LogLevel>info</LogLevel>
  <EnableSsl>False</EnableSsl>
  <Port>8989</Port>
  <SslPort>9898</SslPort>
  <UrlBase></UrlBase>
  <BindAddress>*</BindAddress>
  <ApiKey>[REDACTED]</ApiKey>
  <AuthenticationMethod>External</AuthenticationMethod>
  <UpdateMechanism>Docker</UpdateMechanism>
  <LaunchBrowser>True</LaunchBrowser>
  <Branch>main</Branch>
  <InstanceName>Sonarr</InstanceName>
  <SyslogPort>514</SyslogPort>
  <AuthenticationRequired>Enabled</AuthenticationRequired>
  <SslCertPath></SslCertPath>
  <SslCertPassword></SslCertPassword>
  <AnalyticsEnabled>False</AnalyticsEnabled>
  <PostgresUser>sonarr</PostgresUser>
  <PostgresPassword>[REDACTED]</PostgresPassword>
  <PostgresPort>5432</PostgresPort>
  <PostgresHost>postgresql</PostgresHost>
</Config>
This post is licensed under CC BY 4.0 by the author.