loading
Now that you've got your FreeNAS up and running and all that Internet bandwidth idling away. What would you do with it? Of course you want to maximize your machine. Instead of having your FreeNAS and Internet connection bandwidth idle during the night or if it is not sharing files across the network. Why not install a torrent client on your FreeNAS to download all of your favorite torrents. I assume that you already managed to accomplish the following:
1. FreeNAS installed on a USB flash drive.
2. Configured file shares.
3. Have SSH access to your FreeNAS.
4. Your FreeNAS box has Internet access.

Now, please do bear with me, as I'm not a Unix CLI guru. In fact, I still consider myself as a Linux CLI noob. Also, the steps in here is what worked with my system. I tested this on a virtual machine before installing it on a production FreeNAS.

My personal advice:
Install Transmission before using your FreeNAS for production, so when something f*ks up. No data will be lost. What I don't know if this will work with versions prior to 8.0.4.

Note: Execute the commands/edit texts in BOLD face. Text in BOLD are the ones essential in getting transmission installed. If you see commands that are not in BOLD, DO NOT EXECUTE IT. It's for explanatory purposes only.

Step 1: Open Your Favorite SSH Client

Open your favorite SSH client, in my case it's PuTTY. Then connect to your FreeNAS box. If you don't have PuTTY, you can download it here, http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Then, log-in as root.

Step 2: Create a Downloads Folder

Inside PuTTY create a 'Downloads' folder from one of your shares with the command:
mkdir /mnt/<path to your share>/Downloads

Note: the path that you see in Windows Explorer is not actually the path within the FreeNAS system. All volumes created within the WebGUI of freenas live inside the /mnt folder. If you want to see the volumes inside your FreeNAS:
cd /mnt
ls

Next, change the ownership of the Downloads folder with:
chown -R www:www /mnt/<path to your share>/Downloads

Step 3: Installing Transmission

In order for the install to survive reboots, we have to make the FreeNAS file-system writable:
mount -uw /
Then, install transmission:
pkg_add -r transmission-daemon

And hopefully you would get something like this:
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.2-release/Latest/transmission-daemon.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.2-release/All/transmission-web-2.13.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.2-release/All/ca_root_nss-3.12.6.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.2-release/All/curl-7.21.3.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.2-release/All/pkg-config-0.25_1.tbz... Done.
Fetching ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.2-release/All/libevent-1.4.14b_1.tbz... Done.
Added group "transmission".
Added user "transmission".

Then:
cp /usr/local/etc/rc.d/transmission /conf/base/etc/rc.d

Step 4: Edit /conf/base/etc/rc.conf and /conf/base/etc/rc.d/transmission

First we need to edit /conf/base/etc/rc.conf with the command:
nano /conf/base/etc/rc.conf
Scroll down until you reach the bottom, then append the following lines:
#transmission-daemon
transmission_enable="YES"

Then press CTRL+O then, ENTER to save it. Then exit with CTRL+X

Next:
nano /conf/base/etc/rc.d/transmission

Delete everything, press CTRL+K continuously to delete line after line. Copy-paste the text below(make sure to change the path that is in italics):
  #!/bin/sh

  # PROVIDE: transmission-daemon
  # REQUIRE: DAEMON
  #
  # Add the following lines to /etc/rc.conf.local or /etc/rc.conf
  # to enable transmission-daemon:
  #
  # transmission_enable="YES"
  # transmission_args=""
  # transmission_home="/var/transmission"
  # transmission_webhome="/usr/local/share/transmission/web"
  #

  . /etc/rc.subr

  name="transmission"
  rcvar=`set_rcvar`

  load_rc_config $name

  : ${transmission_enable:="NO"}
  : ${transmission_args:=""}
  : ${transmission_home:="/mnt/<path to your share>/Downloads"}
  : ${transmission_webhome:="/usr/local/share/transmission/web"}

  command="/usr/local/bin/${name}-daemon"
  command_args="${transmission_args}"
  start_precmd="${name}_prestart"
  TRANSMISSION_HOME="${transmission_home}"
  TRANSMISSION_WEB_HOME="${transmission_webhome}"

  transmission_prestart()
  {
      if [ -n "$TRANSMISSION_HOME" ]; then
          export TRANSMISSION_HOME
      fi
      if [ -n "$TRANSMISSION_WEB_HOME" ]; then
          export TRANSMISSION_WEB_HOME
      fi
  }

  run_rc_command "$1"



Again, CTRL+O, Enter, CTRL+X.

Step 5: Reboot Your FreeNAS

To reboot:
reboot

The reboot is essential to start transmission-daemon and to create the necessary directories under your 'Downloads' folder that transmission needs. If you browse it with Windows Explorer, you would see the folders in the screenshot. I will make it clear, the folders you see there is created by the transmission-daemon after the reboot. Okay? Okay. Next, log-in again to your FreeNAS box via SSH as root. Then kill the transmission-daemon with:
killall transmission-daemon
Then edit the settings.json file with:
nano /mnt/<path to your share>/Downloads/settings.json

Look for the following entries:
"rpc-whitelist-enabled": true,
"download-dir": "//Downloads",
"incomplete-dir": "//Downloads",
"incomplete-dir-enabled": false,

You need to change the values in italicized(above) with the bold ones below
"rpc-whitelist-enabled": false,
"download-dir": "/mnt/<path to your share>/Downloads",
"incomplete-dir": "/mnt/<path to your share>/Downloads/incomplete",
"incomplete-dir-enabled": true,


Again, CTRL+O, ENTER, CTRL+X

Then reboot your FreeNAS with:
reboot

Step 6: Access Transmission Web GUI

To access the Transmission Web GUI, open your browser then go to
freenas:9091
OR
<ip address of your FreeNAS box>:9091


Hopefully you would see a page similar to the screenshot. Transmission accepts both .torrent files and magnet links.

Happy torrenting on your FreeNAS box! :-)
<p>[root@Nas maison] ~# pkg_add -r transmission-daemon</p><p>Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.3-release/Latest/transmission-daemon.tbz: File unavailable (e.g., file not found, no access)</p><p>pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8.3-release/Latest/transmission-daemon.tbz' by URL</p>
<p>Hi there,</p><p>When I try to use this code: &quot;<strong>cp /usr/local/etc/rc.d/transmission /conf/base/etc/rc.d&quot;</strong></p><p>I always get: &quot;cp: /conf/base/etc/rc.d: No such file or directory&quot;</p><p>Could anyone help me whit this please?</p>
hi there. i tried this on 8.3.1 x64 and it worked. however there is newer version of transmission. this method bring me 2.42. is there way how to upgrade to 2.77 for example? thanks in advance. <br> <br>btw very good job.
I tried to delete my comment when I figured it out. it wouldn't let me. :)
When I try to make the system writable, I get this:<br> # mount -uw/ mount:<br> <strong>illegal option -- / </strong><br> usage: mount [-adflpruvw] [-F fstab] [-o options] [-t ufs | external_type] mount [-dfpruvw] special | node<br> mount [-dfpruvw] [-o options] [-t ufs | external_type] special node<br> <br> any help?
So sorry for the late reply. Anyway, there is a space between -uw and the frontslash. Try it again <br>mount -uw /

About This Instructable

40,733views

7favorites

License:

More by aerojr.me:Install Transmission on FreeNAS 8.0.4 Embedded/Full 
Add instructable to: