bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/plex.sh)"
echo "mp0: /mnt/pve/Synology/,mp=/shared" > /etc/pve/lxc/<LXC_NUMBER>.conf
Memory => 1 Gib
Swap => 512 Mib
Cores => 2 (Could probably be reduced to 1)
Root disk => 8G (Could probably be reduced to 6G)
Unprivileged container => No
Downloaders:
- Transmission: torrent downloader with a web UI
- Deluge: torrent downloader with a web UI
- NZBGet: usenet downloader with a web UI
- Jackett: API to search torrents from multiple indexers
- Bazarr: A companion tool for Radarr and Sonarr which will automatically pull subtitles for all of your TV and movie downloads.
Download orchestration:
- Sonarr: manage TV show, automatic downloads, sort & rename
- Radarr: basically the same as Sonarr, but for movies
- Bazarr: manage TV show and movies subtitles
VPN:
The idea is to set up all these components as Docker containers in a docker-compose.yml
file.
We'll reuse community-maintained images (special thanks to linuxserver.io for many of them).
I'm assuming you have some basic knowledge of Linux and Docker.
A general-purpose docker-compose
file is maintained in this repo here.
The stack is not really plug-and-play. You'll see that manual human configuration is required for most of these tools. Configuration is not fully automated (yet?), but is persisted on reboot. Some steps also depend on external accounts that you need to set up yourself (usenet indexers, torrent indexers, vpn server, plex account, etc.). We'll walk through it.
Optional steps described below that you may wish to skip:
- Using a VPN server for Transmission and/or Deluge incoming/outgoing traffic.
- Using newsgroups (Usenet): you can skip NZBGet installation and all related Sonarr/Radarr indexers configuration if you wish to use bittorrent only.
Instead of editing the docker-compose file to hardcode these values in, we'll instead put these values in a .env file. A .env file is a file for storing environment variables that can later be accessed in a general-purpose docker-compose.yml file, like the example one in this repository.
Here is an example of what your .env
file should look like, use values that fit for your own setup.
SQLlite use by sonarr and radarr doesn't like to be on a network folder so I separated the config folders env variable to keep them in the Pi.
Env variables will only be used by Yacht, the rest will be configured directly on Yacht web UI.
# Your timezone, https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
TZ=America/Los_Angeles
# UNIX PUID and PGID, find with: id $USER
PUID=1000
PGID=1000
# Local network mask, find with: ip route | awk '!/ (docker0|br-)/ && /src/ {print $1}'
NETWORK=192.168.0.0/24
# The directory where data will be stored.
ROOT=/media
# The directory where configuration will be stored.
CONFIG=/config
#NordVPN informations
[email protected]
VPN_PASSWORD=password
VPN_COUNTRY=CA
This is the instructions for a Synology but should be pretty much the same for any NAS.
TODO
We'll use Transmission Docker image from linuxserver, which runs both the Transmission daemon and web UI in a single container.
If you prefere Deluge just comment those lines in docker-compose.yml
transmission:
image: linuxserver/transmission:latest
container_name: transmission
restart: unless-stopped
network_mode: service:vpn # run on the vpn network
environment:
- PUID=${PUID} # default user id, defined in .env
- PGID=${PGID} # default group id, defined in .env
- TZ=${TZ} # timezone, defined in .env
volumes:
- ${ROOT}/downloads:/downloads # downloads folder
- ${CONFIG}/config/transmission:/config # config files
Things to notice:
- I use the host network to simplify configuration. Important ports are
9091
(web UI) and51413
(bittorrent daemon).
Then run the container with docker-compose up -d
.
To follow container logs, run docker-compose logs -f transmission
.
instruction not updated for transmission but should be pretty much the same
You should be able to login on the web UI (localhost:9091
, replace localhost
by your machine ip if needed).
The default password is admin
. You are asked to modify it, I chose to set an empty one since transmission won't be accessible from outside my local network.
The running deluge daemon should be automatically detected and appear as online, you can connect to it.
You may want to change the download directory. I like to have to distinct directories for incomplete (ongoing) downloads, and complete (finished) ones. Also, I set up a blackhole directory: every torrent file in there will be downloaded automatically. This is useful for Jackett manual searches.
You should activate autoadd
in the plugins section: it adds supports for .magnet
files.
You can also tweak queue settings, defaults are fairly small. Also you can decide to stop seeding after a certain ratio is reached. That will be useful for Sonarr, since Sonarr can only remove finished downloads from deluge when the torrent has stopped seeding. Setting a very low ratio is not very fair though !
Configuration gets stored automatically in your mounted volume (${ROOT}/config/transmission
) to be re-used at container restart. Important files in there:
auth
contains your login/passwordcore.conf
contains your deluge configuration
You can use the Web UI manually to download any torrent from a .torrent file or magnet hash.
You should also add a blacklist for extra protection
We'll use Deluge Docker image from linuxserver, which runs both the Deluge daemon and web UI in a single container.
If you prefere Transmission just comment those lines in docker-compose.yml
deluge:
container_name: deluge
image: linuxserver/deluge:latest
restart: unless-stopped
network_mode: service:vpn # run on the vpn network
environment:
- PUID=${PUID} # default user id, defined in .env
- PGID=${PGID} # default group id, defined in .env
- TZ=${TZ} # timezone, defined in .env
volumes:
- ${ROOT}/downloads:/downloads # downloads folder
- ${CONFIG}/config/deluge:/config # config files
Things to notice:
- I use the host network to simplify configuration. Important ports are
8112
(web UI).
Then run the container with docker-compose up -d
.
To follow container logs, run docker-compose logs -f deluge
.
The goal here is to have an NordVPN Client container running and always connected. We'll make Transmission and/or Deluge incoming and outgoing traffic go through this NordVPN container.
This must come up with some safety features:
- VPN connection should be restarted if not responsive
- Traffic should be allowed through the VPN tunnel only, no leaky outgoing connection if the VPN is down
- Transmission Web UI should still be reachable from the local network
Put it in the docker-compose file, and make transmissionand/or Deluge use the vpn container network:
vpn:
container_name: vpn
image: bubuntux/nordvpn:latest
cap_add:
- net_admin # required to modify network interfaces
restart: unless-stopped
devices:
- /dev/net/tun
environment:
- USER=${VPN_USER} # vpn user, defined in .env
- PASS=${VPN_PASSWORD} # vpn password, defined in .env
- COUNTRY=${VPN_COUNTRY} # vpn country, defined in .env
- NETWORK=${NETWORK} # local network mask, defined in .env
- PROTOCOL=UDP
- CATEGORY=P2P
- OPENVPN_OPTS=--pull-filter ignore "ping-restart" --ping-exit 180
- TZ=${TZ} # timezone, defined in .env
ports:
- 9091:9091 # Transmission web UI
- 51413:51413 # Transmission bittorrent daemon
- 51413:51413/udp # Transmission bittorrent daemon
- 8112:8112 # port for deluge web UI to be reachable from local network
transmission:
image: linuxserver/transmission:latest
container_name: transmission
restart: unless-stopped
network_mode: service:vpn # run on the vpn network
environment:
- PUID=${PUID} # default user id, defined in .env
- PGID=${PGID} # default group id, defined in .env
- TZ=${TZ} # timezone, defined in .env
volumes:
- ${ROOT}/downloads:/downloads # downloads folder
- ${CONFIG}/config/transmission:/config # config files
deluge:
container_name: deluge
image: linuxserver/deluge:latest
restart: unless-stopped
network_mode: service:vpn # run on the vpn network
environment:
- PUID=${PUID} # default user id, defined in .env
- PGID=${PGID} # default group id, defined in .env
- TZ=${TZ} # timezone, defined in .env
volumes:
- ${ROOT}/downloads:/downloads # downloads folder
- ${CONFIG}/config/deluge:/config # config files
Notice how transmission and/or Deluge is now using the vpn container network, with Transmission and/or Deluge web UI port exposed on the vpn container for local network access.
You can check that Transmission and/or Deluge is properly going out through the VPN IP by using torguard check. Get the torrent magnet link there, put it in Transmission and/or Deluge, wait a bit, then you should see your outgoing torrent IP on the website.
- 1337x
- cpasbien (always failed)
- RARBG
- The Pirate Bay
- LimeTorrents
- Torrent9
- Torrentz2
- Settings => Media Management => Import Extra Files
- Settings => Media Management => Import Extra Files
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker rmi $(docker images -q)
docker logs --tail 50 --follow --timestamps transmission
docker exec -ti vpn bash
curl ifconfig.me
wget ifconfig.me
ncdu # excellent command-line disk usage analyser
df -h
- Transmission seed config back to default after restart (seem to works now but not for
enable blocklist
) - Transmission put completed download inside
complete/admin/torrent-folder-name
- For
fstab
what's diff withauto,_netdev,nofaill