Home Server Transmission Bittorent Server


17-Oct-2011: initial release.
16-Dec-2012: adjusted for Slackware.



Downloading large files can go lighting fast or dead slow. To download files with the bittorent protocol you need a bittorent client.  More convenient is to install a server on our home server and control that from the client workstations. If you then have a slow download that lasts several days you can safely turn off your client workstation while the server continues the download. We will install transmission on the server and allow clients to connect directly or by using a web browser.



You must build the transmission package yourself using a Slackbuild script. The script available at this server builds three versions at once, transmission-cli, transmission-gtk and transmission-qt. On the server you need to install transmission-cli only. The other packages can be used on Linux workstations.



We configure the server to run as a normal user. This means that the configuration and changes to the configuration can be stored in the home directory of that user. It also means that if you set the permissions right for all the downloads, all other system users can move the downloaded results out of the download directory. We do this by setting the umask in the configuration to 002 instead of the default 022. The download directory will be set to /mnt/users with the permissions set for all home server users. See Samba and the NFS4 setup for the details on the /mnt/users directory.

First, create the torrent user and create the download directories:

root@homsrv:~# useradd -c "Transmission Torrent" -d /home/torrent -m \
                 -g users -s /bin/bash torrent
root@homsrv:~# mkdir -p /mnt/users/.incomplete /mnt/users/Downloads
root@homsrv:~# chown torrent:users /mnt/users/.incomplete /mnt/users/Downloads
root@homsrv:~# chmod 775 /mnt/users/.incomplete /mnt/users/Downloads


Then edit /etc/transmissiond.conf like this:

# example configuration file

TRANS_ARGS="--allowed 127.0.0.*,10.126.160.*"


Now start and stop the daemon so that the basic configuration file is created.

root@homsrv:~# /etc/rc.d/rc.transmissiond start
Starting Transmission Daemon done.
root@homsrv:~# /etc/rc.d/rc.transmissiond stop
Stopping Transmission Daemon done.


Next, edit /home/torrent/.config/transmission-daemon/settings.json:

    "alt-speed-down": 1250,
    "alt-speed-enabled": false,
    "alt-speed-time-begin": 120,
    "alt-speed-time-day": 127,
    "alt-speed-time-enabled": false,
    "alt-speed-time-end": 480,
    "alt-speed-up": 70,
    "bind-address-ipv4": "",
    "bind-address-ipv6": "2001:1af8:fecf:7ea1::2",
    "blocklist-enabled": true,
    "blocklist-url": "http://www.bluetack.co.uk/config/level1.gz",
    "cache-size-mb": 4,
    "dht-enabled": false,
    "download-dir": "/mnt/users/Downloads",
    "download-queue-enabled": true,
    "download-queue-size": 5,
    "encryption": 2,
    "idle-seeding-limit": 30,
    "idle-seeding-limit-enabled": false,
    "incomplete-dir": "/mnt/users/.incomplete",
    "incomplete-dir-enabled": true,
    "lpd-enabled": false,
    "message-level": 2,
    "peer-congestion-algorithm": "",
    "peer-limit-global": 240,
    "peer-limit-per-torrent": 60,
    "peer-port": 51413,
    "peer-port-random-high": 65535,
    "peer-port-random-low": 49152,
    "peer-port-random-on-start": false,
    "peer-socket-tos": "default",
    "pex-enabled": false,
    "port-forwarding-enabled": false,
    "preallocation": 1,
    "prefetch-enabled": 1,
    "queue-stalled-enabled": true,
    "queue-stalled-minutes": 30,
    "ratio-limit": 2,
    "ratio-limit-enabled": true,
    "rename-partial-files": true,
    "rpc-authentication-required": false,
    "rpc-bind-address": "",
    "rpc-enabled": true,
    "rpc-password": "{619fbb3ecaa0afd75728e8a0a9e1136640863108cQ2WN9ZE",
    "rpc-port": 9091,
    "rpc-url": "/transmission/",
    "rpc-username": "",
    "rpc-whitelist": "127.0.0.*,10.126.160.*",
    "rpc-whitelist-enabled": true,
    "scrape-paused-torrents-enabled": true,
    "script-torrent-done-enabled": false,
    "script-torrent-done-filename": "",
    "seed-queue-enabled": false,
    "seed-queue-size": 10,
    "speed-limit-down": 1000,
    "speed-limit-down-enabled": true,
    "speed-limit-up": 70,
    "speed-limit-up-enabled": true,
    "start-added-torrents": true,
    "trash-original-torrent-files": false,
    "umask": 2,
    "upload-slots-per-torrent": 14,
    "utp-enabled": true


Important settings:

  • Bind to the external network interface (eth1).
  • Set the blocklist url.
  • Set the download dir to /mnt/user/Download.
  • Set the incomplete dir to /mnt/users/.incomplete and enable it.
  • Set the umask to 2.

We must set these settings directly in the settings.json file because some settings cannot be set from a client. Most other settings can be set from a client. Using a separate incomplete directory in a hidden directory has the advantage that users cannot manipulate the downloads before they are complete. The daemon will move a download to the normal download directory as soon as a download is complete without any interruptions to upload peers.

When these settings are done, start the daemon again and add the following line to /etc/rc.d/rc.local:

[ -x /etc/rc.d/rc.transmissiond ] && /etc/rc.d/rc.transmissiond start


Web interface.

You can reach the web interface using http://homsrv.wpl.ym:9091



See the download page for the script and configuration files.