Marius van Witzenburg "Learned my lesson in life, now setting my action to stay in life."

13Jun/100

Manual how to install Transmission on FreeBSD as torrent client daemon

This manual is for Transmission 2.00 and higher.

Installation
Install required ports:

cd /usr/ports/net-p2p/transmission-daemon ; make install clean
# If required, install transmission-web
cd /usr/ports/www/transmission-web ; make install clean

Login to unpriv account and start transmission-daemon.

su - mariusvw

transmission-daemon

Now transmission created the default configuration kill it.

# Get current pid:
ps aux |grep transmission
# Kill it:
kill 43541

Edit the configuration to your needs:

vi .config/transmission-daemon/settings.json

You can view an example config here:

{
    "alt-speed-down": 1500,
    "alt-speed-enabled": false,
    "alt-speed-time-begin": 540,
    "alt-speed-time-day": 62,
    "alt-speed-time-enabled": true,
    "alt-speed-time-end": 1020,
    "alt-speed-up": 100,
    "bind-address-ipv4": "172.20.20.1",
    "bind-address-ipv6": "",
    "blocklist-enabled": true,
    "dht-enabled": true,
    "download-dir": "/home/mariusvw/Downloads",
    "encryption": 1,
    "incomplete-dir": "/home/mariusvw/Downloads",
    "incomplete-dir-enabled": false,
    "lazy-bitfield-enabled": true,
    "message-level": 2,
    "open-file-limit": 32,
    "peer-limit-global": 240,
    "peer-limit-per-torrent": 60,
    "peer-port": 53945,
    "peer-port-random-high": 65535,
    "peer-port-random-low": 49152,
    "peer-port-random-on-start": false,
    "peer-socket-tos": 0,
    "pex-enabled": true,
    "port-forwarding-enabled": true,
    "preallocation": 1,
    "proxy": "",
    "proxy-auth-enabled": false,
    "proxy-auth-password": "",
    "proxy-auth-username": "",
    "proxy-enabled": false,
    "proxy-port": 80,
    "proxy-type": 0,
    "ratio-limit": 2.0000,
    "ratio-limit-enabled": true,
    "rename-partial-files": true,
    "rpc-authentication-required": true,
    "rpc-bind-address": "172.20.20.1",
    "rpc-enabled": true,
    "rpc-password": "YOUR PASSWORD HERE",
    "rpc-port": 9091,
    "rpc-username": "mariusvw",
    "rpc-whitelist": "127.0.0.1,172.16.23.8,172.16.32.102",
    "rpc-whitelist-enabled": true,
    "speed-limit-down": 100,
    "speed-limit-down-enabled": false,
    "speed-limit-up": 100,
    "speed-limit-up-enabled": false,
    "trash-original-torrent-files": true,
    "umask": 18,
    "watch-dir": "/home/mariusvw/Downloads/__WATCH_DIR",
    "watch-dir-enabled": true

}

Restart the daemon:

transmission-daemon

Surfto:


http://192.4.1.9:9091/transmission/web/

Have fun downloading! :-P

Optional and OLD scripts:
Dynamic Speed Script
Change maximum speeds on time period:

0 23 * * * /home/mariusvw/transmission-speed.sh fast > /dev/null 2>&1
0 8 * * * /home/mariusvw/transmission-speed.sh slow > /dev/null 2>&1

Create speed-change script: transmission-speed.sh

#!/bin/sh
action=$1
case $action
in
'slow')
/usr/local/bin/transmission-remote -n mariusvw:<yourpassword> -d 100 -u 10
;;
'fast')
/usr/local/bin/transmission-remote -n mariusvw:<yourpassword> -d 500 -u 50
;;
esac

Easy commands
You can use this to easily enter transmission-daemon commands without having to enter your username and password every time.

 #!/bin/sh
action=$1
if [ -n "$action" ]
then
/usr/local/bin/transmission-remote -n mariusvw:<yourpassword> $action
fi

I hope this is useful for the ones who like to work with Torrents and share easy without leaving on your desktop PC if you have a server available.