diff --git a/README.md b/README.md index 8a28d21..69ee3e0 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,43 @@ -# Install radarr. sonarr, transmission, jackett and jellyfin +# Install media stack -- Change transmission password in docker-compose.yml file -- Run below commands +There are two media stacks available. + +`stack-1` This stack contains Jellyfin, Radarr, Sonarr, Jackett and Transmission. + +`stack-2` This stack contains Jellyfin, Radarr, Sonarr, Prowlarr, qBitTorrent and VPN. + +Any one of them can be deployed using --profile option with docker-compose. ``` -bash pre-deploy.sh -docker-compose up -d -docker-compose -f docker-compose-nginx.yml up -d # OPTIONAL -bash post-deploy.sh +docker network create mynetwork + +# Install Jellyfin, Radarr, Sonarr, Jackett and Transmission stack +docker-compose --profile stack-1 up -d + +# Or, Install Jellyfin, Radarr, Sonarr, Prowlarr, qBitTorrent and VPN stack +## By default NordVPN is configured. This can be changed to ExpressVPN, SurfShark, OpenVPN or Wireguard VPN by updating docker-compose.yml file. It uses OpenVPN type for all providers. +VPN_SERVICE_PROVIDER=nordvpn OPENVPN_USER=openvpn-username OPENVPN_PASSWORD=openvpn-password SERVER_REGIONS=Switzerland docker-compose --profile stack-2 up -d + +docker-compose -f docker-compose-nginx.yml up -d # OPTIONAL to use Nginx as reverse proxy +``` + +# Configure Transmission / qBittorrent + +For qBitTorrent, + +- Open qBitTorrent at http://localhost:5080. Default username:password is admin:adminadmin +- Go to Tools --> Options --> WebUI --> Change password + +For qBiTorrent / Transmission + +- From backend, Run below commands + +``` +# docker exec -it transmission bash # Get inside transmission container, OR +docker exec -it qbittorrent bash # Get inside qBittorrent container + +mkdir /downloads/movies /downloads/tvshows +chown 1000:1000 /downloads/movies /downloads/tvshows ``` # Add indexer to Jackett @@ -23,7 +53,7 @@ bash post-deploy.sh - Settings --> Media Management --> Check mark "Movies deleted from disk are automatically unmonitored in Radarr" under File management section --> Save - Settings --> Indexers --> Add --> Add Rarbg indexer --> Add minimum seeder (4) --> Test --> Save - Settings --> Indexers --> Add --> Torznab --> Follow steps from Jackett to add indexer -- Settings --> Download clients --> Transmission --> Add Host (transmission) and port (9091) --> Username and password if added --> Test --> Save +- Settings --> Download clients --> Transmission --> Add Host (transmission / qbittorrent) and port (9091 / 5080) --> Username and password if added --> Test --> Save **Note: If VPN is enabled, then transmission / qbittorrent is reachable on vpn's service name** - Settings --> General --> Enable advance setting --> Select AUthentication and add username and password # Add a movie @@ -41,6 +71,14 @@ bash post-deploy.sh - Add admin password +# Configure Prowlarr + +- Open Prowlarr at http://localhost:9696 +- Settings --> General --> Authentications --> Select AUthentication and add username and password +- Add Indexers, Indexers --> Add Indexer --> Search for indexer --> Choose base URL --> Test and Save +- Add application, Settings --> Apps --> Add application --> Choose Sonarr or Radarr or any apps to link --> Prowlarr server (http://localhost:9696) --> Radarr server (http://localhost:7878) --> API Key --> Test and Save +- This will add indexers in respective apps automatically. + # Apply SSL in Nginx - Open port 80 and 443. @@ -96,6 +134,25 @@ location /radarr { } ``` +# Prowlarr Nginx reverse proxy + +- Settings --> General --> URL Base --> Add base (/prowlarr) +- Add below proxy in nginx configuration + +This may need to change configurations in indexers and base in URL. + +``` +location /prowlarr { + proxy_pass http://prowlarr:9696; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $http_connection; + } +``` + - Restart containers. # Jackett Nginx reverse proxy @@ -153,6 +210,24 @@ location ^~ /transmission { } ``` +**Note: If VPN is enabled, then transmission is reachable on vpn's service name** + +# qBittorrent Nginx proxy + +``` +location /qbt/ { + proxy_pass http://qbittorrent:5080/; + proxy_http_version 1.1; + + proxy_set_header Host http://qbittorrent:5080; + proxy_set_header X-Forwarded-Host $http_host; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_cookie_path / "/; Secure"; +} +``` + +**Note: If VPN is enabled, then qbittorrent is reachable on vpn's service name** + # Jellyfin Nginx proxy - Add base URL, Admin Dashboard -> Networking -> Base URL (/jellyfin) diff --git a/docker-compose.yml b/docker-compose.yml index 118f98f..ba271be 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,28 +1,106 @@ -version: '2' +version: "3.9" name: media-stack services: + vpn: + ## Read https://github.com/qdm12/gluetun/wiki for details on configuring VPN for different service providers. + profiles: ["vpn", "stack-2"] + container_name: vpn + image: qmcgaw/gluetun + cap_add: + - NET_ADMIN + environment: + - VPN_SERVICE_PROVIDER=${VPN_SERVICE_PROVIDER:-nordvpn} # Valid values: nordvpn, expressvpn, protonvpn, surfshark or custom + - OPENVPN_USER=${OPENVPN_USER?"OPENVPN_USER variable must be set"} + - OPENVPN_PASSWORD=${OPENVPN_PASSWORD?"OPENVPN_PASSWORD variable must be set"} + + ## For list of server regions and countries, visit https://raw.githubusercontent.com/qdm12/gluetun/master/internal/storage/servers.json + + ## SERVER_REGIONS is required for NordVPN and Surfshark VPN. Comment SERVER_COUNTRIES if SERVER_REGIONS is used. + - SERVER_REGIONS=${SERVER_REGIONS:-Switzerland} + + ## SERVER_COUNTRIES is required for ExpressVPN and ProtonVPN. Comment SERVER_REGIONS if SERVER_COUNTRIES is used. + # - SERVER_COUNTRIES=${SERVER_COUNTRIES:-Netherlands} + + ## Enable below if VPN_SERVICE_PROVIDER=custom + # - VPN_TYPE=openvpn # or wiregiuard. + + ## If VPN_TYPE is openvpn + # - OPENVPN_CUSTOM_CONFIG=/gluetun/custom.conf + + ## If VPN_TYPE is wireguard. Replace below env variables as required. + # - VPN_ENDPOINT_IP=1.2.3.4 # Replace with your wg endpoint ip or domain + # - VPN_ENDPOINT_PORT=51820 # Replace with wg server port + # - WIREGUARD_PUBLIC_KEY=wAUaJMhAq3NFutLHIdF8AN0B5WG8RndfQKLPTEDHal0= # Replace with your wg public key + # - WIREGUARD_PRIVATE_KEY=wOEI9rqqbDwnN8/Bpp22sVz48T71vJ4fYmFWujulwUU= # Replace with your wg client private key + # - WIREGUARD_PRESHARED_KEY=xOEI9rqqbDwnN8/Bpp22sVz48T71vJ4fYmFWujulwUU= # Replaced with your wg pre-shared key + # - WIREGUARD_ADDRESSES="10.64.222.21/32" # Replace with wg address + + ## Enable volume if custom VPN_SERVICE_PROVIDER is used + # volumes: + # - /yourpath/yourconfig.conf:/gluetun/config.conf:ro + + networks: + - mynetwork + ports: + # qbittorrent ports + - 5080:5080 + - 6881:6881 + - 6881:6881/udp + # Transmission ports + - 9091:9091 + - 51413:51413 + - 51413:51413/udp transmission: + profiles: ["tx", "stack-1"] container_name: transmission image: lscr.io/linuxserver/transmission:3.00-r5-ls127 networks: - mynetwork + network_mode: service:vpn # Comment this line if vpn is disabled environment: - PUID=1000 - PGID=1000 - TZ=UTC - USER=admin - PASS=nimdatx - ports: - - 9091:9091 - - 51413:51413 - - 51413:51413/udp + + ## Uncomment below ports if VPN is disabled. + # ports: + # - 9091:9091 + # - 51413:51413 + # - 51413:51413/udp volumes: - tx-config:/config - - tx-downloads:/downloads + - torrent-downloads:/downloads - tx-watch:/watch restart: "unless-stopped" + ## Default credentials - Username: admin password: adminadmin ## + ## Change password after install from UI --> Tools --> Options --> WebUI ## + qbittorrent: + container_name: qbittorrent + profiles: ["qbt", "stack-2"] + image: lscr.io/linuxserver/qbittorrent:4.4.3.1-r1-ls209 + networks: + - mynetwork + network_mode: service:vpn # Comment this line if vpn is disabled + environment: + - PUID=1000 + - PGID=1000 + - TZ=UTC + - WEBUI_PORT=5080 + volumes: + - qbittorrent-config:/config + - torrent-downloads:/downloads + + ## Uncomment below ports if VPN is disabled. + # ports: + # - 5080:5080 + # - 6881:6881 + # - 6881:6881/udp + restart: "unless-stopped" radarr: + profiles: ["base", "radarr", "stack-1", "stack-2"] container_name: radarr image: lscr.io/linuxserver/radarr:4.1.0.6175-ls146 networks: @@ -35,10 +113,11 @@ services: - 7878:7878 volumes: - radarr-config:/config - - tx-downloads:/downloads + - torrent-downloads:/downloads restart: "unless-stopped" sonarr: + profiles: ["base", "sonarr", "stack-1", "stack-2"] image: lscr.io/linuxserver/sonarr:3.0.8.1507-ls150 container_name: sonarr networks: @@ -49,12 +128,13 @@ services: - TZ=UTC volumes: - sonarr-config:/config - - tx-downloads:/downloads #optional + - torrent-downloads:/downloads ports: - 8989:8989 restart: unless-stopped jackett: + profiles: ["jackett", "stack-1"] container_name: jackett image: lscr.io/linuxserver/jackett:v0.20.1426-ls74 networks: @@ -70,7 +150,24 @@ services: - 9117:9117 restart: unless-stopped + prowlarr: + profiles: ["prowlarr", "stack-2"] + container_name: prowlarr + image: linuxserver/prowlarr:develop-0.4.3.1921-ls62 + networks: + - mynetwork + environment: + - PUID=1000 + - PGID=1000 + - TZ=UTC + volumes: + - prowlarr-config:/config + ports: + - 9696:9696 + restart: unless-stopped + jellyfin: + profiles: ["base", "jelly", "stack-1", "stack-2"] image: lscr.io/linuxserver/jellyfin:10.8.1-1-ls171 container_name: jellyfin networks: @@ -81,24 +178,26 @@ services: - TZ=UTC volumes: - jellyfin-config:/config - - tx-downloads:/data + - torrent-downloads:/data # devices: # - /dev/videoN:/dev/videoN # Mount GPU device ports: - 8096:8096 - - 7359:7359/udp #optional + - 7359:7359/udp - 8920:8920 restart: unless-stopped volumes: - tx-config: - tx-downloads: - tx-watch: + torrent-downloads: radarr-config: sonarr-config: jackett-config: jackett-blackhole: + prowlarr-config: jellyfin-config: + qbittorrent-config: + tx-config: + tx-watch: networks: mynetwork: diff --git a/post-deploy.sh b/post-deploy.sh deleted file mode 100755 index 509373f..0000000 --- a/post-deploy.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -docker exec -it transmission mkdir -p /downloads/movies -docker exec -it transmission chown -R 1000:1000 /downloads/movies - -docker exec -it transmission mkdir -p /downloads/tvshows -docker exec -it transmission chown -R 1000:1000 /downloads/tvshows \ No newline at end of file diff --git a/pre-deploy.sh b/pre-deploy.sh deleted file mode 100644 index 861d461..0000000 --- a/pre-deploy.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -docker network ls | grep -i mynetwork || docker network create mynetwork # Create network if not already exist \ No newline at end of file