Make your own Netflix (jellyfin, qBittorrent)
Let’s create your media server/seedbox to download and stream your multimedia content.
Firstly we will go for a simple solution with only two tools. And then, if you’re still reading, we go a bit further with more tools (Radarr, Jackett …).
Disclaimer : The following article provides information on creating a media platform based on torrents. It is important to note that downloading copyrighted content without proper authorization from the content owner may be illegal in many jurisdictions. This article does not condone or promote any form of piracy or copyright infringement.
Jellyfin is an open-source software, we will use it to stream files (video, audio…) from your server. It also has many possible clients to watch your movies: web, mobile apps, android TV… One popular alternative is Plex.
qbitorrent-nox is a BitTorrent client with a web interface.
You can install them locally, on a Raspberry Pi or on a server.
I went for a server to access my movies from everywhere and to take advantage of the download speed. I’m used to using Digital Ocean to deploy my personal projects. I took a basic droplet (that’s how they name their virtual servers), for the moment it has enough performance to stream movies. And I added a 100Go volume to have more storage (the default 10Go is enough to host a website or an API, but for media it’s a bit low).
Here is my referral link, you can get 200$ of credits over 60 days, it’s more than enough to try multiple projects.
jellyfin
You can simply install jellyfin with this command on Ubuntu
curl https://repo.jellyfin.org/install-debuntu.sh | sudo bash
to install it on other systems check the documentation, because it can defer
You can now open Jellyfin in your browser at ip-address:8096. Follow the steps to create a user and set up your media library.
You can download jellyfin’s clients for mobile or desktop and use the same URL and credentials.
Transcoding
To be simple transcoding is the process of converting the format of video or audio files from one format to another. Transcoding is a crucial part of streaming media mainly because of bandwidth.
Don’t worry we are not going to code that part, Jellyfin does it well.
But it can be a problem if you have limited disk space because it will “duplicate” the data on your server for each movie your server is currently streaming.
For example, on my server, I have two disks of 10Go and 100Go. By default, all the transcoded data were stored on the little one. If I watched a 10Go movie, it will fill up the space within a few minutes which makes jellyfin crash.
To avoid that, you can change the folder where jellyfin store the transcoded data directly on the UI in Dashboard >PlayBack > transcoding folder.
You can also change the frequency of cleaning the folder in : Dashboard > Advanced > Scheduled tasks > Clean transcode directory
If you have a very limited space you may still encounter the error. There is an issue opened here that can help you. And they made this project Jellyfin-Transcodes-cleanup, it’s a tool that clears transcode directory more often while avoiding streaming pauses/crashes.
qBittorrent-nox
get the repository and install it
sudo add-apt-repository -y ppa:qbittorrent-team/qbittorrent-stable sudo apt install -y qbittorrent-nox
Now we have to create a file in the systemd folder, to use qBittorrent-nox as a service.
sudo nano /etc/systemd/system/qbittorrent-nox.service
Add the following lines to it :
[Unit]
Description=qBittorrentClient
After=network.target
[Service]
ExecStart=/usr/bin/qbittorrent-nox --webui-port=8080
Restart=always
[Install]
WantedBy=multi-user.targetYou can now start the service with : systemctl start qbittorrent-now
And go the ip-address:8080 to access it via the web interface.
The default credentials are : usernameadmin and password : adminadmin
Usage
You can manage your services with
systemctl start qbittorrent-nox
systemctl stop qbittorrent-nox
systemctl restart qbittorrent-nox
systemctl start jellyfin
systemctl stop jellyfin
systemctl restart jellyfinI advise you to stop qbittorrent-nowwhen you’re not using it to limit the usage of disk I/O and bandwidth.
You now have all you need, to download a movie and to watch it. You can also send the media you already own to your server and stream them.
Go further
There is plenty of other tools to improve our media platform.
There is a web app to search, monitor and download media Radarr (movies), Sonarr (TV shows), Lidarr (music), Readarr (ebook and audiobook).
Jackett is a proxy between an app (Radarr, Sonarr, Reader or Lidarr …) and indexers of torrents.
The service (Radarr, Sonarr, Reader or Lidarr …) will automatically search (thanks to Jackett) for the movie (or other media) on the internet. Once the requested media is found it will send a command to qBittorrent to download the file.
Let's try Radarr and Jackett !
Installing Radarr
We need to install model-devel an open-source C# .NET framework implementation, because Radarr is made in C#.
sudo apt install mono-devel
# Radarr dependenc
sudo apt install curl mediainfo
# this will download and install Radarr
curl -L -O $( curl -s https://api.github.com/repos/Radarr/Radarr/releases | grep linux.tar.gz | grep browser_download_url | head -1 | cut -d \" -f 4 )
tar -xvzf Radarr.*.linux.tar.gzyou can run it with mono ~/Radarr/Radarr.exe and open it ip-address:7878
We can create a system file to run it as a service like the others.
sudo nano /etc/systemd/system/radarr.service
add these lines (adapt the path to Radarr and mono)
[Unit]
Description=radarr
After=yslog.target network.target
[Service]
ExecStart=/usr/bin/mono --debug /root/Radarr/Radarr.exe -nobrowser
Restart=always
[Install]
WantedBy=multi-user.target You can now run
systemctl enable radarr
systemctl start radarrInstalling Jackett
To install Jackett as a service run (source):
cd /opt && f=Jackett.Binaries.LinuxAMDx64.tar.gz && release=$(wget -q https://github.com/Jackett/Jackett/releases/latest -O - | grep "title>Release" | cut -d " " -f 4) && sudo wget -Nc https://github.com/Jackett/Jackett/releases/download/$release/"$f" && sudo tar -xzf "$f" && sudo rm -f "$f" && cd Jackett* && sudo ./install_service_systemd.sh && systemctl status jackett.service && cd - && echo -e "\nVisit http://127.0.0.1:9117"You may encounter an error while sudo ./install_service_sysremd.sh and you may need to change the ownership of the /opt/Jackett folder.
You now have another tool running at ip-address:9117
Configuration
Link Radarr & qBitorrent
In Radarr go to Settings > Download Client > Add
Select qBitorrent and add the credentials
Link Radarr & Jackett
In Jackett add indexers, don’t forget to filter your language.
The steps to add the indexers in Radarr are explained directly in Jackett :
- In Radarr Go to Settings > Indexers > Add > Torznab > Custom.
- Click on the indexers corresponding “Copy Torznab Feed” button and paste it into the Radarr URL field.
- For the API key use YOUR_KEY.
- Configure the correct category IDs via the (Anime) Categories options. See the Jackett indexer configuration for a list of supported categories.
Usage
You now can search for a Movie in Radarr.
Add it to your movie list.
From the movie, you can Search for sources, and click download.
Once the download is done, it is ready to watch in Jellyfin.
Don’t forget to turn off your services when you don’t use it, to optimise the resources for Jellyfin