2025-08-12 00:32:04 +02:00
2025-08-11 12:29:51 +02:00
2025-08-13 21:13:25 +02:00
2025-08-10 12:43:48 +02:00
2025-08-11 12:57:08 +02:00
2025-08-10 18:15:28 +02:00
2025-08-07 21:36:05 +00:00
2025-08-10 12:43:48 +02:00
2025-08-15 13:02:19 +02:00

Subscribarr

License MIT Python 3.13 Django 5 Docker ready ntfy supported Apprise supported

Ein leichtgewichtiges WebFrontend für Benachrichtigungen und Abos rund um Sonarr/Radarr mit JellyfinLogin, Kalender, AboVerwaltung und flexiblen Notifications per EMail, ntfy und Apprise.

Features

  • JellyfinLogin (kein eigener Userstore nötig)
  • Kalender im Sonarr/RadarrStil (kommende Episoden/Filme)
  • Abonnieren/Abbestellen direkt aus dem UI (Serien & Filme)
  • AdminÜbersicht aller Abos je Nutzer inkl. Poster
  • Benachrichtigungen pro Nutzer wählbar:
    • EMail (SMTP)
    • ntfy (Token oder Basic Auth)
    • Apprise (zahlreiche Ziele wie Discord, Gotify, Pushover, Webhooks u.v.m.)
  • Dockerfertig, envgesteuerte SecuritySettings (ALLOWED_HOSTS, CSRF, Proxy)

Schnellstart

Screenshots

Screenshot 1
Screenshot 2
Screenshot 3
Screenshot 4
Screenshot 5
Screenshot 6

Mit Docker Compose

  1. Lockfile aktuell halten (wenn Pipfile geändert wurde):
pipenv lock
  1. Image bauen/Starten:
docker compose build
docker compose up -d
  1. Öffne die App und führe das FirstRunSetup (Jellyfin + ArrURLs/Keys) durch.

Wichtige Umgebungsvariablen (Beispiele):

  • DJANGO_ALLOWED_HOSTS=subscribarr.example.com,localhost,127.0.0.1
  • DJANGO_CSRF_TRUSTED_ORIGINS=https://subscribarr.example.com,http://subscribarr.example.com
  • ReverseProxy/TLS:
    • USE_X_FORWARDED_HOST=true
    • DJANGO_SECURE_PROXY_SSL_HEADER=true
    • DJANGO_CSRF_COOKIE_SECURE=true
    • DJANGO_SESSION_COOKIE_SECURE=true

Hinweis: In DJANGO_CSRF_TRUSTED_ORIGINS muss Schema+Host (und ggf. Port) exakt stimmen.

Lokal (Pipenv)

pipenv sync
pipenv run python manage.py migrate
pipenv run python manage.py runserver

Konfiguration im UI

  • Einstellungen → Jellyfin: ServerURL + APIKey
  • Einstellungen → Sonarr/Radarr: BaseURLs + APIKeys (inkl. „Test“-Knopf)
  • Einstellungen → Mailserver: SMTP (Host/Port/TLS/SSL/Benutzer/Passwort/From)
  • Einstellungen → Notifications:
    • ntfy: ServerURL, DefaultTopic, BasicAuth oder BearerToken
    • Apprise: DefaultURL(s) (eine pro Zeile)
  • Profil (pro Nutzer):
    • Kanal wählen: EMail, ntfy oder Apprise
    • ntfy Topic (optional, überschreibt Default)
    • Apprise URL(s) (optional, ergänzen die Defaults)

ntfy Hinweise

  • ServerURL: z.B. https://ntfy.sh oder eigener Server
  • Auth:
    • BearerToken (Header)
    • BasicAuth (Benutzer/Passwort)
  • Topic:
    • pro Nutzer frei wählbar (Profil) oder globales DefaultTopic (Einstellungen)

Apprise Hinweise

  • Trag eine oder mehrere ZielURLs ein (pro Zeile), z.B.:
    • gotify://TOKEN@gotify.example.com/
    • discord://webhook_id/webhook_token
    • mailto://user:pass@smtp.example.com
    • pover://user@token
    • json://webhook.example.com/path
  • Nutzer können eigene URLs ergänzen; die globalen Defaults bleiben zusätzlich aktiv.

