Create a Media Server with Your FxBlox — Part 3 — Install qBitTorrent

Fierro Labs
6 min readJan 16, 2024

--

AI generated image of: a green baby dragon that is hatching out the top half of a white egg

You might be wondering what even is qBitTorrent? Well, qBitTorrent is just one of many tools that allows our computer to speak the Tor protocol. This enables our computer to download and share files to and from other computers running the same protocol. This is the first app we are setting up because Prowlarr, Sonarr, and Radarr all depend on this software to be able to actually grab any content you request. Now, because accessing the Tor network is frowned upon by various ISPs and governments, from this point on, it is best we have our VPN turned on.

DISCLAIMER: With that said, Fierro Labs does not condone the downloading, sharing, or distribution of illegal and copyrighted material without proper authorization. Users are urged to adhere to all applicable laws and regulations governing intellectual property rights. While we advocate for responsible and legal use of file-sharing software and media/indexing management software like qBittorrent, Prowlarr, Radarr & Sonarr, users are advised to only download and share content for which they have the legal right or proper authorization. Always respect the rights of content creators and copyright holders. We do not accept any liability for damage arising from the use of our services or information contained herein in any manner whatsoever, except where explicitly required by law.

Creating a self-hosted and automated media server is admittedly not the easiest thing to do, but that’s why we’re here. There are multiple steps and tools involved that if you were trying this by yourself, you would probably miss something and just give up.

So, in this guide, we will show you how to:

  • Create a docker network
  • Create the directory structure
  • Install qBitTorrent with Docker
  • Set up qBitTorrent
  • What is Seeding and Leeching

Create Docker Network

First thing we want to do is set up a virtual network for the *arr suite we are going to be downloading. A virtual network for all intents and purposes is just an organization technique for applications. If you read our The Zoo Animal Analogy of Docker You Never Knew You Needed article then you could think of a docker network as a safari zone at a zoo, or an artic environment. These biomes at zoos are just ways to organize the animals from the same regions, they are all in their own enclosures, but they can see each other and even talk to each other (if they spoke the same language of course).

All containers in this docker network will be able to reference each other with their container name, which will make enabling them to talk to each other that much easier. We’ll start with typing:

docker network create -d bridge media-stack

This will create a network called media-stackin bridgemode.

And that is it! We can move on to creating the directory structure to hold our media.

Create directory structure for containers

This is actually a critical step to get the *arr suite to work together seamlessly. There is this thing called Hardlink-ing that will make media access seamless when transferring data from qBT to the *arr suite to Jellyfin.

The absolute best resource which we have to give a shout out to is Docker — TRaSH Guides (trash-guides.info), they explain the best practices to get this to work on their website. Which is where we learned from as well. If you find their content useful, please consider donating to support ongoing development of their guides.

They explain that when setting up qBitTorrent, it only needs access to one location on your drive to save files to. So, we can create that directory:

mkdir -p /media/pi/nvme0n1p1/media-stack/data/torrents/movies
mkdir -p /media/pi/nvme0n1p1/media-stack/data/torrents/tv
mkdir -p /media/pi/nvme0n1p1/media-stack/data/torrents/music

Notice the “one” location the /movies, /tv, and /music directories share is ../torrents. Which is a different location from the directories we created for Jellyfin. Jellyfin and qBT are not friends so they don’t need to take up the exact same space. They “communicate” through the *arr suite of apps.

Install qBitTorrent with Docker

With Docker, we can choose where we want to install qBT. Our FxBlox doesn’t have a ton of onboard storage, so we want to move as much data to the nvme as possible. All you need to install qBT is a docker-compose file.

--- 
version: '2.1'
services:
qbittorrent:
image: lscr.io/linuxserver/qbittorrent:latest
container_name: qbittorrent
environment:
- PUID=1000
- PGID=1000
- TZ=Americas/Los_Angeles # Change to your timezone
- WEBUI_PORT=8080
volumes:
- /media/pi/nvme0n1p1/media-stack/AppData/Config/qbittorrent:/config
- /media/pi/nvme0n1p1/media-stack/data/torrents:/torrents
ports:
- 8080:8080
- 6881:6881
- 6881:6881/udp
restart: unless-stopped
network_mode: media-stack

You can find your TZ code here: List of tz database time zones — Wikipedia

Copy/paste this into the location of your choosing. We recommend making a simple folder in the ../media-stack directory:

mkdir /media/pi/nvme0n1p1/media-stack/qbittorrent
cd /media/pi/nvme0n1p1/media-stack/qbittorrent
vim docker-compose.yml
  1. Press ‘i’ key
  2. Right click paste
  3. Press ‘Esc’ key
  4. Finally press :wq!
  5. Run qBT with docker compose up

Important! Don’t run this with the -dflag, because you need the randomized default password that gets printed to the console.

Now, we can access qBitTorrent by going to localhost:8080 or <ip-of-machine>:8080. Enter the default username and password, generated in the console output.

Set up qBitTorrent

First thing you’re going to want to do is change the default password.

  1. Settings -> Web UI -> Authentication
  • Change this to be whatever you want. Then scroll down to hit save at the bottom of the window.

2. Settings -> Downloads -> Saving Management:

  • Default Torrent Management Mode = Automatic
  • When Torrent Category changed = Relocate torrent
  • When Default Save Path changed = Relocate affect torrents
  • When Category Save Path changed = Relocate affected torrents
  • MOST IMPORTANT; Default Save Path = /data/torrents
  • Then scroll down to hit save at the bottom of the window.

3. Add categories, by right clicking under “Categories” on the left-hand vertical menu.

  • Create category name: movies, with path: /data/torrents/movies
  • Create category name: tvwith path: /data/torrents/tv
  • Optionally create name: musicwith path: /data/torrents/music only necessary if you’re planning on using Lidarr.

Finally, we can stop the container, by going back to our terminal and force quit qBitTorrent with Ctrl + C.

And restart it with:

docker restart qbittorrent

What is Seeding and Leeching

qBitTorrent has one caveat that you will want to know about. That is, whatever content you download from a peer, your qbittorrent will automatically make it available for seeding. It’s not hard to understand, when you offer up something for others to download, you are Seeding that content, you are a Seeder. When you download something from a Seeder, you are Leeching. And if you only ever Leech content, you are a Leecher. That’s a socially unacceptable position, have some decency.

Anyways, regardless of your stance on leeching, you can disable the Seeding of a specific file, by double clicking the line item.

Conclusion

This is the first app we are setting up because Prowlarr, Sonarr, and Radarr all depend on this software to be able to actually download any content you request. Now that you have qBitTorrent configured correctly for the *arr suite, we can basically forget about it. If there are any issues downloading content to the correct folders, then it would be a sign to revisit the path configurations we did in this guide, but you should be good to go from now on.

In the next tutorial, we’ll show you how to set up the next app needed to get our automated media suite to work, which is Prowlarr. Prowlarr is an indexer manager meant to do the actual searching for content that we request through Sonarr or Radarr or the rest of the *arr suite.

If you liked our content, give us a like or “Applause” here on Medium and please consider following us. Follow our YouTube channel for more web 3 content. Find me on X at @legendofmar. Checkout the Functionland Telegram for support and updates. Cheers!

--

--

Fierro Labs

Fierro Labs is a Web3 content and documentation creative studio. In this blog we talk about and make guides on IT and Web3 topics! Email: marco@fierrolabs.com