In the first part, we installed and partially configured our FreeNAS to move on. Why not put some
BitTorrent client on it ? for example
Transmission . We will not use the built-in FreeNAS plug-ins, but practice a little using the console and the vi text editor :)
Note: If you are a cool mega guru of Unix, then I don’t think that you should read further, in the article I tried to describe as simply as possible in steps what and how, you might see a lot of obvious things. This topic is more likely a cheat sheet for newbies for the future ...
First thing is to go to the FreeNAS control panel and enable
ssh , the
service tab in the top menu

Next, click on the wrench and in the settings
temporarily tick
Login as Root with passwordUsing
putty go to our server as root and our password
')
Install the transmission
The file system in our
read only , fix
# mount -uw /
We don’t have any ports downloaded by default.
# pkg_add -r transmission-daemon
Now, without closing the
putty window, we can minimize it for now, go to the FreeNAS web interface and create a new ball, for example
Download , don't forget to tick the
Allow Guest AccessNext, check the path to our folder.

Back to
putty# cd /mnt/hdd1/Download
Create the necessary directories
# mkdir transmission watch incomplete finish
4 subdirectories in the Download folder
In the folder
"transmission" we will store the settings
If in the folder
“watch” put the torrent file Transmission automatically pick it up and start downloading
The
incomplete folder stores incomplete downloads.
“finish” - fully downloaded files
We give the user
transmission rights to these directories:
# chown -R transmission:transmission transmission watch incomplete finish
for the first time we will set the rights 777
# chown -R 777 transmission watch incomplete finish
Add the transmission to autoload, edit the file /conf/base/etc/rc.conf with any editor, I use vi
just in case here is a list of vi commands/ str - Search str forward. str can be a regular expression
? str - Search str backward
n - Repeat the search in the same direction.
N - Repeat search in the opposite direction.
: [range] s / old / new / [g] - Replace old with new in the specified range of rows. new and old can be regular expressions, and range is set similarly to the range of lines in the ed editor. For example, for the range of lines from 32 to 64, the range will be 32.64, the first line corresponds to 1, the last is specified using the $ symbol. The suffix g means to replace all occurrences of old in the string, not just the first.
: e! - reload current file
: 33 - jump to the 33rd line of the text file
i - switch to edit mode
a - switch to edit mode after the current character
u - undo last action
. - repeat last action
x - delete the character under the cursor
yy - copy string
dd - cut a string
p - insert
J - glue two lines
: w - save file to disk
: wq - exit with saving file (shift + ZZ)
: q - exit
: q! - exit without saving the file
: r - insert another file into the document
# vi /conf/base/etc/rc.conf
We go down to the bottom of the file and add the following lines:
transmission_enable="YES"
transmission_conf_dir="/mnt/hdd1/Download/transmission"
transmission_watch_dir="/mnt/hdd1/Download/watch"
transmission_download_dir="/mnt/hdd1/Download/finish"
transmission_user="transmission"
just in case, you can restart our freenas to make sure that the transmission starts automatically
# reboot
after rebooting using a browser we connect to the web interface transmission
http://192.168.4.210:9091/we will have an error ...
403: Forbidden
Unauthorized IP Address.
Either disable your IP address or add your address to it.
If you're editing settings. 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.
So it should be, we will fix
Stop the transmission, if you do not stop, then we will not be able to change the config
# Service transmission stop
# vi /mnt/hdd1/Download/transmission/settings.json
we need to add our subnet to the list of allowed addresses, the line:
"rpc-whitelist": "127.0.0.1",
We rule on:
"rpc-whitelist": "192.168.4.*,127.0.0.1",
Well, if we want to control not only at home, then we add additional ip addresses separated by commas or, in particular, disable the check, change the parameter:
"rpc-whitelist-enabled": true,
on:
"rpc-whitelist-enabled": false,
If you want to log into the Web interface with a password, you can specify a user and password:
"rpc-authentication-required": true,
"rpc-username": "user",
"rpc-password": "password",
We also need to correct the parameters:
"incomplete-dir": "//Downloads",
"incomplete-dir-enabled": false,
On:
"incomplete-dir": ="/mnt/hdd1/Download/incomplete ",
"incomplete-dir-enabled": true,
In order for the files that were in the download process to be in a separate folder.
We start the service:
# Service transmission start
Now you can go to our web-panel
http://192.168.4.210:9091/And add the first torrent download.

Web panel seems to be good but not very convenient, I prefer to use the
client under windows , you can also find it under other OSes.

This is probably all, maybe I missed something, so I am waiting for questions, criticism, suggestions and suggestions.
upd. Many thanks to
AbnormalHead for advice on jails. Today / tomorrow I will try to correct the situation, I will add a sequel to this post.