Run Transmission (bittorrent) on the Apple TV

appletv_transmission

Here is a little followup, on the “hacking the Apple TV” tutorial. In this tutorial I will explain how to run bittorrent on you Apple TV take 2. I will explain how to install transmission (bittorent client) on the Applet TV and run Clutch web-interface to control bittorrent from your browser.

What you need:
- An AppleTV with SSH enabled (check the previous tutorial)
- MAMP
- Transmission Bittorrent for Apple TV ( transmission 1.06 deamon and remote)
- Clutch

Step 1: Install Transmission

Download the Apple TV transmission Bittorrent files and unzip. Copy the two files on your AppleTV (using SSH or whatever else you want) in the /Users/frontrow directory .With the terminal SSH in to your Apple TV (ssh://forntrow@appletv.local pass: frontrow) in the terminal give the following command:

sudo chmod 755 transmission-*
sudo chown frontrow:frontrow transmission-*
Step 2: Install MAMP The second step is installing MAMP webserver (Mac Apache SQL PHP) Download MAMP and copy the MAMP folder on your AppleTV in the /Users/frontrow directory. With the terminal SSH in to your Apple TV (ssh://forntrow@appletv.local pass frontrow) in the terminal give the following command:
sudo ln -s /Users/frontrow/MAMP /Applications/MAMP

Step 3: Install Clutch
Uncompress the Clutch files. Save the file and copy the contents of the Clutch folder (not the folder itself) on your AppleTV in the /Users/frontrow/MAMP/htdocs directory. Give the command.

sudo chmod -R 775 /Users/frontrow/MAMP

Step 4: Make it work
To start Transmission Bittorrent and its interface when you boot your AppleTV (so it keeps working even after power failures) you should create two documents in the /System/Library/LaunchDaemons directory. Here are the necessary commands

sudo nano /System/Library/LaunchDaemons/apache.plist

This one creates a new file called apache.plist in the appropriate directory. Paste these rows inside:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Debug</key>
<true/>
<key>GroupName</key>
<string>frontrow</string>
<key>Label</key>
<string>org.apache.httpd</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/Users/frontrow/MAMP/bin/startApache.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceDescription</key>
<string>apache</string>
<key>UserName</key>
<string>frontrow</string>
<key>WorkingDirectory</key>
<string>/Users/frontrow/MAMP/</string>
</dict>
</plist>

Press Ctrl-O to save the file and then Ctrl-X to exit. Repeat for the second file:

sudo nano /System/Library/LaunchDaemons/transmission.plist

This is the text to paste inside:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Debug</key>
<true/>
<key>GroupName</key>
<string>frontrow</string>
<key>Label</key>
<string>org.m0k.transmission</string>
<key>OnDemand</key>
<false/>
<key>ProgramArguments</key>
<array>
<string>/Users/frontrow/transmission-daemon</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>ServiceDescription</key>
<string>transmission</string>
<key>UserName</key>
<string>frontrow</string>
<key>WorkingDirectory</key>
<string>/Users/frontrow/Library/Application Support/Transmission</string>
</dict>
</plist>

Reboot your AppleTV and check if Bittorrent on your AppleTV is working correctly by browsing to http://yourappletvipaddress:8888

Clutch

On the iphone:

clutch_iphone

With the preferences in Clutch you can Change the download directory of Bittorent, to your external drive for example ( /Volumes/nameofyourdrive )

Thats it, Cheers!


This entry was posted in Apple TV, Bittorrent and tagged , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

28 Comments

  1. 2manydjs
    Posted August 7, 2009 at 3:47 pm | Permalink

    I just use the Transmission.app and Clutch.app. That workes fine. (both are old versions compatible with older versions of 10.4)

  2. Ottawasurfer
    Posted August 10, 2009 at 3:30 am | Permalink

    First, thanks for all you great work on this. I love the idea of being able to torrent via my ATV.

    I have followed the instructions and all seemed well until I opened clutch in the web browser. I get a “Daemon Error” “The transmission daemon does not appear to be running”.

    Did I miss something perhaps?

    BTW, controlling Clutch via the iphone is great!

  3. newbie
    Posted August 10, 2009 at 10:20 am | Permalink

    I could have signed the previous post myself. Both for the appreciation and the problem.

    I got around it starting the daemon manually with
    transmission-daemon -s /tmp/transmission-socket

    and got clutch to work after that. There seems to be some problem in the startup that I cannot figure out how to solve…

    thanks for any guidance here!

  4. Posted August 10, 2009 at 10:31 am | Permalink

    Sorry you guys,

    I think I solved the problem. I forgot to update the Clutch socket.txt file!
    Go to the Cutch folder > remote > data en open socket.txt. Remove al content and place this code: /Users/frontrow/Library/Application Support/Transmission/daemon/socket

    Update: I have updated the clutch.zip file

  5. Posted August 14, 2009 at 8:31 pm | Permalink

    I have the same problem Newbie had, and tried his suggestion ( run the following: transmission-daemon -s /tmp/transmission-socket ), but still it doesn’t work and I get the message: “The Transmission daemon does not appear to be running.”

  6. Savas
    Posted August 16, 2009 at 9:43 am | Permalink

    Hi guys,

    I’ve tried installing it twice and even factory reset the Apple TV

    I think the torrents are downloading, but the Clutch web interface is blank (no torrents shown). Any ideas?

  7. Chris
    Posted August 18, 2009 at 9:32 pm | Permalink

    Thanks I now have this working – much easier than getting it going on my Western Digital MyBook.

    I wanted to know if configuration could be changed for the ports that clutch runs on, as well as the port used by transmission and the enabling of security for transmission/clutch. I have read elsewhere that a “settings.json” file is used for these things but cannot locate this file on my apple tv.

    Thanks.

  8. Posted August 19, 2009 at 12:08 pm | Permalink

    For those still having trouble applying this hack try: http://wiki.awkwardtv.org/wiki/Transmission_on_AppleTV

  9. Posted August 20, 2009 at 1:44 pm | Permalink

    Hi Danny!
    Great job! I have posted it on appletvhacks.net
    Many thanks! Looking forward to see your new hacks and tutorials!:)
    Best,
    Tomek

  10. Waldorf
    Posted August 21, 2009 at 9:12 pm | Permalink

    Seems a bit odd to me. Are you using an ancient verion of Transmission? Transmission has (for some time now) a build in webui, and no longer need (nor won’t work out of the box with) an external web server. Also it has an iPhone optimised interface!

    Anyway, if you’d like to chat, jump into the Transmission irc channel!

  11. Posted August 25, 2009 at 11:20 am | Permalink

    @Waldorf Which version of Transmission are yo using? The Apple TV runs on a stripped down version of OSX 10.4!
    I have tested newer versions but they didn’t run on the Apple TV.

  12. Alex
    Posted August 29, 2009 at 10:24 pm | Permalink

    Hi, great tutorial :)

    Just one little question… As soon as I put 10+ big torrents (let’s say 10 files, 10 gb each), the web interface stops working… I think the daemon continues to run, because I can see it with ‘ps Au’, but he seems to be doing nothing (the ‘ls -lAh’ on the files shows that last modified doesn’t change)…

    Is this normal (due to the heavy processing needed to hash, verify, etc), or not ?

    Regards

  13. David
    Posted August 30, 2009 at 11:47 am | Permalink

    Dear Dany – first of all thanks a lot for this tutorial – running BT on an AppleTV is a dream becaming real!

    Please note that in your tutorial you did a writing mistake, you write:
    ssh://forntrow@appletv.local pass: frontrow
    look the word forntrow@ instead of frontrow (only a printing mistake)

    I have a problem, I try to follow all the steps and I was not able to let it works. I check on http://wiki.awkwardtv.org/wiki/Transmission_on_AppleTV and I read a way to check if everything is running correct:
    I typed: /Users/frontrow/transmission-daemon -d
    and I get as a reply “Transmission 1.06 (5129) started”
    then I typed /Users/frontrow/MAMP/bin/startApache.sh
    and i get as a reply ” Referenced from: /Applications/MAMP/Library/bin/httpd
    Reason: image not found
    /Applications/MAMP/Library/bin/apachectl: line 100: 174 Trace/BPT trap $HTTPD -k $ARGV”
    I try also to istall an older versione of MAMP but I get the same problem
    Any suggestion?
    Thanks in advance.

  14. David
    Posted August 30, 2009 at 11:53 am | Permalink

    I make an error by pasting the problem, when I typed /Users/frontrow/MAMP/bin/startApache.sh

    I get

    dyld: Library not loaded: /Applications/MAMP/Library/lib/libaprutil-0.0.dylib
    Referenced from: /Applications/MAMP/Library/bin/httpd
    Reason: image not found
    /Applications/MAMP/Library/bin/apachectl: line 100: 174 Trace/BPT trap $HTTPD -k $ARGV

  15. Alexis
    Posted September 11, 2009 at 10:06 pm | Permalink

    I’m having trouble getting Transmission to send the completed file to my time capsule. I have the TC USB into the atv. I also set up the TC as an smb share on Boxee (also running on the appletv). I tried the /Volumes change as suggested above but it didn’t work. I tried to use the IP address just like the Boxee uses but that didn’t work either. I think it’s redundant to download a file at 500+ kb/s and then use cyberduck to transfer it to my timecapsule at 300-500 kb/s. It’s like downloading it twice. The reason I decided to do this was so that I didn’t waste processor speed or bandwidth on my MBP downloading and I leave the atv on 24/7.

    Please advise how I can get this done, this would complete my atv media center.

    If anyone knows, please help

  16. Brian H
    Posted September 13, 2009 at 5:26 am | Permalink

    Danny,

    Thanks for the help. I am having trouble like a few others and would love to get this running. I have transmission running, but Apache is giving me headaches…any thoughts?

    -bash-2.05b$ /Users/frontrow/MAMP/bin/startApache.sh
    dyld: Library not loaded: /Applications/MAMP/Library/lib/libaprutil-0.0.dylib
    Referenced from: /Applications/MAMP/Library/bin/httpd
    Reason: no suitable image found. Did find:
    /Applications/MAMP/Library/lib/libaprutil-0.0.dylib: file to short
    /Applications/MAMP/Library/lib/libaprutil-0.0.dylib: file to short
    /Applications/MAMP/Library/bin/apachectl: line 100: 280 Trace/BPT trap $HTTPD -k $ARGV

  17. SpyroGyro
    Posted September 22, 2009 at 4:20 am | Permalink

    Is there a way to watch for torrents and automatically add them to my AppleTV’s Tranmission Client?

    I want to create Fluid Web App’s for Demonoid, Pirate bay and EZTV and automate the the process for adding new torrents.

    I was also considering Folder Actions but I’m not sure if that is possible on the AppleTV.

    Anyone?

  18. ErManitu
    Posted September 25, 2009 at 7:03 pm | Permalink

    I have the same problem that David and Brian.

    -bash-2.05b$ /Users/frontrow/MAMP/bin/startApache.sh
    dyld: Library not loaded: /Applications/MAMP/Library/lib/libaprutil-0.0.dylib
    Referenced from: /Applications/MAMP/Library/bin/httpd
    Reason: no suitable image found. Did find:
    /Applications/MAMP/Library/lib/libaprutil-0.0.dylib: file to short
    /Applications/MAMP/Library/lib/libaprutil-0.0.dylib: file to short
    /Applications/MAMP/Library/bin/apachectl: line 100: 255 Trace/BPT trap $HTTPD -k $ARGV

    I tried several MAMP versions (1.8.2, 1.7.2 and 1.4.1), without chance.

    Someone resolved this problem?

    Tnkx.

  19. Sauriel
    Posted October 9, 2009 at 9:51 pm | Permalink

    I have the same problem like many others.

    Once I type:
    “/Users/frontrow/MAMP/bin/startApache.sh”

    I get the following error:

    dyld: Library not loaded: /Applications/MAMP/Library/lib/libaprutil-0.0.dylib
      Referenced from: /Applications/MAMP/Library/bin/httpd
      Reason: no suitable image found.  Did find:
            /Applications/MAMP/Library/lib/libaprutil-0.0.dylib: file to short
            /Applications/MAMP/Library/lib/libaprutil-0.0.dylib: file to short
    /Applications/MAMP/Library/bin/apachectl: line 102:   475 Trace/BPT trap          $HTTPD -k $ARGV
  20. Arjen
    Posted November 4, 2009 at 9:23 pm | Permalink

    Hi Danny,
    Thanks for the great howto! I have exactly the same problem as Brian H with Apache. The Transmission deamon starts automagically after reboot so the rest seems to be working OK.
    Would much appreciate any feebback on the Apache hickup.
    Best regards,
    Arjen

  21. Ray
    Posted November 9, 2009 at 10:40 pm | Permalink

    Is there a resolution to this issue?

    -bash-2.05b$ /Users/frontrow/MAMP/bin/startApache.sh
    dyld: Library not loaded: /Applications/MAMP/Library/lib/libaprutil-0.0.dylib
    Referenced from: /Applications/MAMP/Library/bin/httpd
    Reason: no suitable image found. Did find:
    /Applications/MAMP/Library/lib/libaprutil-0.0.dylib: file to short
    /Applications/MAMP/Library/lib/libaprutil-0.0.dylib: file to short
    /Applications/MAMP/Library/bin/apachectl: line 100: 280 Trace/BPT trap $HTTPD -k $ARGV

  22. Posted November 11, 2009 at 6:36 pm | Permalink

    Hello all,

    I have a statically-linked version of 1.51 working. This does away with the need for a stand-alone Apache server and allows you to use a version of Transmission which is a bit newer. I am still working on getting 1.6 or 1.7 working.

    1.51 is available on my blog.

  23. KT
    Posted November 13, 2009 at 3:12 am | Permalink

    When I try to execute this command, it say that the /Applications/MAMP is read-only, can anybody help me on that
    sudo ln -s /Users/frontrow/MAMP /Applications/MAMP

  24. Posted November 15, 2009 at 6:59 pm | Permalink

    This doesn’t work with Apple TV 3.0 =(

  25. Reinis
    Posted December 2, 2009 at 1:26 am | Permalink

    Hi, Danny!

    I have a question/suggestion:
    Do you think it is possible to combine Transmission together with Automatic (http://codingcurious.com/automatic/) so the torrents would download automatically? For instance, a new TV Show’s episode is published on torrent site and it automatically starts downloading to my Apple TV? I have currently this set up on my Mac OS X 10.6.2, but I would love to see this on my Apple TV!

    What do you think?

  26. Posted December 13, 2009 at 2:38 pm | Permalink

    This Tutorial totally rocks!
    Thanks man, it works like a charm!
    Peace!

  27. Anonio
    Posted December 16, 2009 at 5:24 pm | Permalink

    Im stuck in step 1

    I copied transmission-daemon and transmission-remote to /Users/frontrow directory via Transmit,
    then I run the command in terminal:

    sudo chmod 755 transmission-*

    and it returned:

    chmod: transmission-*: No such file or directory

    the same occurs when I type the second command

    what I did wrong?

    Thanks

  28. Posted December 20, 2009 at 1:53 pm | Permalink

    How do I restart the service if the “server” is down?
    Do I need to reboot my ATV or is there a terminal solution to get the service going again?
    Thanks for Help!

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>