Become a Site Supporter and Never see Ads again!

Author Topic: Raspberry Pi 2 seedbox...  (Read 3492 times)

0 Members and 1 Guest are viewing this topic.

Offline Fatah Ruark (aka MIKE B)

  • Trade Count: (11)
  • Needs to get out more...
  • *****
  • Posts: 9945
  • Gender: Male
  • I dream in beige.
    • sloppy.art.ink
Raspberry Pi 2 seedbox...
« on: January 24, 2016, 01:40:31 PM »
I wanted to make a dedicated computer to seed all of my shows 24/7/365 and this is what I ended up doing. I'm still going to use a remote seedbox I pay for ($10/month) for other torrenting for a little while.

Used this guide to set this up. Thought others here might be interested. It was pretty easy. I'd say you need to be "medium comfortable" with things like the command line. It's mostly cut and pasting the commands.
http://www.howtogeek.com/142044/how-to-turn-a-raspberry-pi-into-an-always-on-bittorrent-box/

Total cost for everything was about $160:

1. Raspberry Pi 2 = $38 ~ http://www.amazon.com/gp/product/B00T2U7R7I?psc=1&redirect=true&ref_=oh_aui_detailpage_o00_s00
2. Power supply = $8 ~ http://www.amazon.com/gp/product/B00OY7HR1U?psc=1&redirect=true&ref_=oh_aui_detailpage_o00_s00
3. 16GB Micro SD = $8.50 ~ http://www.amazon.com/gp/product/B010Q57SEE?psc=1&redirect=true&ref_=oh_aui_detailpage_o00_s01
4. 2TB HD = $85 ~ http://www.amazon.com/gp/product/B013QFRS2S?psc=1&redirect=true&ref_=oh_aui_detailpage_o00_s02
5. HD enclosure = $23 ~ http://www.newegg.com/Product/Product.aspx?Item=N82E16817182155&cm_re=rosewill_hard_drive_enclosure-_-17-182-155-_-Product

Right now I have this thing seeding 34 shows. Eventually I hope to have all of my shows seeded 24/7/365 via this.

I expect it to cost about $10/year in electricity.

The guide was pretty straight forward. Everything worked fine for the most part. The only thing I need to work on is to get Deluge (the bit torrent program) and the remote desktop to start automatically. The instructions showed how to do that, but gave me an error. For now I'm just entering the commands via Putty whenever I restart it (which is hopefully never now).

I also can't get the remote client (runs in Windows) or Web client to work (view the client via any local web browser). I acually had them working and after the first re-start it started telling me my password was incorrect. I tried both the default password and the one I set for it...neither work. I can still remote desktop into the Pi and run everything from there. I'll try to get all of that working at some point. I'd really like to set this up so I can control it via the web interface remotely. Still need to look into how to do that and if it's secure.

I plan on adding a battery backup to it. I'll just get one of those USB batteries. I just need to make sure it will charge and supply power to the Pi at the same time. Just need to stick the battery between the charger and Pi.

I think the only thing I would do different is  to switch from a 3.5" HD to a 2.5" SSD to keep the operating costs and size down. I may upgrade the HD in the future to the SSD. Probably when a 1TB SSD gets down to $100-ish. I only have about 400GB of shows on the Pi's HD. I probably could have done a 500GB SSD, but that would have added about $75 to the cost and wouldn't leave me much room to add new shows. Probably not really worth it since the HD will only cost me $5/year in electricity.

~~~

Here are some photos:

Raspberry Pi 2 + Hard drive (banana for scale):



Raspberry Pi 2 (inside):



Screenshot of remote desktop (via VNC):



~~~

So to sum up what I can do with this:

