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
Hardware
- Raspberry Pi 4
- 5V 3A power supply
- 128GB SD card
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
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:
Once device is visible, click on the "edit labels" from the menu. Add a label 'type: rpi':
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:
- Select the namespace (should be 'default' on the left side menu)
- Click on "New Application" button in the top
- 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/
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:
Then, change your 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
:
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.
- Go to your device details
- In the top right corner set the port to your Vuetorrent port which should be 80
- 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
- https://www.qbittorrent.org/ - torrent client
- https://hotio.dev/containers/qbittorrent/ - Docker image with embedded Vuetorrent
- https://hub.docker.com/r/linuxserver/plex/tags - LinuxServer.io provided Plex Docker image
- https://www.plex.tv/en-gb/ - streaming app
Originally published at https://synpse.net/blog/vuetorrent-plex/
Top comments (5)
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.
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
You are right. It was an issue of volume disk mounting. Worked out.
Awesome tutorial, super simple and clear steps to follow.
it's downloading the torrents however they are not showing up in the plex library.
The default download directory for the qBittorrent is /app/qBittorrent/downloads.
If I change it to /media/downloads the status fails immediately after adding the torrent.
I assume the /app/qBittorrent/downloads directory inside the container needs to be mounted against the /media/downloads directory, but not sure how to do that properly and within the Synpse Yaml config.
Also on step 5 you say enable https access but it's still on port 80 which is http.
Not sure if I need to port forward anything on my router or if that public URL on Synpse should work or if it takes time to update because that URL does not resolve to an IP address either.
I've done some more testing today:
Downloading the torrents to the default directory in qBittorent: /app/qBittorrent/downloads works, but these do not show up in the /downloads folder thus does not show up in the /media/downloads,
when I change the download location to /downloads, the torrent doesn't download.
When I change the Volumes under qBittorent to: /media/downloads:/app/qBittorrent/downloads Torrenting doesn't work anymore.
the way I just found to fix it was to adjust the volumes in the Plex container to: