Table of Contents

Systems - Media Server - Install Docker

Docker will be installed, together with some useful media-related docker containers, including:


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

docker-media.env
# 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

docker-compose.yml
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.

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


Configure the Sonarr service


Configure the Radarr service


Configure the Lidarr service


Configure the Readarr service


Configure the Homarr service


Configure the JellyFin service

/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.


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