Putting your RaspberryPi to work with a sleek torrent client & Plex TV setup

Published on December 29, 21

VueTorrent UI, source: https://github.com/WDaan/VueTorrent
VueTorrent UI, source: https://github.com/WDaan/VueTorrent

Hardware

Software

  • Synpse - provides app deployment, SSH and HTTPS access.
  • Vuetorrent - Vuetorrent is a nice looking skin for otherwise a bit dated qbittorrent
  • Plex - probably the best option to stream things locally to your smart TV.

Intro

I guess we all know that torrents present a fantastic opportunity (amongst other things) for families to digitize their old VHS tapes that contain embarrassing videos of your childhood and then share these videos with others using an efficient BitTorrent protocol.

Then, once everyone has those videos that were supposed to die together with the old technology we also need to watch them, this is where the good guy Plex comes in.

In this short tutorial we will setup a Vuetorrent and Plex combo on a RaspberryPi. Using this installation method you will get few great things out of the box:

  • Drag & drop torrent files to download them. You can select individual files from a larger torrent like in any other client.
  • Shared directory between torrent client container and Plex so you can view them
  • Optional public HTTPS URL to connect to Vuetorrent from anywhere in a form https://dev-{YOUR ID}.synpse.cloud

Step 1: Install Docker

Depending on your RaspberryPi OS Docker installation might vary but in most cases this script from https://docs.docker.com/engine/install/ubuntu should do the job:

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

Step 2: Install Synpse agent on your device

Log into your Synpse account, navigate to the “Devices” section and then click on “Provision”. Use the command in your RaspberryPi terminal. This will download, install and initialize the synpse agent.

Once the device has appeared in your Synpse dashboard:

Registered RPI
Registered RPI

Once device is visible, click on the “edit labels” from the menu. Add a label ‘type: rpi’:

Label your device
Label your device

In Synpse, applications are installed into the devices based on device labels so it’s a good practice to label your devices accordingly.

Step 3: Create Vuetorrent and Plex deployment

Applications in Synpse are defined in yaml format. If you have used Docker Compose or Kubernetes before, it will feel familiar. You can read more about them here.

To create the application:

  1. Select the namespace (should be ‘default’ on the left side menu)
  2. Click on “New Application” button in the top
  3. Copy paste the yaml from below
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: torrent
scheduling:
  type: Conditional
  selectors:
    type: rpi
spec:
  containers:
    - name: qbittorrent
      image: linuxserver/qbittorrent
      ports:
        - 80:8080
      volumes:
        - /data/qbittorrent/config:/config
        - /media/downloads:/downloads
      env:
        - name: PUID
          value: "1000"
        - name: PGID
          value: "1000"
        - name: TZ
          value: Europe/London
        - name: UMASK_SET
          value: "022"
        - name: WEBUI_PORT
          value: "8080"
        - name: DOCKER_MODS
          value: arafatamim/linuxserver-io-mod-vuetorrent
      restartPolicy: {}
    - name: plex
      image: lscr.io/linuxserver/plex
      networkMode: host
      volumes:
        - /data/plex:/config
        - /media/downloads:/media/downloads
      env:
        - name: PUID
          value: "1000"
        - name: PGID
          value: "1000"
        - name: VERSION
          value: docker
        - name: PLEX_CLAIM
          value: claim-A53P7wkqPex3Rd-Ma-T7
      restartPolicy: {}

Logging into the Vuetorrent:

Once deployed, it will take a few seconds or minutes (depending on your internet speed) to download and start the docker containers. Once started, you can access it on http://{YOUR DEVICE IP}:80 address.

Go to Settings -> WEBUI, check Use alternative Web UI and enter its location /vuetorrent, then save.

update qbittorrent theme
update qbittorrent theme

Then, change your password:

update vuetorrent password
update vuetorrent password

Logging into Plex:

You can login into it using port http://{YOUR DEVICE IP}:32400

Step 4: Configuring Plex libraries

To see whatever you have downloaded via Vuetorrent to your local machine in Plex. For both Films and TV Shows the media path should be /media/downloads:

configuring library
configuring library

Step 5 (optional): Expose it to the internet so you can connect from anywhere

At this step we will enable remote access via HTTPS to our Vuetorrent installation on the RaspberryPi. If you have skipped password setup, please do it, otherwise malicious users or automated bots could hijack your device.

  1. Go to your device details
  2. In the top right corner set the port to your Vuetorrent port which should be 80
  3. Turn on the switch

Next Steps

Connect your smart TV

Most TVs now have inbuilt Plex TV apps. You can use it to pair it with your Raspberry Pi server. As long as you are using same account, it should just work.

Download content

Add a torrent to the Vuetorrent dashboard. Once downloaded, it should appear in your Plex library.

References