Wednesday, 15 April 2009

FreeNAS - Transmission and Windows Remote Client

I've been playing around with FreeNAS for some time now and have migrated an old Debian server over to FreeNAS in order to make things easier for the non-linux members of our team.

The server hosts all the deployment images for our lab workstations amoung other non-sensitive data. The images are deployed via pxe. more on that to follow in another post.

I recently looked at the BitTorrent service which seems like a good idea. All your torrents are controlled and downloaded to centeral location. Ideal in a lab environment. Downloading the latest version of Ubuntu or OpenOffice is now as simple as dropping the .torrent file in to shared directory and letting FreeNAS take care of the rest.

The majority of the lab workstations are Windows box's so I went to the Transmission website to download the Windows remote client. It was then that I found that Transmission do not have a Windows client.

A few google minutes later I find transmission-remote-dotnet on the google code page. I installed it, configured it to connect to the FreeNAS server and now have it running without any issues on a test machine.

8 comments:

  1. When you say that you "drop the .torrent file in to a shared directory" and FreeNAS takes care of the rest, what do you mean?

    I always add .torrent files via the Transmission Web Interface but it would be convenient if I could just drop them into the proper "torrents" folder in the configuration folder for Transmission. I attempted this before but I do not think it was successful because of permissions on the files, but I could be mistaken.


    Help?

    ReplyDelete
  2. Hi,

    I've setup a cron job that runs a script written by paul_stead over at the FreeNAS every 10mins. Since the cron daemon "wakes up" every minute and checks the crontabs I find this works well in a large multi-user environment. You can also set it to run every minute if you want / need near realtime starting of a torrent download. I have also shared out the "/path/to/torrents/" folder identified in the script. This allows users to "drop" a torrent file into this folder, the cron job then checks the folder and sends the torrent file to Transmission.

    Hope this helps you out.

    Original Post Here:
    http://apps.sourceforge.net/phpbb/freenas/viewtopic.php?f=12&t=324

    ## Script Start ##

    #!/bin/bash

    for file in /path/to/torrents/*.torrent

    do
    if [ "$file" != "/path/to/torrents/*.torrent" ]; then
    echo [`date`] "$file" added to queue. » /var/log/toradd.log
    /usr/local/bin/transmission-remote -n ADMIN:PASSWORD -a "$file"
    rm "$file"
    sleep 1
    fi
    done

    ## Script End ##

    ReplyDelete
  3. Thank you for the response... I figured you were either "monitoring" the folder via a cron script or something along those lines.

    I have found that with the most recent version of Transmission it is possible to simply drop files into the Transmission config directory where the .torrent files get uploaded (/path/to/config/torrents).

    Transmission then added them to the queue and starts them (if you have the preference enabled to start when a torrent is added).

    I have not tested this enough, but I need to look into this more when dealing with permissions because I forget if the last time I did this required me to change the permissions on the .torrent file.

    Just a thought... because if it works then you could eliminate a cron job.

    ReplyDelete
  4. In response to bmcclure937, could you explain that in a bit more detail? I'm not able to upload a torrent file to that folder, because I only have read access (which I don't know how to change). And I'm not sure exactly which preference you are talking about that needs to be enabled. We are talking about the freenas version of transmission right? I'd really like to get this working, but I'm having a heck of a time!

    ReplyDelete
  5. What version of Transmission are you using? If it's available for your NAS I recommend you try the 1.60 beta or upgrade when it's released.

    Nice to hear my client works for you :) I released 3.7 a few days ago and it has a bunch of improvements especially if you're using 1.60.

    Alan (transmission-remote-dotnet maintainer)

    ReplyDelete
  6. Ryan,

    This may not be the most secure solution depending on your setup, but if you go to a shell prompt and run the following command without quotes.

    "chmod 777 -Rf /path/to/torrent/folder"

    This will give the "owner" the "group" and "everyone" read write and execute rights to the folder.

    Hope is helps you out.

    ReplyDelete
  7. Alan,

    My NAS box is running FreeBSD (FreeNAS.org) and I have just upgraded to transmission 1.60 and deployed 3.8 of your client to our lab workstations. Thanks for your work on the project.

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete