Headless Ubuntu Server Torrent Box

Install Server Ubuntu 10
During the install, you can usually go with the default options. I chose to install an SSH server, PostregSQL server, and LAMP server. It gives you these options during install.

Create a static IP Address

Once installed modify your IP address to be static so we can always hit the same IP when connecting to our box. Do this by editing your interfaces file.
joel@torrentserver:/$ sudo nano /etc/network/interfaces

Here is what my interfaces file looks like:
(Note: Change the IP address to something that matches your LAN):
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static

Additional Hard drive for Data
For my install, I have 2 drive in my linux server to prevent my downloads from filling up my system disk.  This isn’t completely necessary but it’s what I prefer.

By default only the system drive is mounted, so this leaves us to find and mount the extra drive.

List your devicesjoel@torrentserver:/$ sudo fdisk -l
Disk /dev/sdb: 40.0 GB, 40000000000 bytes
255 heads, 63 sectors/track, 4863 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Create a directory to mount our drive:
joel@torrentserver:/$ sudo mkdir /data

Mount the drive to the directory we created:
joel@torrentserver:/$ sudo mount /dev/sdb /data

Adjust Permissions

Make sure our username is part of the debian-transmission group
joel@torrentserver:/$sudo usermod -a -G debian-transmission joel

Make sure our /data directory is owned by the debian-transmission group
joel@torrentserver:/$ sudo chgrp debian-transmission /data

Modify our permissions on our /data folder
joel@torrentserver:/$ sudo chmod 777 /data

Install Transmission Daemon

joel@torrentserver:/$ sudo apt-get install transmission-daemon

When asked, type ‘Y’ to continue

Stop the transmission-daemon so we can modify the settings file.
joel@silvertorrent:/$ sudo service transmission-daemon stop

Copy the settings.json file so we have a backup if necessary
joel@torrentserver:/$ sudo cp /etc/transmission-daemon/settings.json /etc/transmission-daemon/settings.json.bak

Edit the settings.json file:
joel@torrentserver:/$ sudo nano /etc/transmission-daemon/settings.json

Here is my settings.json file:

(NOTE: Adjust “rpc-password”: “password” and “rpc-username”: “username” to the username and password you would like (The password will encrypt automatically). Also make sure you set “download-dir”: “” to a valid disk directory, mine is set to “/data” as I have that mapped to a second drive in my server.)
"alt-speed-down": 500,
"alt-speed-enabled": true,
"alt-speed-time-begin": 480,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": true,
"alt-speed-time-end": 0,
"alt-speed-up": 10,
"bind-address-ipv4": "",
"bind-address-ipv6": "::",
"blocklist-enabled": false,
"dht-enabled": true,
"download-dir": "/data",
"download-limit": 1000,
"download-limit-enabled": 0,
"encryption": 2,
"incomplete-dir": "/var/lib/transmission-daemon/info/Incomplete",
"incomplete-dir-enabled": false,
"lazy-bitfield-enabled": true,
"lpd-enabled": false,
"max-peers-global": 200,
"message-level": 2,
"open-file-limit": 32,
"peer-limit-global": 240,
"peer-limit-per-torrent": 60,
"peer-port": 20635,
"peer-port-random-high": 20500,
"peer-port-random-low": 20599,
"peer-port-random-on-start": true,
"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": 0.2500,
"ratio-limit-enabled": true,
"rename-partial-files": true,
"rpc-authentication-required": true,
"rpc-bind-address": "",
"rpc-enabled": true,
"rpc-password": "transmission",
"rpc-port": 9091,
"rpc-username": "transmission",
"rpc-whitelist": ",*.*.*.*",
"rpc-whitelist-enabled": true,
"script-torrent-done-enabled": false,
"script-torrent-done-filename": "",
"speed-limit-down": 1000,
"speed-limit-down-enabled": false,
"speed-limit-up": 10,
"speed-limit-up-enabled": true,
"start-added-torrents": true,
"trash-original-torrent-files": false,
"umask": 2,
"upload-limit": 100,
"upload-limit-enabled": 0,
"upload-slots-per-torrent": 4,
"watch-dir": "/data/_torrents",
"watch-dir-enabled": true

Start the Daemon again
sudo /etc/init.d/transmission-daemon start

Web Access

Internally, you should be able to access your server via your browser:

(Note: Change Ubuntu_Server_IP_or_Hostname to your server IP address or host name)

If you want to access your transmission server from outside your house you will need to forward port 9091 to your ubuntu server on your router.



    • Milos
    • February 16th, 2015

    great tutorial, nice and clean!

  1. No trackbacks yet.