Hardware

I have an extra 32GB MicroSD card salvaged from a crashed drone. However, being a full seedbox on itself it should connect to some kind of large enough storage to last its life-cycle without the need to delete anything at all, that way I can keep seeding. I use Pi3 B with Raspbian Buster Lite :July 2019 but other ones should be fine as well. Follow this installation guide to get started

I found an unused 1TB USB3 drive that used to be a footage courier (now it’s too slow and we have moved on to other DIT solution). It doesn’t have a separate power source and it’s undervolting all the time but it’s been a week and it seems fine. The read-write speed is not at full USB2 speed. Luckily DLNA plays partially so I don’t have to wait for the file to load. Also, we won’t be streaming 4K anytime soon with this setup.

Format the hard drive

So with it being formated in exFat let’s have it mountable on RPi. I decided to go with native ext4 because I won’t need that drive in the near future. The steps in this answer worked for me. Next, we will mount the drive and install Transmission.

Mount the drive and install Transmission-daemon

With how secure Linux systems are, setting up permission for Transmission is a nightmare. There are many discrepancies as to what the approach should be. As luck would have it, I found that this is the ONLY guide I got it to work correctly based on my 2 days of trials and errors. Although I did not set an incomplete folder at all and set

“incomplete-dir-enabled”: false,

Because I know what I want to stream from the server and can see the progress in Transmission already. Furthermore, the files won’t load on DLNA client if it’s not completely downloaded

I also did not set whitelist at all but instead

“rpc-whitelist-enabled”: false,

Because I have many devices to use with Transmission and didn’t want to add many IPs. Other than that you can follow this guide from the beginning.

A little tip; prior to this, I did not set the correct path to my Transmission folder on the hard drive which was on mnt/downloads so I filled up my 32GB card instantly. This code helped find where the big files were;

find / -type f -size +10000k -exec ls -lh {} \; | awk '{print $5 ": " $9}' | sort -nr | head -n 40

So that I could delete cache file resulted from my stupidity and be able to continue onwards to Samba.

After you’re done with the setting up, test the system by accessing the web UI and start downloading some files that are bigger than your SD card. See if it holds more than 5MB. You can simply copy the magnet link and paste on Open Torrent menu.

If it reports an error, retrace some steps and try to debug or gave up and reflash Buster again as I did. Reboot then test again just to be on the safe side.

Installing Samba

This will turn it to Network-attached storage or NAS for easy file access and management. First, get Samba from the repository

sudo apt-get install samba samba-common-bin

Edit config file for Samba

sudo nano /etc/samba/smb.conf

Then add this to the [AUTHENTICATION] section

security = user

After that, add this code at the end, changing directory to yours



comment = PiHole

path = /mnt/

valid users =

force group = users

create mask = 0777

directory mask = 0777

read only = no

public = no [PiHole]comment = PiHolepath = /mnt/valid users = @users force group = userscreate mask = 0777directory mask = 0777read only = nopublic = no

Then set the password for samba user pi

sudo smbpasswd -a pi

Finalize samba using

sudo service smbd restart

sudo service nmbd restart

The changes I made based on my experiment is that this way when logging in with Windows 10 it asks for the credential, always. This feels more secure than other methods.

Test by connecting your windows machine to pi IP address in explorer with \\IPADRESS in the address bar and test permission by copying files onto it.

It should ask for username and password, use your password from the previous step.

You can then map the drive to your computer for easy permanent access by right click on the folder.

Install MiniDLNA

This may not be needed if all of your devices support SMB. My LG WebOS TV doesn’t. For our purpose, we don’t need the specific content type so you can just use

media_dir=YOURFOLDER

without A, P, V. As the player on TV will sort the content by type by itself anyway.

When done, use these codes to restart instead.

sudo service minidlna stop

Install MiniDLNA by following this guide.

Then test by putting files on it via samba or download some torrents via Transmission and play with VLC on Android or through your DLNA enabled TV. You should see the friendly_name that you set from the tutorial.

if something went wrong, try looking up /var/log/minidlna.log

Pi-hole on top

Now to the last step is installing Pi hole which is very easy as the project is well supported unlike all of the above. Just follow the official steps.

You can test by going to websites plagued with ads such as CNN.com and the likes. The amazing thing about Pi-Hole is all the ads from phone apps are gone too!

Then set the DNS server for your router using this tutorial.

Next steps

All of this self-indulgent is just to make life a little bit lazier. You can download your content with your phone using Transmission client, then when it’s done just stream it to TV with DLNA while being blocked from ads at the same time.

This Pi-hole will sit there 24/7 trying to seed and give back to the community. I hope I can add more to it in the future. What are your thoughts?