Benachrichtigungslogik

  • Serien: Es wird pro Abo am ReleaseTag geprüft, ob die Episode bereits als Datei vorhanden ist (Sonarr hasFile).
  • Filme: Analog über Radarr hasFile und ReleaseDatum (Digital/Disc/KinoTag).
  • Doppelversand wird per SentNotification unterdrückt (täglich pro Item/Nutzer).
  • Fallback: Wenn ntfy/Apprise scheitern, wird EMail versendet (falls konfiguriert).

Jobs / Manuell anstoßen

  • Regelmäßiger Check per Management Command (z.B. via Cron):
pipenv run python manage.py check_new_media
  • In Docker:
docker compose exec web python manage.py check_new_media

Sicherheit & Proxy

  • Setze DJANGO_ALLOWED_HOSTS auf deine(n) Hostnamen.
  • Füge alle genutzten Ursprünge in DJANGO_CSRF_TRUSTED_ORIGINS hinzu (http/https und Port beachten).
  • Hinter ReverseProxy TLS aktivieren: USE_X_FORWARDED_HOST, DJANGO_SECURE_PROXY_SSL_HEADER, CookieFlags.

TechStack

  • Backend: Django 5 + DRF
  • Integrationen: Sonarr/Radarr (API v3)
  • Auth: Jellyfin
  • Notifications: SMTP, ntfy (HTTP), Apprise
  • Frontend: Templates + FullCalendar
  • DB: SQLite (default)

Lizenz

MIT

Subscribarr

Subscribarr

Subscribarr is a notification tool for the *Arr ecosystem (Sonarr, Radarr) and Jellyfin. Users can subscribe to shows/movies; when new episodes/releases are available (and actually present), Subscribarr sends email notifications.


Screenshots

Overview Settings Subscriptions Search Details Notifications


Features

  • Login via Jellyfin (use your Jellyfin account; admin status respected)
  • Subscriptions for series and movies; duplicate-send protection per user/day
  • Email notifications (SMTP configurable)
  • Sonarr/Radarr integration (calendar/status; optional file-presence check)
  • Settings UI for Jellyfin/Arr/Mail/Account
  • Periodic check via cron calling manage.py check_new_media

Architecture / Tech Stack

  • Backend: Django + Django REST Framework
  • Apps (examples): arr_api, accounts, settingspanel
  • Database: SQLite by default (path configurable via env)
  • Auth: Jellyfin API (admin mirrored from Jellyfin policy)

Quickstart (Docker)

1) Clone & run

git clone https://gitea.js-devop.de/jschaufuss/Subscribarr.git
cd Subscribarr
docker compose up -d --build
  • Default app port inside the container: 8000
  • Optional: set CRON_SCHEDULE (e.g., */30 * * * *) to enable periodic checks

2) Minimal docker-compose.yml (example)

---
services:
  subscribarr:
    build: .
    container_name: subscribarr
    ports:
      - "8081:8000"
    environment:
      # Django
      - DJANGO_DEBUG=true
      - USE_X_FORWARDED_HOST=true
      - DJANGO_SECURE_PROXY_SSL_HEADER=true
      - DJANGO_CSRF_COOKIE_SECURE=true
      - DJANGO_SESSION_COOKIE_SECURE=true
      - DJANGO_ALLOWED_HOSTS=*
      - DJANGO_SECRET_KEY=change-me
      - DB_PATH=/app/data/db.sqlite3
      - NOTIFICATIONS_ALLOW_DUPLICATES=false
      - DJANGO_CSRF_TRUSTED_ORIGINS="https://subscribarr.local.js-devop.de"
      # App Settings (optional, otherwise use first-run setup)
      #- JELLYFIN_URL=
      #- JELLYFIN_API_KEY=
      #- SONARR_URL=
      #- SONARR_API_KEY=
      #- RADARR_URL=
      #- RADARR_API_KEY=
      #- MAIL_HOST=
      #- MAIL_PORT=
      #- MAIL_SECURE=
      #- MAIL_USER=
      #- MAIL_PASSWORD=
      #- MAIL_FROM=
      # Admin bootstrap (optional)
      #- ADMIN_USERNAME=
      #- ADMIN_PASSWORD=
      #- ADMIN_EMAIL=
      # Cron schedule (default every 30min)
      - CRON_SCHEDULE=*/30 * * * *
    volumes:
      - ./data:/app/data
    restart: unless-stopped

Environment Variables (selection)

