This is an automated archive made by the Lemmit Bot.
The original was posted on /r/piracy by /u/ZachM05 on 2024-09-03 19:06:01+00:00.
I was in search of a fun project to do with my home server that would streamline my torrent process, and realized that most things that I would need are containerized, meaning it could be easily be implemented into other systems. I decided to create this guide in hopes that it would help out someone else in the future, let me know if you guys try it, and if there are any steps missing.
Here are the things you’ll need:
- A machine that you would like to use as the host
- Docker installed on that machine (Windows/Mac/Linux)
- Some type of OpenVPN-enabled VPN account
- Visual Studio Code - Optional if you know Docker CLI, but super useful for managing docker containers
Here are the 3 main containers that you will need to use:
- Gluetun - VPN
- QBitTorrent - Torrent Client
- Jackett - Easy Search Plugin for QBitTorrent
Step 1: Create a Project Directory
- Open a terminal.
- Create a new directory for your project:mkdir torrent cd torrent
Step 2: Create the Docker Compose File
- In the
torrent
directory, create adocker-compose.yml
file:touch docker-compose.yml - Open the file with your preferred text editor and add the following content:
services:
gluetun:
image: qmcgaw/gluetun
container_name: gluetun
restart: unless-stopped
devices:
- /dev/net/tun:/dev/net/tun
ports:
- 8888:8888/tcp
- 8388:8388/tcp
- 8388:8388/udp
- 8080:8080
- 6881:6881/tcp
- 6881:6881/udp
- 9117:9117
volumes:
- ./gluetun:/gluetun
cap_add:
- NET_ADMIN
environment:
- VPN_SERVICE_PROVIDER=[OPENVPN_PROVIDER]
- OPENVPN_USER=[OPENVPN_USERNAME]
- OPENVPN_PASSWORD=[OPENVPN_PASSWORD]
- SERVER_COUNTRIES=USA
qbittorrent:
image: wernight/qbittorrent
restart: unless-stopped
container_name: qbittorrent
volumes:
- ./config:/config
- ./torrents:/torrents
- ./downloads:/downloads
- ./videos:/videos
- ./plugins:/plugins
network_mode: service:gluetun
user: "${UID}:${GID}"
depends_on:
jackett:
condition: service_started
restart: true
jackett:
image: linuxserver/jackett
container_name: jackett
environment:
- PUID=1000
- PGID=1000
- AUTO_UPDATE=true
volumes:
- ./jackett/data:/config
network_mode: service:gluetun
restart: unless-stopped
depends_on:
gluetun:
condition: service_started
restart: true
- Replace
[OPENVPN_PROVIDER]
,[OPENVPN_USERNAME]
and[OPENVPN_PASSWORD]
with your actual OpenVPN credentials.
Step 3: Bring Up the Docker Containers
- From within the
torrent
directory, run the following command to start the services:
docker-compose up -d
- The
-d
flag runs the containers in detached mode, meaning they will run in the background.
Step 4: Configure qBittorrent Login
- Access the qBittorrent web interface by opening a web browser and navigating to
http://localhost:8080
. - The default username is
admin
and the password is randomized on initial install. The easiest way I’ve found to retrieve the password without leaving VSCode is to go to theDocker
extension tab, click on thetorrent
stack, right-clickwernight/qbittorrent
, then selectView Logs
. You should see the temporary password on the screen: `The WebUI administrator password was not set. A temporary password is provided for this session: XYZ - You can change the password in the Web UI by clicking
Tools
>Options
>Web UI
>Authentication
section. Enter the new password, scroll down, and pressSave
.
Step 5: Configure Jackett qBitTorrent Plugin
- Access the qBittorrent web interface by opening a web browser and navigating to
http://localhost:8080
. - In a separate tab, navigate to this Github page and grab the latest Jackett plugin url.
- At the time of writing, it is
https://raw.githubusercontent.com/qbittorrent/search-plugins/master/nova3/engines/jackett.py
- At the time of writing, it is
- On the qBitTorrent web interface, click the
Search
tab in the top right >Search plugins...
in the bottom right >Install new plugin
, then paste the copied link from step 2 in this field. PressOk
and it should successfully install the plugin. - Access the Jackett web interface by opening a web browser and navigating to
http://localhost:9117
. - In the top right, you should see an API Key, copy that to your clipboard.
- In your project root, navigate to
torrents/nova3/engines/jackett.json
, and paste the API Key underapi_key
, and save the file.
Step 6: Configure Jackett
- Access the Jackett web interface by opening a web browser and navigating to
http://localhost:9117
. - Set up an
Admin password
underJackett Configuration
, just to further secure the site. - At the top of the page, select
Add Indexer
, and find in the list the ones you would like to add. - Select the checkbox on the left of all indexers you would like to add, then select
Add Selected
.
Step 7: Test the Setup
- Access the qBittorrent web interface by opening a web browser and navigating to
http://localhost:8080
. - Click on the
Search
tab in the top right - In the search box, enter the title of a movie, in my case
Interstellar
.- Optionally, change
All Categories
to whatever it is you’re looking for
- Optionally, change
- Press
Search
, and you should see results like below:
Now, right-click on an item that you would like to download, and click Download
. Then, click Download
again at the bottom of the modal. Go back to the Transfers
tab, and you should see that torrent downloading.
This should be quite a comprehensive setup guide, and I tried testing it locally to make sure it works, but if you guys try it out and run into any issues, let me know and I will try to add to this post.