1. PREREQUISITES
As a prerequisite of this article, please complete the steps described in my previous post here in order to prepare your Pogoplug so you can install packages using the IPKG package management system.
2. INSTALLING THE BITTORRENT PACKAGE
To install the Transmission BitTorrent client, SSH to your Pogoplug and perform the following:
# install transmission /opt/bin/ipkg install transmission # start transmission in order to generate a default configuration file /opt/bin/transmission-daemon # stop the transmission process killall transmission-daemon # make a new configuration directory to hold the transmission configuration files mkdir /opt/config # move the freshly generated transmission configuration files off of the main flash drive and onto the spare flash drive mv /root/.config/transmission-daemon /opt/config/ # move into the transmission configuration directory cd /opt/config/transmission-daemon/ # backup the generated configuration file cp settings.json settings.json.backup
3. CONFIGURING THE BITTORENT CLIENT
At this point, the Transmission BitTorrent client is installed on your Pogoplug, congratulations! Now we need to decide on a location for torrents to be downloaded to. To do this, perform the following (in a terminal session):
# Display disk usage df -hand observe the output. This command lists hard drives connected to the Pogoplug, as well as any mounted internal flash drives. You can choose any drive to download to, but I would advise a connected USB hard drive to prevent unnecessary reading of the flash drive, and also help prevent filling up the internal flash drives (which can lead to boot problems).
Anyway, you should see something similar to this:
-bash-3.2# df -h Filesystem Size Used Available Use% Mounted on /dev/mtdblock2 32.0M 14.4M 17.6M 45% / none 125.0M 3.2M 121.8M 3% /tmp /tmp/.cemnt/sda1 916.9G 435.1G 472.5G 48% /tmp/.cemnt/mnt_sda1 /dev/mtdblock3 91.0M 14.7M 76.3M 16% /opt
The USB drives connected to your pogo plug will be mounted under "/tmp/.cemnt/". In my case, I chose the following destination folder (which already existed on my Pogoplug):
/tmp/.cemnt/mnt_sda1/My Documents/Downloads/
Now we will update the Transmission configuration file to use our selected directory. To edit the file, enter the following:
# Enter a text editor to edit Transmissions settings. vi /opt/config/transmission-daemon/settings.jsonYou will need to update the following keys with your selected download directory: "download-dir", "incomplete-dir".
4. RUNNING THE BITTORENT CLIENT
To start the BitTorrent client, run the following:
You should now be able to access the web interface for the BitTorrent client by entering the following into a browser on a device in the same local network as your Pogoplug:
http://pogoplug:9091/transmission/web/
Replacing "pogoplug" with the IP address/domain name of your Pogoplug device.
Your Pogoplug is now running a BitTorrent client :)
UPDATE: See my new post on how to allow for adding new torrent files from the my.pogoplug.com website :)
# Start the Transmission client, pointing the application to the custom configuration directory /opt/bin/transmission-daemon --config-dir /opt/config/transmission-daemon/
You should now be able to access the web interface for the BitTorrent client by entering the following into a browser on a device in the same local network as your Pogoplug:
http://pogoplug:9091/transmission/web/
Replacing "pogoplug" with the IP address/domain name of your Pogoplug device.
Your Pogoplug is now running a BitTorrent client :)
UPDATE: See my new post on how to allow for adding new torrent files from the my.pogoplug.com website :)
thanks thanks!
ReplyDeleteniceeee :)
ReplyDeleteHi,
ReplyDeleteI was doing ok until the vi /opt/config/transmission-daemon/settings.json bit and then I don't know what to do. I had to close putty to get out of it.
Ben
Great! Must know some SSH to do this correctly. Also, is Transmission-daemon set to start automatically on reboot? Please advise. Thanks!
ReplyDeleteZac
bestbusinesses@gmail.com
Hi Ben,
ReplyDeleteVi is a text editor. It can take a little while to learn how to use, mainly due to the fact that it is controlled entirely by keyboard commands. However, if you are interested in spending the time learning how to use it, you will (hopefully) find that it is incredibly fast to write with.
There are plenty of online tutorials; Google "vi tutorial" or take a look here http://www.unix-manuals.com/tutorials/vi/vi-in-10-1.html.
Alternatively, if you do not wish to learn how to use Vi, you can run the following on your Pogoplug to install a different (and probably more straight-forward for beginners) text-editor, Nano:
/opt/bin/ipkg install nano
Then you can edit the Transmission config file using:
/opt/config/transmission-daemon/settings.json
Hope that helps :)
Aaron
Hi Zac,
ReplyDeleteTransmission-daemon will not start automatically after rebooting. However, you have a couple of options to achieve this:
OPTION 1: Create a bash script to start your manually installed services. Something like:
# Create a startup script
touch /etc/startup.sh
# Edit the startup script
vi /etc/startup.sh
Then you could add the following to the startup.sh contents:
# Mount the spare internal flash drive
mount -o remount,rw /
mount /dev/mtdblock3 /opt
# Start the Transmission daemon
/opt/bin/transmission-daemon --config-dir /opt/config/transmission-daemon/
After each reboot you would simply SSH onto the Pogoplug and run the following:
/etc/startup.sh
OPTION 2: (NOT RECOMMENDED) Edit the startup bash script, found at "/etc/init.d/rcS". You could add the contents of startup.sh (above) into this script, then your services will start automatically when the Pogoplug boots.
I don't recommend this method - if you make a typo in the rcS file, you could find that your Pogoplug will not boot.
Based on how often you need to reboot your Pogoplug (I'm guessing not that often?), I would go with the first suggestion.
Kind regards,
Aaron
I found one error with the above instructions on the startup.sh file. I found that in order to overcome the permission denied error I had to use:
Deletechmod 755 startup.sh
I also found that after I had tested it a few times and was confident, I took a chance on adding it to the rcS file and it works like a charm.
thank you ever so kindly for the instructions.
This guide works like a dream. I know almost nothing about Unix/Linux, other than a few vi commands.
ReplyDeleteMy next challenge is to get Samba running. Are you still going to tackle this at some point, and do you think it should be possible without installing something like openpogo?
Once again, thanks for your work so far, and I'll be following your updates closely now :-)
Andy Bailey
Hi Andy,
ReplyDeleteThanks for the positive feedback :)
I certainly will create a blog post for Samba setup, and you can definitely install Samba on the Pogoplug without OpenPogo (this is exactly what I've done).
The Samba install/setup is very straightforward, I'll do my best to get a post out in the next day or two.
Cheers,
Aaron
Hi Andy,
ReplyDeletePlease see the following post for instructions on installing Samba on the Pogoplug. Let me know how it goes :)
http://aaronrandall.blogspot.com/2011/10/installing-samba-on-pogoplug.html
Aaron,
ReplyDeleteThe Samba installation works like a dream. It's a much better way of connecting than using the Pogoplug application. Thank you.
I only have one other question:
In one of your replies, you recommended the use of a bash file (/etc/startup.sh) to restart Transmission. I've used that file, and also added a line to start Samba.
I went one step further, and added /etc/startup.sh to the end of the /etc/init.d/rcS file, with the intention of starting the applications automatically, but avoiding the chance of typos.
Doing it this way starts Samba with no problems, but Transmission always fails - it's running, but if I check using a web browser, it gives a message against each torrent stating that the download directory can't be found. If I restart Transmission that all is fine. Equally, if I remove the line from /etc/init.d/rcS and run it from putty, it works that way too.
Am I missing something here? I wondered whether the Pogoplug took a while to re-map the drives, so at the time of launching Transmission the download directory wasn't available. As I said before, I don't really know Linux, so don't want to mess anything up. I just thought it would be easy to get everything to start as soon as power was restored. Any ideas?
Again, many thanks for your postings, they've been a great help.
Andy Bailey
Andy,
ReplyDeleteUnfortunately I'm not using the rcS file (out of fear of bricking my device), so I can't test this issue. However, it may be an idea to post to the Pogoplug forums to see if anyone can help you there.
It looks like this post also describes the issue where drives aren't mounted while the rcS file is running:
http://goo.gl/6b4qu
Sorry I can't be of more help. If you find a solution please post it back here :)
Kind regards,
Aaron
Heyyyy greaaaaat Aaron, thanks :)
ReplyDeleteSo far I thought I had to install some OpenPogo to use extra features (1st one was torrent client; 2nd one would be the ability to use attached drive as any other network drive, through SMB for ex.)
Btw, could you give me any idea on how to mount a network drive onto the pogo? On the same network I have a drive accessible through SMB?
Huge thanks in advance!
Bruno
PS: I'll have a look on how to restart all services when device reboots (mine is not so stable: have to reboot it 2 to 3 times a week)
update: to use USB attached drive on the network, I found how to and installed SMB server.
ReplyDeleteTo mount SMB disk, it seems more tricky: you need to install SMB client and it's getting more complicated... but I'll try ;p
Hi Bruno,
ReplyDeleteGlad to hear you found the post useful!
Apologies for the delay in replying, I've been without Internet access for a few days while it's being upgraded, and will be offline for a few more (sending this from my phone).
I can check once I'm back online, but I believe that I've accomplished something similar using "smbmount". It might be worth looking through the Ipkg package list for "smbmount" or "smbfs".
Let me know how it goes :)
Aaron
Hi Aaron!
ReplyDeleteThanks for you kind feedback :)
In fact, I gave up with the SMB mounting: I finally attached the other drive to the Pogoplug. In my config that was simplier.
First I have to say that SMB server + bittorrent server were running fine while pogoplug services were still available.
Now I have a problem. Today I had to reboot the PP because PP services were not available anymore (orange light): this used to happen many times a week (what make me say that PP is not really a stable device/service), so it didn't surprise me. But after having rebooted, my drives were not mounting anymore, in the PP app, but in fact on the system itself (df -h gives me none of my 2 disks). But when I check with "cat/proc/scsi/scsi", then I can see my drives.
I'm now looking about that issue and trying to find a way to create a script or sthg to auto-mount the disks and to start the 2 servers. Help would be appreciated :-p
Take care,
Bruno
Hi Bruno,
ReplyDeleteThe standard Pogoplug services should take care of mounting your drives for you - I'm not sure that mounting them yourself will solve the issue.
Have you considered requesting a replacement Pogoplug? If your device is within a year of purchase, you're probably entitled to a replacement under warranty. Maybe a new device will be more stable (my Pogoplug does not need rebooting, it "just works").
I would suggest an email to support@pogoplug.com, they seem pretty responsive.
Let me know how it goes.
Aaron
Hi Aaron,
ReplyDeleteI am getting this error after the install "Error:
Unable to save resume file: Read-only file system
"
Any suggestions?
Thanks in advance.
David
Hi David,
DeleteI have a few questions for you which may help us to resolve this issue:
What Pogoplug version do you have?
What user are you SSHd to the Pogoplug as? (root?).
Did you remember to remount the root disk with read-write permissions? ("mount -o remount,rw /").
Are you definitely starting the Transmission Daemon with the custom config path? ("/opt/bin/transmission-daemon --config-dir /opt/config/transmission-daemon/).
Cheers,
Aaron
Hey Aaron. Everything seemed to go just fine in this tutorial except after all said and done and i go to the website it only shows me this...
ReplyDelete403: Forbidden
Unauthorized IP Address.
Either disable the IP address whitelist or add your address to it.
If you're editing settings.json, see the 'rpc-whitelist' and 'rpc-whitelist-enabled' entries.
If you're still using ACLs, use a whitelist instead. See the transmission-daemon manpage for details.
I vi back to the file and it says nothing about whitelists. Any thoughts? Thanks for all your help.
Ok so it looks like I got transmission working from playing in vi. I have posted some questions on this post and on your samba post that i am still unsure of though! Thanks in advance.
ReplyDelete-Danny
Aaron, I too had this issue and it has semi-morfed into a different one :P I realized that in my.pogoplug.com there was a blue exclamation mark next to my drive that said it was ejected improperly. I followed the steps in correcting it. After that I was fine. I could see my drives using df -h, I could even create folders and move things around on my computer. But now my issue is, every time I launch transmission, it freezes. The torrents in transmission freeze and don't progress. Trying to ssh into the device freezes and the only option is to pull the plug to eliminate power to the pp. I have started the Daemon, I can access transmission via website and add a torrent, but after seconds of the torrent being started, everything comes to a screeching halt. Any suggestions?
ReplyDelete(Hopefully I have answered Davids question as it seems that was my initial issue as well. Running disk utility on my mac and reinserting the drive into the PP worked for that)
Thanks again,
Danny
PS. All of your tips on the SAMBA page have worked great. All i need now is to button up this transmission business!
Hi Dan-I-el,
DeleteGreat news you managed to find the solution to your HD issues.
With regards to Transmission crashing, perhaps you could try running the Transmission daemon with debug output, that might give a clue to what is causing it to freeze.
Try starting Transmission with the following:
/opt/bin/transmission-daemon --config-dir /opt/config/transmission-daemon/ --log-debug
Then with a terminal open, access the Transmission webpage and try and start a torrent. Report back here with the debug output (copy and paste it from the terminal) and I'll see if I can help you resolve this issue :)
Regards,
Aaron
Aaron, great post. But some clarification please... I have a Pogoplug Pro (the one with wifi) and want to use it both as a Pogoplug device and a bittorrent client. Is that possible by the method you've described above?
ReplyDeleteWhat's confusing me is that most tutorials online talk about installing OpenPogo (or it's new avatar, the ArchLinuxARM) and completely replacing Pogoplug functionality (like streaming to PS3 and using the iOS app to access the pogoplug), while your tutorial doesn't say anything about loosing the pogoplug basic OS.
Can you please explain?
Hi Nitin,
DeleteThe method I have described keeps all of the existing Pogoplug functionality intact, so you can continue to use the streaming to PS3 and iOS app alongside the Transmission server. I haven't tested these steps on a Pogoplug Pro so I can't comment on whether they will work with that particular model.
Let me know how it goes :)
Aaron
Hi Aaron,
ReplyDeletethanks for your posts, with your instructions everything works very well! :-)
Right now I'm adding more and more packages to my Pogoplug Pro and do some testing with a .sh startup script. But I don't want to log in manually everytime to launch this one cause my Pogoplug doesn't stay on all the times... On the other side, I don't want to modify the rcS-file too much. Is it possible to just add the line with the startup-script to the rcS-file? So I could work out eveything until it's "perfect" and then just add one single line and I'm done :-)
And if I mess up that rcS file, is there a way of restoring it?
Thanks for your help! :-)
Hi Achim,
DeleteAs you say, you can create and test the script before integrating it with your rcS file - sounds like a good idea :)
Then when you are happy, simple add a single line to run that script at the end of your rcS file. Make sure that the script exists under the root ("/") and not on /opt/ (as "opt" won't necessarily exist straight away).
With regards to restoring the rcS file, I suggest that you take a backup of the file before modifying. If something goes wrong but your Pogoplug isn't broken enough to prevent SSH access, then you'll be able to restore from backup. Personally, I haven't required the need to modify the rcS file (as I very rarely reboot), however it appears that other users (see comments above) have successfully used the startup.sh script I recommended from within their rcS file, so hopefully you should be ok.
Let me know how it goes :)
Aaron
Hi Aaron
DeleteI just tested it as mentioned above and it works great :-) no hassle with that rcS-file, I think starting the script on the last line is the safest way.
So now I'm totally happy with this thing as I can just turn the power on in the morning, send some torrent-files to it (using my phone) and come back in the evening with a bunch of new stuff :-)
Thanks again for your great blog!
Great stuff Achim, glad to hear it! And thanks for reporting back :)
DeleteAny new questions or comments, please head over to my new blog:
http://aaronrandall.com/blog/
And for this post in particular:
http://aaronrandall.com/blog/installing-a-bittorrent-client-on-the-pogoplug/
Take care,
Aaron
I have a pogoplug series 4 and when I did the optware install on a usb drive, ipkg works, installs transmission, but when I go to start transmission-daemon, nothing happens, no error, nothing...then I do a ps -a and a netstat to see if it's running, it is NOT. the settings.json file is there but isn't automatically created since the daemon won't run, but gives no errors.
ReplyDeleteHi Aaron. I've gotten an amazing SMB server running thanks to you, but I've been seeing consistent issues when running transmission. Sometimes it works great, but other times it crashes the SMB server, and pogoplug services at first download. The torrent url works, the download folders are all set appropriately, but for some reason Transmission keeps causing a crash. If you have any ideas on troubleshooting these issues I'm all ears and would love to work through them. I've had Transmission and the Upload watch folder trick working and it's awesome and would love to get them working for the long haul.
ReplyDelete