[Help needed] Solution for 247 Headless NAS + Torrent box

imran_chennai

Disciple
Hi folks,
I would like some solution ideas for a use case requiring a NAS and torrent box. I want to watch some downloaded UHD content from my android TV. I'm currently sharing my laptop media over the local network via SMB and accessing the media on the TV using KODI. I want to find an alternative to the current setup, listing down my requirements:
  • Need to run 247 in Chennai, low power consumption, tiny form factor
  • The solution should be headless, ability to access the UI over the local network through a phone/laptop browser.
  • Ability to add and schedule torrent downloads via a browser by a device connected to the local network
  • Store and serve downloaded media files (2160p, H265, HDR) over at least a single HDD/SSD to devices over the local network (mostly video files, streamed to max 2 devices simultaneously) acting like network storage (NAS).
Network and Device Details:
Router: Archer C60 | https://www.tp-link.com/in/home-networking/wifi-router/archer-c60/
TV: Iffalcon K31 | https://www.iffalcon.com/ind/en/products/k31/k31-55.html

Details:
  • Budget (~6K)
  • Have used Linux, familiarity with CLI commands, open to troubleshoot and google
  • Comfortable with re-purposing a broken laptop (if found) as a sff pc.
  • Existing hardware - Raspberry Pi 3 Model B, 1TB SSD and another 1TB HDD (2.5")

I did some due diligence and found this can be accomplished by a "torrent box". I have a Raspberry Pi 3 Model B, which is currently doing retro emulation duties. Can I repurpose this to build this?. My worry is that the Pi might not have enough compute power and IO Bandwidth to accomplish this.

Would really appreciate some guidance on this as I'm not that familiar with networking. Looking to pick up some skills via this NAS + Torrent project.
Thanks!
 
Last edited:
1. What is your budget ?
2. What is the total size of files of your downloaded media files you want to store at once ?
3. How are your existing skills in unix command lines like ? You would pick up skills, but existing skills may make a huge difference.
 
1. What is your budget ?
2. What is the total size of files of your downloaded media files you want to store at once ?
3. How are your existing skills in unix command lines like ? You would pick up skills, but existing skills may make a huge difference.
1. Budget (~6K INR)
2. ~500GB, Have a 1TB SATA SSD - planning to use it
3. 1/5, have used it in the past. Can pick up again.

Edit - updated the main thread
 
Install TrueNAS on your Raspberry and try using it for a few days to gauge your comfort level with the software. You'll find tutorials and documentation online. The raspberry will of course be slower and probably struggle but it's important for you to gauge the comfort and experience of using the software. If you like it, you can then build a tiny mATX, ITX or MITX SFF build, install your disks (ideally in a RAID configuration but that's your discretion about redundancy and backup plans), install TrueNAS and be on your way.

TrueNAS can be used in headless-mode with a web based GUI interface that you can access via a browser and you can install apps in one click. You can use Jellyfin (Plex alternative) to stream your media to all your devices, Deluge to download specific torrents and a combination of Radarr/Sonarr to automatically schedule torrents of media you want.

You will very quickly run out of space if you're using storing 4K HEVC HDR content so I would plan for atleast a 2 or 4TB setup in terms of storage initially but that's your discretion.
 
Found a Guide for some unknown reason was unable to post the link ...however pasting the guide for your reference


Connect the network, screen, mouse and keyboard. Power the device and go through the wizard to create a password, select your language, time zone, etc. This would be the time to connect the WiFi if you don’t have a wired connection with DHCP. At the last step accept the automatic update.

While the pi is updating you can enable VNC/SSH for remote access from Preferences -> Raspberry Pi Configuration and change the hostname as required.

If you are going to use a GUI via VNC instead of a physical monitor run sudo nano /boot/config.txt and uncomment framebuffer_width and framebuffer_height, optionally changing the resolution values. Restart the device when prompted by the completed update process.

Mount Point

Plug in the external storage. My NTFS partition is called “1TB” after the size of the drive so I’ll keep referring to it like this. NTFS is used because I want the disk to be plug-and-play everywhere.

We need to make sure the drive mounts permanently to a consistent location. Bu default if mounts automatically under /media/pi/1TB (the name of the partition).

Create a new folder for mounting our drive and take ownership with the default user account:

sudo mkdir /media/1TB
sudo chown pi:pi /media/1TB

Then we have to tell the Pi to mount to the new location automatically:

sudo nano /etc/fstab

Add this line to the fstab file:

/dev/sda1 /media/1TB ntfs-3g uid=pi,gid=pi 0 1

The file should look something like this:

proc /proc proc defaults 0 0
/dev/mmcblk0p1 /boot vfat defaults 0 2
/dev/mmcblk0p2 / ext4 defaults,noatime 0 1
/dev/sda1 /media/1TB ntfs-3g uid=pi,gid=pi 0 1
#A swapfile is not a swap partition, so no using swapon|off from here on, use dphys-swapfile swap[on|off] for that

Reboot the device and the drive should be accessible via /media/1TB

Network Share

Install Samba using sudo apt-get install samba samba-common-bin

Edit the Samba config file using sudo nano /etc/samba/smb.conf and place this at the bottom:

[1TB]
path = /media/1TB
writeable = yes
create mask = 0664
force create mode = 0664
directory mask = 0775
force directory mode = 0775
public = no

This setup is meant to be used for non-confidential shares on a trusted local network. You can comment out the relevant lines in smb.conf if you don’t want to share home folders by default.

Set an SMB password for the user pi that is different to the one used to log in: sudo smbpasswd -a pi

Restart Samba and check its status:

sudo systemctl restart smbdsudo systemctl status smbd

In Windows connect to the device using its hostname like so: \\raspberrypi\1TB where 1TB is the name of the share set in the first line of our smb.conf additions above.

Enter pi as the username and the SMB password created earlier.

For Unix-like systems connect using IP or hostname like so: smb://192.168.1.1/1TB

Docker with Portainer

Using Portainer and Docker to run qBittottent will give us greater flexibility while also making it easier to manage our services down the line. For example, we’ll save the qBittorrent app data on the external drive which means we can spin up a container anywhere in the future and pick up seeding where we left off with the same settings.

Install Docker using curl -sSl https://get.docker.com | sh

Install Portainer using sudo docker pull portainer/portainer-ce:latest

And then run it: sudo docker run -d -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest

Navigate to http://raspberrypi:9000 and create an admin password.



New Portainer Installation

In the Portainer wizard click Get Started (with the local environment) and then click on local.

qBittorrent

To install qBittorrent using Portainer:

Click Containers -> Add container

Enter qbittorrent as the name and linuxserver/qbittorrent as the docker.io image.

Scroll down and publish the following network ports:

6881:6881

6881:6881/udp

8080:8080



Manual network port publishing

Now go to Advanced container settings -> Volumes and map some volumes. This gives our container the ability to see the relevant storage.

container: /config -> Bind -> host: /media/1TB/appdata/qbittorrent and make sure the qbittorrent appdata folder exists.

Then map another volume:

container: /downloads -> Bind -> host: /media/1TB/Downloads and make sure the Downloads folder exists.

Next open a terminal window on the Pi and run id pi which will show information about our user.

Add the following environment variables under Env:

name: PUID, value: 1000 (the uid user ID of our user)

name: PGID, value: 1000(the gid group ID of our user)

name: TZ, value: Europe/London (the TZ database name of your region)

name: UMASK, value: 022(user file creation mode mask)

name: WEBUI_PORT, value: 8080(port used to access the web interface)

Click on Restart policy and select Unless stopped.

Next, type df -h in terminal to find the name of the external drive’s filesystem.

Navigate to Runtime resources and click add device:

host: /dev/sda1, container: /dev/sda1

Click Deploy the container and you should see it running after a couple of minutes.

Using qBittorrent

Now you should be able to access the qBittorrent web UI via http://raspberrypi:8080

Go to Settings -> Downloads and set Keep incomplete torrents in to /downloads/incomplete/

This will ensure we can conveniently see partially downloaded torrents while preventing unnecessary wear on the microSD card.
 
Thanks for the inputs folks.
I've decided to proceed with the openmediavault as listed by @ibose as I have all hardware components at hand.
Might be looking at more powerful solutions later if the compute from RPi Model B is not enough.
 
Update time:
Was finally able to get this functioning perfectly after understanding the process (trial and error of course!) for 2 straight days.
Have paired the Pi 3 Model B+ with a 32GB SDHC connected over the ethernet. Most of the config was done in ssh to keep the setup headless with a 1TB 870 QVO over USB, wanted to keep it low power
Use raspbian buster lite as the base os with openmediavault added from bash. Configured smb to be accessible from the local network. QBittorrent added using Portainer from OMV.
Was a fun learning experience throughout the process and now will be able to enjoy 2160p videos on the TV
Thanks for the direction folks, esp @ibose. Love this community.

PXL_20220308_200437960.MP.jpg

Servers 4K videos smoothly while parallelly on torrent download duty.
No stuttering, CPU barely crosses 60%
1646750870526.png
 
Great you installed OMV on top of Debian although DietPi would have been a better option. Either option gives greater flexibility. My previous Intel based NAS was on OMV and it served me many years. 24x7 rock solid and stable experience.
Just ensure that the Pi and rest of the equipment is powered properly and enable the flashmemory plugin, if possible, in your scenario.
 
Last edited:
quick query :

what version of samba will the instructions work on?
i use ssh for streaming stuff off multiple fedora nucs, might want to check out samba if reqd.
 
quick query :

what version of samba will the instructions work on?
i use ssh for streaming stuff off multiple fedora nucs, might want to check out samba if reqd.
I'm not sure I have enough know-how to answer the question. Sorry.
If you can break it down for me, I can give a try or other members can help out.
 
For a lighter and probably easier to install system, you can try OpenWRT for RPI3 along with samba+transmission+aria2+minidlna (modules). IMHO it would require the lest work compared to installing full-blown distro. Device with emmc like pogoplug/segate goflexhome or single-board-computer (with emmc) will make the setup more rugged, cause SDCARD can get corrupted with frequent power failures. Suggesting this cause u already have RPI3, otherwise openwrt and a good router with powerful cpu+usb port+openwrt will do just fine... Pen drives or SSD is recommended rater than conventional HDD. Furthermore u can run the adblock module for openwrt on the RPI and avail of pi-hole like adblocking. Depending on how large your blocklist is, it can become a memory hog though. The minidlna will allow to stream 99% of the media to your TV by simply using VLC app for smart tv... Most of the time u dont even need samba or file sharing.
 
Last edited:
i have an Pogo Plug - not used - purchased for Group order here https://techenclave.com/threads/pogoplug-series-4.190626/page-3 and how to make it a nAS is here
BTW those are older instructions for debian on pogoplug (using sdcard). Problem is sdcard tends to get corrupted after long time, but a much more rugged method is to install openwrt to the internal nand, which leaves both the usb and sdcard free for storage. You can find the info for getting openwrt on these boxes here https://forum.doozan.com/read.php?4,86219 . You can either install additional packages for openwrt using the package manager or preferablly compile ur own custom image using the openwrt image builder. Note this works best when you have already updated to the latest uboot (2017) using instructions at Qui's site. You can download my pre-built openwrt firmware image for the pogoplug v4 here https://drive.google.com/file/d/1uBZlMPyVj_BRJ2PsH-sVD73x082IuI0L/view?usp=sharing. You can use **at your own risk** . The manifest has the details of the (pre)installed packages. The image is configured to obtain IP via DHCP and u can use an ip scanner to find the device after it has booted. The device will first try to boot from sdcard then fail-over to usb and finally internal nand if you have configured uboot accordingly. Would love to get hold of a sata version of pogoplug. Let me know if you can help.
 
Last edited:
24th April 2022 | Update:
The NAS continues to function flawlessly, have added radarr, sonarr, and jackett on portrainer. It has been a good opportunity to dabble with docker, networking, and some occasional bash commands. With this newly acquired knowledge, I plan to build a more powerful home server that is capable of all these plus some transcoding and a couple of services like bitwarden and nextcloud.

The Rpi is very limited with 1GB RAM, USB 2.0, and the absence of gigabit ethernet. I will be utilizing existing hardware- Athlon 200GE, 16GB ram, and a couple of 1TB hard drives. On the software front., still not clear on whether to go with a hypervisor like Proxmox or use an Ubuntu server as a base, will do some more research and/or ask for guidance in a separate thread.

Thanks!
 
24th April 2022 | Update:
The NAS continues to function flawlessly, have added radarr, sonarr, and jackett on portrainer. It has been a good opportunity to dabble with docker, networking, and some occasional bash commands. With this newly acquired knowledge, I plan to build a more powerful home server that is capable of all these plus some transcoding and a couple of services like bitwarden and nextcloud.

The Rpi is very limited with 1GB RAM, USB 2.0, and the absence of gigabit ethernet. I will be utilizing existing hardware- Athlon 200GE, 16GB ram, and a couple of 1TB hard drives. On the software front., still not clear on whether to go with a hypervisor like Proxmox or use an Ubuntu server as a base, will do some more research and/or ask for guidance in a separate thread.

Thanks!
I am in a similar situation as you. Currently using a pi3b, which is a limiting factor now. Need more powerful hardware. Still deciding between proxmox with a nas vm or direct install.
Do post your experience when your setup is complete.
Best of luck!
 
24th April 2022 | Update:
The NAS continues to function flawlessly, have added radarr, sonarr, and jackett on portrainer. It has been a good opportunity to dabble with docker, networking, and some occasional bash commands. With this newly acquired knowledge, I plan to build a more powerful home server that is capable of all these plus some transcoding and a couple of services like bitwarden and nextcloud.

The Rpi is very limited with 1GB RAM, USB 2.0, and the absence of gigabit ethernet. I will be utilizing existing hardware- Athlon 200GE, 16GB ram, and a couple of 1TB hard drives. On the software front., still not clear on whether to go with a hypervisor like Proxmox or use an Ubuntu server as a base, will do some more research and/or ask for guidance in a separate thread.

Thanks!
What is the typical power consumption in watts?
 
Back
Top