====== Systems - Media Server - Install Docker ====== Docker will be installed, together with some useful media-related docker containers, including: * **Prowlarr** is an indexer manager, offering complete management of indexers with no per app Indexer setup required. * **Sonarr** manages TV shows. * **Radarr** manages Movies. * **Whisparr** manages adult videos. * **Readarr** manages Books (ebooks and audiobooks). * **Bazarr** manages Subtitles. * **Sabnzbd** manages NZB files. * **qBitTorrent** manages Torrents. * **JellyFin** Streams media. ---- ===== Install Docker ===== sudo apt install docker.io docker-compose -y ---- ===== Create a Media Directory ===== mkdir /media ---- ===== Change ownership of the Media Directory ===== chown -R 1000:1000 /media **NOTE:** The 1000:1000 is usually the first user created on the system. * Check the contents of **/etc/passwd** and **/etc/group** files. * This should show the user associated with UID 1000 and GID 1000. * Alternatively, check which UID and GID is associated with 1000:1000 by running: id 1000 ---- ===== Create an environment file ===== # Main path for all MEDIA apps: MEDIAPATH=/media/ # Global Variables PUID=1000 PGID=1000 TZ=Europe/London **NOTE:** Ensure the UID and GID point to the same user as before. ---- ===== Create a Docker Compose file ===== services: # # PROWLARR # prowlarr: image: linuxserver/prowlarr:latest container_name: prowlarr hostname: prowlarr volumes: - ${MEDIAPATH}Prowlarr/config:/config - ${MEDIAPATH}Prowlarr/backup:/data/Backup - ${MEDIAPATH}Downloads:/downloads ports: - 9696:9696 restart: unless-stopped env_file: - 'docker-media.env' # # SONARR # sonarr: image: linuxserver/sonarr:latest container_name: sonarr hostname: sonarr volumes: - ${MEDIAPATH}Sonarr/config:/config - ${MEDIAPATH}Sonarr/backup:/data/Backup - ${MEDIAPATH}Sonarr/tvshows:/data/tvshows - ${MEDIAPATH}Downloads:/downloads ports: - 8989:8989 restart: unless-stopped env_file: - 'docker-media.env' # # RADARR # radarr: image: linuxserver/radarr:latest container_name: radarr hostname: radarr volumes: - ${MEDIAPATH}Radarr/config:/config - ${MEDIAPATH}Radarr/movies:/data/movies - ${MEDIAPATH}Radarr/backup:/data/Backup - ${MEDIAPATH}Downloads:/downloads ports: - 7878:7878 restart: unless-stopped env_file: - 'docker-media.env' # # LIDARR # lidarr: image: linuxserver/lidarr:latest container_name: lidarr hostname: lidarr volumes: - ${MEDIAPATH}Lidarr/config:/config - ${MEDIAPATH}Lidarr/music:/data/musicfolder - ${MEDIAPATH}Downloads:/downloads ports: - 8686:8686 restart: unless-stopped env_file: - 'docker-media.env' # # READARR # readarr: image: linuxserver/readarr:develop container_name: readarr hostname: readarr volumes: - ${MEDIAPATH}Readarr/config:/config - ${MEDIAPATH}Readarr/books:/data/books - ${MEDIAPATH}Downloads:/downloads ports: - 8787:8787 restart: unless-stopped env_file: - 'docker-media.env' # # HOMARR # homarr: container_name: homarr image: ghcr.io/ajnart/homarr:latest restart: unless-stopped volumes: - ${MEDIAPATH}Homarr/configs:/app/data/configs - ${MEDIAPATH}Homarr/icons:/app/public/icons - ${MEDIAPATH}Homarr/data:/data ports: - '7575:7575' env_file: - 'docker-media.env' # # BAZARR # bazarr: image: lscr.io/linuxserver/bazarr:latest container_name: bazarr network_mode: "service:gluetun" volumes: - ${MEDIAPATH}bazarr/config:/config - ${MEDIAPATH}radarr/movies:/movies #optional - ${MEDIAPATH}sonarr/tvseries:/tv #optional restart: unless-stopped env_file: - 'docker-media.env' # # JELLYFIN # jellyfin: image: linuxserver/jellyfin container_name: jellyfin ports: - '8096:8096/tcp' # Jellyfin web interface - '7359:7359/udp' # Network discovery - '1900:1900/udp' # DLNA port volumes: - ${MEDIAPATH}Jellyfin/config:/config - ${MEDIAPATH}Radarr/movies:/data/Movies - ${MEDIAPATH}Sonarr/tvshows:/data/TVShows - ${MEDIAPATH}Lidarr/music:/data/Music - ${MEDIAPATH}Readarr/books:/data/Books env_file: - 'docker-media.env' restart: unless-stopped # # QBITTORRENT # qbittorrent: image: linuxserver/qbittorrent:latest container_name: qbittorrent hostname: qbittorrent restart: unless-stopped labels: - "com.centurylinklabs.watchtower.enable=false" volumes: - ${MEDIAPATH}qbittorrent/config:/config - ${MEDIAPATH}Downloads:/downloads ports: - 8080:8080 - 6881:6881 - 6881:6881/udp environment: - WEBUI_PORT=8080 - TORRENTING_PORT=6881 healthcheck: start_period: 15s env_file: - 'docker-media.env' ---- ===== Change ownership of the Media directory ===== chown -R 1000:1000 /media **NOTE:** This is the directory specified in the **docker-media.env** file. * Use the UID (user id) and GID (group id) configured in the **docker-media.env** file. ---- ===== Do an initial run ===== sudo docker-compose up -d **NOTE:** Ensure the command is run within the directory that contains the docker-compose and environment files. * This may take a long time the first time this is run. To stop and remove the docker containers: sudo docker-compose stop sudo docker-compose rm ---- ===== Configure qBittorrent service ===== ==== Ascertain the initial temporary password ==== qBittorrent will initially be using a temporary password only. * To ascertain what this temporary password is, check the logs for the qbittorrent container. sudo docker logs qbittorrent returns: ... The WebUI administrator username is: admin The WebUI administrator password was not set. A temporary password is provided for this session: blahblah ... ---- ==== Log into qbittorrent ==== Visit http://localhost:8080 and log on using the details provided in the container logs. ---- ==== Set a permanent password ==== Navigate to **Tools -> Options -> WebUI -> change the user and password** and check **bypass authentication for clients on localhost**. ---- ===== Configure the Prowlarr service ===== * Visit http://localhost:9696. * Navigate to **Settings -> Download Clients -> + symbol -> Add download client**. * Choose qBittorrent. * Enter the port number matching the WebUI in docker-compose for qBittorrent (default is 8080), with the Username and Password that you configured for qBittorrent in the previous step. * Host - This may need to be changed from **localhost** to the IP address of the host machine. * To check what the IP Address is on the host system run: ip address * Return to the 'qbittorrent' URL. * Click the **Test** button at the bottom to make sure you get a green **tick**. * Click **Save**. ---- ===== Configure the Sonarr service ===== * Visit http://localhost:8989. * Navigate to **Settings -> Media Management -> Add Root Folder**, and set the root folder to what it is on the right side of the colon in the **volume** config line for Sonarr. * In the docker-compose file it is {MEDIAPATH}Sonarr/tvshows:/data/tvshows * Therefore, set **/data/tvshows** as the root directory. * Navigate to **Settings -> Download Clients**, and click the **+ symbol**. * Choose qBittorrent and repeat the steps from Prowlarr. * Navigate to **Settings -> General**, and scroll down to the **API key**. * Copy this key, and then go to **Prowlarr -> Settings -> Apps**, and click the **+ - Sonarr**, and paste the API key. * The host might also have to be changed from **localhost** to IP address of the Host. * Click the **Test** button, near the bottom, to see if a green 'tick' is shown. * Navigate to **Settings -> General**, and switch to **show advanced** in top left corner. * Scroll down to **Backups** and choose **/data/Backup** (or whatever location is in the docker compose file for Sonarr backups. * This is currently ${MEDIAPATH}Sonarr/backup:/data/Backup, hence we set **/data/Backup**, as that is on the right side of the colon. ---- ===== Configure the Radarr service ===== * Visit http://localhost:7878 * Navigate to **Settings -> Media Management -> Add Root Folder**, and set **/data/movies** as the root folder * Navigate to **Settings -> Download clients**, and click the **'+'** symbol, choose qBittorrent etc. - basically same steps as for Sonarr * Navigate to **Settings -> General**, and scroll down to the API key. * Copy the API key. * Navigate to Prowlarr, and same way as in sonarr. * Navigate to **Settings -> General**, switch to **show advanced** -> Backups, and choose **/data/Backup** directory. ---- ===== Configure the Lidarr service ===== * Visit http://localhost:8686 * Follow the same steps as for the above applications. ---- ===== Configure the Readarr service ===== * Visit http://localhost:8787 * Follow the same steps as for the above applications. ---- ===== Configure the Homarr service ===== * Visit http://localhost:7575 * Return to Prowlarr and click **Indexers** at the top right. * Click **Add indexer**, and search for preferred indexes. * Good indexes include **rarbg** and **yts**, but try others... * Test and Save. * Click **Sync App Indexers** icon (next to **Add indexer**). * Navigate to **Settings -> Apps** and this should show in green **Full sync** next to each application. ---- ===== Configure the JellyFin service ===== * Visit http://localhost:8096 * Add media library in Jellyfin matching folders configured in the **docker-compose.yml** file, so in Jellyfin you should see them as: /data/Movies /data/TVShows /data/Music /data/Books **NOTE:** These locations should match the right side of the config in the Jellyfin **volume** configuration. If the volume configuration looks like this: volumes: - ${MEDIAPATH}Radarr/movies:/data/Movies - ${MEDIAPATH}Sonarr/tvshows:/data/TVShows - ${MEDIAPATH}Lidarr/music:/data/Music - ${MEDIAPATH}Readarr/books:/data/Books then on the container match the right side from the colon, e.g. /data/Movies, /data/TVShows etc. ---- ===== Configuration is complete ===== All docker contains are configured. ---- ===== Add Movies or TV to download ===== Add any media, such as Movies in radarr or TV Shows in sonarr etc., and click **search all** or **search monitored**, which will trigger the download process. * Check QBitTorrent which should show the downloading... ---- ===== References ===== https://wiki.servarr.com/docker-guide https://prowlarr.com/ https://docs.linuxserver.io/images/docker-prowlarr/ https://discord.sonarr.tv/ https://radarr.video/discord http://reddit.com/r/sonarr http://reddit.com/r/radarr