Variable Purpose
DJANGO_DEBUG true / false (disable in production).
DJANGO_ALLOWED_HOSTS Comma list of allowed hosts (e.g., example.com,localhost).
DJANGO_SECRET_KEY Django secret key.
DB_PATH SQLite path, e.g., /app/data/db.sqlite3.
NOTIFICATIONS_ALLOW_DUPLICATES Allow duplicate sends (true/false).
ADMIN_USERNAME / ADMIN_PASSWORD / ADMIN_EMAIL Optional: bootstrap an admin user on first run.
JELLYFIN_URL / JELLYFIN_API_KEY Base URL + API key for Jellyfin.
SONARR_URL / SONARR_API_KEY Base URL + API key for Sonarr.
RADARR_URL / RADARR_API_KEY Base URL + API key for Radarr.
MAIL_HOST / MAIL_PORT / MAIL_SECURE SMTP host/port/security (starttls / ssl / empty).
MAIL_USER / MAIL_PASSWORD / MAIL_FROM SMTP auth + sender address.
CRON_SCHEDULE Cron interval for periodic checks (e.g., */30 * * * *).

First Run

  1. Start the container (or dev server) and open http://<host>:8081.
  2. Complete the first-time setup: Jellyfin URL/API key (required), optional Sonarr/Radarr, SMTP.
  3. Sign in with Jellyfin credentials (admin users in Jellyfin become admins in Subscribarr).
  4. Adjust settings later at /settings/.

Notifications & Cron

  • The periodic job calls check_new_media which determines todays items via Sonarr/Radarr calendars.
  • Email is sent only if the item is present (e.g., hasFile/downloaded) and not already recorded in the sent-log (duplicate guard).
  • Cron is configured using CRON_SCHEDULE and runs python manage.py check_new_media. Output is typically logged to /app/cron.log in the container.

Routes / Endpoints (selected)

  • GET / — Overview page with search/filter and subscribe actions
  • GET/POST /settings/ — Jellyfin/Arr/Mail/Account configuration (auth required; admin for some actions)
  • Example subscribe endpoints (subject to change):
    • POST /api/series/subscribe/<series_id>/, POST /api/series/unsubscribe/<series_id>/
    • POST /api/movies/subscribe/<movie_id>/, POST /api/movies/unsubscribe/<movie_id>/

Local Development (without Docker)

Requires Python 3.12+ (recommended).

1) Clone

git clone https://gitea.js-devop.de/jschaufuss/Subscribarr.git
cd Subscribarr

2) Create & activate a virtualenv

python -m venv .venv
# Linux/macOS:
source .venv/bin/activate
# Windows (PowerShell):
# .venv\Scripts\Activate.ps1

3) Install dependencies (including Django)

If the repository provides requirements.txt:

pip install --upgrade pip wheel
pip install -r requirements.txt

If not, install the core stack explicitly:

pip install --upgrade pip wheel
pip install "Django>=5" djangorestframework python-dotenv
# add any additional libs your project uses as needed

4) Configure environment (dev)

Create a .env (or export env vars) with at least:

DJANGO_DEBUG=true
DJANGO_SECRET_KEY=dev-secret
DJANGO_ALLOWED_HOSTS=*
DB_PATH=./data/db.sqlite3

Create the data/ directory if it doesnt exist.

5) Database setup

python manage.py makemigrations
python manage.py migrate

6) (Optional) Create a superuser for the Django admin

python manage.py createsuperuser

7) Run the dev server

python manage.py runserver 0.0.0.0:8000

Data Model (high level)

  • User (accounts.User): custom user with Jellyfin link and admin flag.
  • Subscriptions (arr_api.SeriesSubscription, arr_api.MovieSubscription): unique per user/title.
  • SentNotification: records delivered emails to avoid duplicates.
  • AppSettings: singleton for Jellyfin/Arr/Mail/Account configuration.

Production Notes

  • Set DEBUG=false, a strong DJANGO_SECRET_KEY, and proper DJANGO_ALLOWED_HOSTS.
  • Run behind a reverse proxy with HTTPS.
  • Collect static files if served by Django:
    python manage.py collectstatic --noinput
    
  • Use a persistent database volume (or switch to Postgres/MySQL) for production.

License

MIT (see LICENSE).

Description
Subscribarr ist ein Benachrichtigungstool für die Arr-Suite (Sonarr, Radarr, Jellyseerr, Jellyfin), mit dem Nutzer Serien oder Filme abonnieren können. Bei neuen Episoden oder Releases versendet Subscribarr automatische E-Mail-Benachrichtigungen.
Readme MIT 10 MiB
Languages
Python 54%
HTML 33.3%
CSS 10.7%
Shell 1.5%
Dockerfile 0.5%