![]() |
|
Headless torrent box - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PINE A64(+) (https://forum.pine64.org/forumdisplay.php?fid=4) +--- Forum: Pine A64 Projects, Ideas and Tutorials (https://forum.pine64.org/forumdisplay.php?fid=19) +--- Thread: Headless torrent box (/showthread.php?tid=1167) |
Headless torrent box - wahdooyah - 05-25-2016 This is a very simple use and in no way original, but I thought I'd share it anyhow since it doesn't require very complex setup. You'll need one or more Android phones/tablets to control the setup, too. Starting with any Debian image, SSH in and install deluge, deluged, and deluge-web: Code: sudo apt-get install deluge deluged deluge-webI followed these instructions in relevant part, specifically: Code: #create a user to run the daemon
sudo adduser --system --gecos "Deluge Service" --disabled-password --group --home /var/lib/deluge deluge
#add your own user to the deluge group (change user name as needed)
sudo adduser debian deluge
#create a script for the daemon
sudo nano /etc/systemd/system/deluged.service
#enter the following in that script
[Unit]
Description=Deluge Bittorrent Client Daemon
After=network-online.target
[Service]
Type=simple
User=deluge
Group=deluge
UMask=007
ExecStart=/usr/bin/deluged -d
Restart=on-failure
TimeoutStopSec=300
[Install]
WantedBy=multi-user.target
#create web service script
sudo nano /etc/systemd/system/deluge-web.service
#containing
[Unit]
Description=Deluge Bittorrent Client Web Interface
After=network-online.target
[Service]
Type=simple
User=deluge
Group=deluge
UMask=027
ExecStart=/usr/bin/deluge-web
Restart=on-failure
[Install]
WantedBy=multi-user.target
#start each service, confirm it's running, and set to autostart
sudo systemctl start deluged
sudo systemctl status deluged
sudo systemctl enable deluged
sudo systemctl start deluge-web
sudo systemctl status deluge-web
sudo systemctl enable deluge-webNow, the torrent box is up and running! But, you have no way to add torrents, and when you do they're being saved on your microSD card, which isn't great for the card's longterm survival. My solution to the latter is a samba share, since my wireless router lets me plug in any USB drive as a samba share. So, we'll need to install cifs-utils: Code: sudo apt-get install cifs-utilsCreate a directory for mounting it and change ownership to the deluge user: Code: sudo mkdir /mnt/fetched
sudo chown deluge:deluge /mnt/fetchedThen set the samba share to mount on boot. : Code: sudo nano /etc/fstab
#Add this line, modifying as needed
//192.168.0.1/Shared_Drive/Uploads /mnt/fetched cifs guest,uid=122,gid=128,iocharset=utf8,sec=ntlm 0
0Next, the deluge settings need to be tweaked a bit, which means shutting down the services: Code: sudo systemctl stop deluged
sudo systemctl stop deluge-webNext, open the daemon config for editing. This will require either a chown or sudo since it's only accessible to the deluge user: Code: sudo nano /var/lib/deluge/.config/deluge/core.confThis is the line you're looking for, and change it to where your drive is mounted: Code: "download_location": "/mnt/fetched",Next, open web.conf and set the default daemon: Code: sudo nano /var/lib/deluge/.config/deluge/web.conf
#change this line
"default_daemon": "127.0.0.1:58846",That's all for tonight, I'll explain how to set up Transdroid and BubbleUPnP tomorrow, though it's pretty straightforward. RE: Headless torrent box - wahdooyah - 05-26-2016 After a system reboot, check that both services started: Code: sudo systemctl status deluged
sudo systemctl status deluge-web Next from any other computer or device on the network, browse to the IP address of your Pine box on port 8112. You should be prompted for the web password (default is "deluge"), then prompted to change it (do that). Pick any Android device to be your controller, install Transdroid (either using f-droid or directly from the apk) and the Transdroid Torrent Search plugin (f-droid or here). Run the main app, then menu-->settings-->add new server-->add normal, custom server followed by server type-->Deluge 1.2+, select Deluge web password then enter the password you just created, and enter the IP address of the Pine box. You can now search for torrents in Transdroid (or in the browser, since it registers itself with the OS for for magnet links), and they will be downloaded by the Pine directly to your network folder. Install the app on as many phones/tablets as you want, they all share the same download queue! My router allows me to share the same network drive as a DLNA server, so that means the download is also available to stream to smart TVs, or via the Android app BubbleUPnP (to a Chromecast perhaps?), etc. If your router doesn't do that, I'm sure the Pine could handle that aspect too. RE: Headless torrent box - Luke - 05-27-2016 Neat. I did something similar a while ago but used transmission. That said, from your description, this looks more functional. Thank you for the guide RE: Headless torrent box - superboxf1 - 07-07-2016 Thanks for the share, i had a torrent box running on a plugcomputer. It would be great as you mentioned if this had a USB3.0 or SATA for better storage options. |