Skip to content

Instantly share code, notes, and snippets.

@jmcdice
Created January 4, 2026 04:02
Show Gist options
  • Select an option

  • Save jmcdice/71c27f13dfdc5c6a450318e4eb75380a to your computer and use it in GitHub Desktop.

Select an option

Save jmcdice/71c27f13dfdc5c6a450318e4eb75380a to your computer and use it in GitHub Desktop.
Couch Commander - Docker Media Stack Architecture (Mermaid Diagram)

Couch Commander - Docker Architecture

graph TB
    subgraph "External Access"
        USER[User/Client]
        INTERNET[Internet]
    end
    
    subgraph "Docker Network: couch-commander_media-net (172.18.0.0/16)"
        subgraph "VPN Layer"
            GLUETUN[Gluetun VPN<br/>172.18.0.10<br/>ProtonVPN]
            QBT[qBittorrent<br/>Port 8080<br/>Downloads via VPN]
        end
        
        subgraph "Media Management (Arr Stack)"
            PROWLARR[Prowlarr<br/>172.18.0.20:9696<br/>Indexer Manager]
            SONARR[Sonarr<br/>172.18.0.30:8989<br/>TV Shows]
            RADARR[Radarr<br/>172.18.0.40:7878<br/>Movies]
        end
        
        subgraph "Request & Streaming"
            JELLYSEERR[Jellyseerr<br/>172.18.0.50:5055<br/>Media Requests]
        end
    end
    
    subgraph "Host Network"
        PLEX[Plex Media Server<br/>Port 32400<br/>Streaming Service]
    end
    
    subgraph "Storage Volumes"
        CONFIG[/Config Storage/<br/>/home/joey/couch-commander/config/]
        MEDIA[/Media Library/<br/>/volume1/plex-infra/Media/]
        DOWNLOADS[/Downloads/<br/>/volume1/plex-infra/Downloads/]
    end
    
    %% Network Flow
    USER -->|Stream Media| PLEX
    USER -->|Request Content| JELLYSEERR
    USER -->|Manage| SONARR
    USER -->|Manage| RADARR
    USER -->|Monitor| QBT
    
    %% Arr Stack Communication
    JELLYSEERR -->|Request Movies| RADARR
    JELLYSEERR -->|Request TV| SONARR
    SONARR -->|Search Indexers| PROWLARR
    RADARR -->|Search Indexers| PROWLARR
    PROWLARR -->|Find Torrents| INTERNET
    
    %% Download Flow
    SONARR -->|Send Torrent| QBT
    RADARR -->|Send Torrent| QBT
    QBT -.->|Network Container| GLUETUN
    GLUETUN -->|Encrypted VPN| INTERNET
    
    %% Storage Access
    QBT -->|Write Files| DOWNLOADS
    SONARR -->|Organize Files| DOWNLOADS
    SONARR -->|Move Files| MEDIA
    RADARR -->|Organize Files| DOWNLOADS
    RADARR -->|Move Files| MEDIA
    PLEX -->|Read Media| MEDIA
    
    %% Config Persistence
    SONARR -.->|Persist Config| CONFIG
    RADARR -.->|Persist Config| CONFIG
    PROWLARR -.->|Persist Config| CONFIG
    JELLYSEERR -.->|Persist Config| CONFIG
    PLEX -.->|Persist Config| CONFIG
    GLUETUN -.->|Persist Config| CONFIG
    QBT -.->|Persist Config| CONFIG
    
    %% Styling
    classDef vpn fill:#ff6b6b,stroke:#c92a2a,color:#fff
    classDef arr fill:#4dabf7,stroke:#1971c2,color:#fff
    classDef media fill:#51cf66,stroke:#2f9e44,color:#fff
    classDef storage fill:#ffd43b,stroke:#f59f00,color:#000
    classDef user fill:#845ef7,stroke:#5f3dc4,color:#fff
    
    class GLUETUN,QBT vpn
    class PROWLARR,SONARR,RADARR arr
    class PLEX,JELLYSEERR media
    class CONFIG,MEDIA,DOWNLOADS storage
    class USER,INTERNET user
Loading

Architecture Overview

VPN Layer (Red)

  • Gluetun: VPN container providing encrypted tunnel (ProtonVPN)
  • qBittorrent: Download client running in Gluetun's network namespace
    • All torrent traffic is forced through VPN
    • If VPN drops, qBittorrent has no internet access (kill switch)

Media Management - Arr Stack (Blue)

  • Prowlarr: Centralized indexer/tracker management
  • Sonarr: TV show automation and organization
  • Radarr: Movie automation and organization
  • All configured with quality profiles and size limits

Media Access (Green)

  • Jellyseerr: User-facing request interface
  • Plex: Media streaming server (host network for DLNA/Remote Access)

Storage (Yellow)

  • Config: Persistent app configurations
  • Downloads: Temporary download staging area
  • Media: Final organized media library (shared with Plex)

Network Configuration

  • Custom Bridge Network: couch-commander_media-net (172.18.0.0/16)
  • Container Networking: qBittorrent uses Gluetun's network namespace
  • Host Network: Plex uses host network for optimal streaming performance

Security Features

  • ✅ All torrent traffic encrypted via VPN
  • ✅ Kill switch: qBittorrent cannot bypass VPN
  • ✅ Quality & size limits prevent massive downloads
  • ✅ Isolated Docker network for service communication

Data Flow

  1. User requests content via Jellyseerr
  2. Request sent to Sonarr (TV) or Radarr (Movies)
  3. Arr apps query Prowlarr for indexers
  4. Best match sent to qBittorrent (via VPN)
  5. Downloaded to staging area
  6. Arr apps organize and move to media library
  7. Plex scans and makes available for streaming
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment