DEV Community

Cover image for Putting your RaspberryPi to work with a sleek torrent client & Plex TV setup
Karolis
Karolis

Posted on

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

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.

Image description

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

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.

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
Enter fullscreen mode Exit fullscreen mode

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:

RaspberryPi

Once device is visible, click on the "edit labels" from the menu. Add a label 'type: rpi':

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
name: torrent
scheduling:
  type: Conditional
  selectors:
    type: rpi
spec:
  containers:
    - name: qbittorrent
      image: cr.hotio.dev/hotio/qbittorrent # Using an image that already contains vuetorrent
      ports:
        - 80:8080
      volumes:
        - /data/qbittorrent/config:/config
        - /media/downloads:/downloads
        - ./vuetorrent:/vuetorrent
      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: plex
      image: lscr.io/linuxserver/plex
      networkMode: host # Using host network as it will be exposing quite a few ports for various protocols
      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: "" # Optional, you can get your claim here https://www.plex.tv/claim/

Enter fullscreen mode Exit fullscreen mode

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. Initial username is admin and password is adminadmin.

Once logged in, go into settings and configure the UI theme:

update qbittorrent theme

Then, change your 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

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


Originally published at https://synpse.net/blog/vuetorrent-plex/

Discussion (3)

Collapse
vgdude profile image
Vinayak Goyal

Followed your tuorial but VuzeTorrent just isn't able to save a file. It downloads 300-400kb data and then shows FAILED. Have been trying to debug for past 6 hours, to no avail.
No file or folder is created while downloading the torrent so I'm concluding it is unable to make save a file to disk. Done everything including chmod to give complete perms 777 to the download folders with recursive perms -R, still doesn't work.

Collapse
krusenas profile image
Karolis Author

hey, maybe it's something to do with the mounted volume or is it using regular sd card filesystem? Feel free to jump on the discord channel discord.gg/DhEwN3SP so we can help you to debug this :) Should be straightforward.
The only issue I see on my setup is the lack of available disk space, might need to get an USB hard drive

Collapse
vgdude profile image
Vinayak Goyal

You are right. It was an issue of volume disk mounting. Worked out.