├── .gitignore ├── README.md ├── docker-compose.yml └── example.env /.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | jellyfin 3 | sonarr 4 | radarr 5 | ombi 6 | deluge 7 | jackett -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [Docker media server](https://github.com/PARC6502/docker-media-server) 2 | 3 | ## Containers 4 | 5 | - Traefik - reverse proxy, I've set it up so all \*.yourdomain domains go to the machine with the media server, then traefik makes it so service_name.yourdomain goes to the right service 6 | - Jellyfin - media server 7 | - Sonnarr - tv downloader 8 | - Radarr - movie downloader 9 | - Ombi - requester for radarr & sonarr 10 | - Deluge - torrent client, required for downloaders to work 11 | - Jackett - Torrent tracker api, required for downloaders to work 12 | 13 | I'm using this setup alongside a DNS server (dnsmasq). The DNS server allows devices inside my network to access the media server through a domain. Some routers will allow you to do this, and it can also be done by pihole/adguard home/other DNS based ad blockers. You can view my DNS server setup [here.](https://github.com/PARC6502/docker-dns-dhcp) 14 | 15 | ## Caveats 16 | 17 | - I'm still doing port mapping, but it's not needed with Traefik, and if your machine is publicly accessible you definitely want to lock down ports (I know nothing about security so if it will be public do your own research) 18 | - Traefik is only accessible by IP `:9090/api/rawdata` 19 | - This is still a new setup so I've not tested it much 20 | 21 | ## Setup 22 | 23 | These instructions all assume that you're on a linux machine that already has docker and docker compose setup. 24 | 25 | After cloning this repo... 26 | 27 | 1. Copy the example.env and give it your own variables 28 | 29 | ```bash 30 | cp example.env .env 31 | nano .env 32 | ``` 33 | 34 | 2. Create the folders needed for the setup, replace the vars with actual directories unless you've put them in the bash environment 35 | 36 | ```bash 37 | mkdir -p jellyfin/config jellyfin/cache sonarr radarr ombi deluge jackett ${DLDIR}/completed ${DLDIR}/incomplete ${MOVIESDIR} ${TVDIR} 38 | ``` 39 | 40 | (I've seen that some people need to change the permissions on the content folder, if you do `chmod -R 0777 content/` should work, although changing folder ownership is probs a better option) 41 | 42 | 3. Setup your DNS so that all \*.yourdomain go to the media server. Your domain doesn't have to be registered since it will only be used internally 43 | 44 | 4. Fire up the docker containers 45 | 46 | ```bash 47 | # Make sure you're running this command from inside the docker-media-server folder and that the .env file is inside the same folder 48 | sudo docker-compose up -d 49 | # The command will take a bit, after it runs you can run the following to check all the containers are running 50 | sudo docker-compose ps 51 | ``` 52 | 53 | If this is all setup correctly visiting your domain or the ip address of your machine should open Heimdall, and `:8112` should open the Deluge web ui 54 | 55 | 5. Setup all the containers 56 | 57 | - Deluge needs to be setup to download to `/downloads/incomplete` and move completed downloads to `/downloads/completed` 58 | - You need to add some torrent trackers to Jackett 59 | - For sonarr and radarr you need to connect them to deluge and to the trackers you set up on Jackett. You may also need to click add movie/add series and setup the path to be `/movies` and `/tv` respectively 60 | - Ombi needs to be connected to sonarr, radarr and jellyfin. You could also set up passwordless login if you're only going to be using it on your network 61 | - IIRC you just need to go through the setup wizard for Jellyfin 62 | - Add links to everything on Heimdall 63 | 64 | ## Updating 65 | 66 | If you've made changes to the docker compose file you'll need to stash them for the git pull to work 67 | 68 | ```bash 69 | git stash 70 | ``` 71 | 72 | ```bash 73 | git pull 74 | sudo docker-compose up -d --force-recreate --build 75 | ``` 76 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | jellyfin: 4 | container_name: jellyfin 5 | image: jellyfin/jellyfin 6 | restart: unless-stopped 7 | ports: 8 | - 8096:8096 9 | volumes: 10 | - ./jellyfin/config:/config 11 | - ./jellyfin/cache:/cache 12 | - "${TVDIR}:/media/tv" 13 | - "${MOVIESDIR}:/media/movies" 14 | - /etc/localtime:/etc/localtime:ro 15 | user: "1000:1000" 16 | labels: 17 | - "traefik.http.routers.jellyfin.rule=Host(`jellyfin.${DOMAIN}`)" 18 | sonarr: 19 | container_name: sonarr 20 | image: linuxserver/sonarr:preview 21 | restart: unless-stopped 22 | ports: 23 | - 8989:8989 24 | environment: 25 | - PUID=${PUID} 26 | - PGID=${PGID} 27 | - TZ=${TZ} 28 | volumes: 29 | - ./sonarr:/config 30 | - ${DLDIR}/completed:/downloads/completed 31 | - ${TVDIR}:/tv 32 | - /etc/localtime:/etc/localtime:ro 33 | depends_on: 34 | - jackett 35 | - deluge 36 | labels: 37 | - "traefik.http.routers.sonarr.rule=Host(`sonarr.${DOMAIN}`)" 38 | radarr: 39 | container_name: radarr 40 | image: linuxserver/radarr 41 | restart: unless-stopped 42 | ports: 43 | - 7878:7878 44 | environment: 45 | - PUID=${PUID} 46 | - PGID=${PGID} 47 | - TZ=${TZ} 48 | volumes: 49 | - ./radarr:/config 50 | - ${DLDIR}/completed:/downloads/completed 51 | - ${MOVIESDIR}:/movies 52 | - /etc/localtime:/etc/localtime:ro 53 | depends_on: 54 | - jackett 55 | - deluge 56 | labels: 57 | - "traefik.http.routers.radarr.rule=Host(`radarr.${DOMAIN}`)" 58 | ombi: 59 | image: linuxserver/ombi 60 | container_name: ombi 61 | restart: unless-stopped 62 | ports: 63 | - 3579:3579 64 | environment: 65 | - PUID=${PUID} 66 | - PGID=${PGID} 67 | volumes: 68 | - ./ombi:/config 69 | - /etc/localtime:/etc/localtime:ro 70 | labels: 71 | - "traefik.http.routers.ombi.rule=Host(`ombi.${DOMAIN}`)" 72 | depends_on: 73 | - radarr 74 | - sonarr 75 | deluge: 76 | image: linuxserver/deluge 77 | container_name: deluge 78 | ports: 79 | - 8112:8112 80 | - 8118:8118 81 | - 58846:58846 82 | - 58946:58946 83 | environment: 84 | - PUID=${PUID} 85 | - PGID=${PGID} 86 | - TZ=Europe/London 87 | volumes: 88 | - ${DLDIR}:/downloads 89 | - ./deluge:/config 90 | - /etc/localtime:/etc/localtime:ro 91 | restart: unless-stopped 92 | labels: 93 | - "traefik.http.routers.deluge.rule=Host(`deluge.${DOMAIN}`)" 94 | jackett: 95 | image: linuxserver/jackett 96 | container_name: jackett 97 | restart: unless-stopped 98 | ports: 99 | - 9117:9117 100 | environment: 101 | - PUID=${PUID} 102 | - PGID=${PGID} 103 | volumes: 104 | - ./jackett:/config 105 | - ${DLDIR}/completed:/downloads 106 | - /etc/localtime:/etc/localtime:ro 107 | labels: 108 | - "traefik.http.routers.jackett.rule=Host(`jackett.${DOMAIN}`)" 109 | heimdall: 110 | image: linuxserver/heimdall 111 | container_name: heimdall 112 | environment: 113 | - PUID=${PUID} 114 | - PGID=${PGID} 115 | - TZ=Europe/London 116 | volumes: 117 | - ./heimdall:/config 118 | ports: 119 | - "8888:80" 120 | restart: unless-stopped 121 | labels: 122 | - "traefik.http.routers.heimdall.rule=Host(`${DOMAIN}`,`${IP}`)" 123 | traefik: 124 | image: traefik:v2.0 # The official v2.0 Traefik docker image 125 | container_name: traefik 126 | command: --api --providers.docker # Enables the web UI and tells Traefik to listen to docker 127 | ports: 128 | - "80:80" # The HTTP port 129 | - "9090:8080" # The Web UI (enabled by --api) 130 | volumes: 131 | - /var/run/docker.sock:/var/run/docker.sock # So that Traefik can listen to the Docker events 132 | 133 | -------------------------------------------------------------------------------- /example.env: -------------------------------------------------------------------------------- 1 | DOMAIN=example.com 2 | IP=192.168.1.2 3 | DLDIR=/home/user/content/downloads 4 | TVDIR=/home/user/content/tv 5 | MOVIESDIR=/home/user/content/movies 6 | PUID=1000 7 | PGID=1000 8 | TZ=Europe/London --------------------------------------------------------------------------------