1. Pi is headless (no monitor) running Deluge as the Bit Torrent client. OS is Raspbian "Wheezy." This is Debian linux made to run on the Raspberry Pi.
2. Pi hard drive is mapped to my Windows machine so I can copy new shows to the Pi drive (doubles as additional back up for my shows. My Windows machine has 2 HD's cloned with my shows...this is a 3rd onsite copy).
3. Pi has remote desktop. I use VNC to remote into it via my Windows machine. For now I have to remote desktop into it to add new seeds, etc.
4. Pi has SSH enabled so I can use Putty to run commands from my Windows machine.

Future upgrades:

1. Get everything to start on boot. The guide shows how to do this, but it didn't work for me
2. Battery Backup. USB battery between the power supply and Pi.
3. Fix remote client/web client password issue.
4. Setup my windows backup programs (SyncToy 2.1) to also copy files from Windows machine to the Pi hard drive.

...feel free to respond with any questions. I *might* be able to help if you run into issues if you're trying this yourself, but I'm not a linux guru.

||| MICS:  Beyer CK930 | DPA 4022 | DPA 4080 | Nevaton MCE400 | Sennheiser Ambeo Headset |||
||| PREAMPS: DPA d:vice | Naiant Tinybox | Naiant IPA |||
||| DECKS: Sound Devices MixPre6 | iPod Touch 32GB |||
|||Concert History || LMA Recordings || Live YouTube |||

Offline Limit35

  • Trade Count: (4)
  • Taperssection Member
  • ***
  • Posts: 337
Re: Raspberry Pi 2 seedbox...
« Reply #1 on: January 24, 2016, 10:43:39 PM »
Nice write up. I have a spare Model B laying around looking for some use and this maybe a good energy saver, compared to leaving the tower on.

I have to look into it more as I am not familiar with Deluge. I know Transmission has a command line interface and can be access via shell remotely with the transmission-remote command. It also has a WebUI that can be reached via a browser at http://localhost:9901. I have used it so long I may go that route. If you can't get Deluge to autostart from the daemon have you tried to autostart it from your .profile?

Offline if_then_else

  • Trade Count: (0)
  • Taperssection Member
  • ***
  • Posts: 429
Re: Raspberry Pi 2 seedbox...
« Reply #2 on: January 29, 2016, 02:22:15 PM »
I also can't get the remote client (runs in Windows) or Web client to work (view the client via any local web browser). I acually had them working and after the first re-start it started telling me my password was incorrect. I tried both the default password and the one I set for it...neither work. I can still remote desktop into the Pi and run everything from there. I'll try to get all of that working at some point. I'd really like to set this up so I can control it via the web interface remotely. Still need to look into how to do that and if it's secure.

You can run the Deluge client either by accessing the Web-UI (provided with the *.deb package) or via some SSH-connection (using Xserver forwarding). It's working fine on my home server (not a PI but a Cubietruck running Debian). What was the exact error that you were getting when trying to access deluged remotely?

PS: I wouldn't use VNC because it's a big security issue IMHO. Please, also make sure to configure iptables and to "harden" your system. Actually, the hardening step took me a lot longer than setting up most of the applications on my Linux box. (Many how-tos really don't take security issues into account).

Offline Fatah Ruark (aka MIKE B)

  • Trade Count: (11)
  • Needs to get out more...
  • *****
  • Posts: 9945
  • Gender: Male
  • I dream in beige.
    • sloppy.art.ink
Re: Raspberry Pi 2 seedbox...
« Reply #3 on: February 02, 2016, 04:34:19 PM »

PS: I wouldn't use VNC because it's a big security issue IMHO. Please, also make sure to configure iptables and to "harden" your system. Actually, the hardening step took me a lot longer than setting up most of the applications on my Linux box. (Many how-tos really don't take security issues into account).

Any good alternative to VNC?
||| MICS:  Beyer CK930 | DPA 4022 | DPA 4080 | Nevaton MCE400 | Sennheiser Ambeo Headset |||
||| PREAMPS: DPA d:vice | Naiant Tinybox | Naiant IPA |||
||| DECKS: Sound Devices MixPre6 | iPod Touch 32GB |||
|||Concert History || LMA Recordings || Live YouTube |||

Offline if_then_else

  • Trade Count: (0)
  • Taperssection Member
  • ***
  • Posts: 429
Re: Raspberry Pi 2 seedbox...
« Reply #4 on: February 03, 2016, 03:06:50 AM »

PS: I wouldn't use VNC because it's a big security issue IMHO. Please, also make sure to configure iptables and to "harden" your system. Actually, the hardening step took me a lot longer than setting up most of the applications on my Linux box. (Many how-tos really don't take security issues into account).

Any good alternative to VNC?

If you can't get the deluge web UI to work and you're trying to access your Raspberry PI remotely from a Windows machine, just install Cygwin's X-server package or Xming on Windows and enable X11 forwarding in your Putty connection settings (under SSH -> X11).

There's some pretty detailed tutorial on
http://www.cs.dartmouth.edu/~campbell/cs50/putty-cygwin-tutorial.pdf

If you've any specific questions: I can have a look at my own X-server config over the week-end.

The advantage of this method is that you can use your existing SSH connection and don't have to open any additional ports. Moreover, if memory serves, VNC doesn't support encryption, so every connection details, passwords etc. you send to the remote machine could be intercepted and read.

If memory serves, I had a couple of other issues with the deluge web UI. I got it working but it wouldn't save my modified preferences. So I had to edit the belonging configuration file manually. Other than this, the application runs pretty smooth and stable.

BTW: If you're also looking into downloading torrents from sites as Dime, TTD etc. automatically (via some predefined whitelist) then you might have a look at flexget.

Offline if_then_else

  • Trade Count: (0)
  • Taperssection Member
  • ***
  • Posts: 429
Re: Raspberry Pi 2 seedbox...
« Reply #5 on: February 06, 2016, 08:17:17 AM »

Future upgrades:

1. Get everything to start on boot. The guide shows how to do this, but it didn't work for me
(...)
3. Fix remote client/web client password issue.
(...)


(1) This is the init script that I'm using: https://raspberrypi.stackexchange.com/questions/7120/deluge-have-no-init-scripts
Working fine so far...
(3) The configuration details for deluge are stored either in $HOME/.config/deluge (user-specific settings) or in /var/lib/deluge/.config/deluge/ (system-wide settings):

Code: [Select]
$ ls ~/.config/deluge
auth        files_tab.state  ipc              state
core.conf   gtkui.conf       peers_tab.state  tabs.state
core.conf~  gtkui.conf~      plugins          torrentview.state
dht.state   icons            session.state    ui.conf

$ sudo ls /var/lib/deluge/.config/deluge/
auth  blocklist.cache  blocklist.conf  blocklist.conf~ core.conf  core.conf~  deluged.pid  dht.state  icons  plugins  session.state  ssl  state  web.conf  web.conf~

With my specific installation /var/lib/deluge/.config/deluge/web.conf contains some SHA1 hash of my Deluge web password and the "salt" belonging to the hashed password.
The actual password is stored in /var/lib/deluge/.config/deluge/auth respectively in ~/.config/deluge/auth.

I 'd guess if you rename (mv) these files, they would be recreated / reinitialized. (Otherwise, just rename them back.) If memory serves, the default password for the web UI used to be "deluge".

I'd really like to set this up so I can control it via the web interface remotely. Still need to look into how to do that and if it's secure.

Although this wiki page is for a different distribution (Arch Linux) the port related information also applies to Debian.
https://wiki.archlinux.org/index.php/deluge

The relevant ports are 56881 through 56889 for TCP and UDP (for seeding), 58846 (for remote access to the tracker) and 8112 for the web interface.
So you would have to enable them in your firewall / router config and in the IP package filter (e.g. iptables and ip6tables).
CAVEAT: It's easy to shoot yourself in the foot, if you have no clue about iptables. So, please be careful, and test your rules first before applying them permanently.

E.g.: Assuming you're dropping all incoming traffic by default and accept all forwards and outgoing traffic,
the corresponding rules in /etc/network/iptables would look as follows:

Code: [Select]
-A INPUT -p tcp -m tcp --dport 56881:56889 -j ACCEPT
-A INPUT -p udp -m udp --dport 56881:56889 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 58846 -j ACCEPT
-A INPUT -p tcp -m multiport --dports 8112 -m state --state NEW,ESTABLISHED -j ACCEPT

There are a lot of additional procedures for hardening your Raspberry Pi:

Probably worth reading: https://raspberrypi.stackexchange.com/questions/1247/what-should-be-done-to-secure-raspberry-pi
There's also a free security auditing tool named Lynis (https://cisofy.com/lynis/) which might help you identify further security issues. N.B.: Not all of its recommendations can be applied to a Raspberry PI, so take its recommendations with a pinch of salt.
« Last Edit: February 06, 2016, 08:25:26 AM by if_then_else »

Offline rastasean

  • in paradise
  • Trade Count: (23)
  • Needs to get out more...
  • *****
  • Posts: 3699
  • Gender: Male
Re: Raspberry Pi 2 seedbox...
« Reply #6 on: February 18, 2016, 07:03:57 PM »
Nice writeup!

I used https://github.com/rakshasa/rtorrent in the past (not on the pi) and it was managed via web browser. With this, you won't need VNC or a desktop running on the pi.
Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than it’s worth.

 

RSS | Mobile
Page created in 0.081 seconds with 31 queries.
© 2002-2024 Taperssection.com
Powered by SMF