Linux: Headless Ubuntu Torrent Home Server

So it got to that time of the year where I feel the itch to upgrade my aging home server. I assessed the situation and realized that, for what it does, my current server does not need any kind of hardware upgrade. So I just decided to rebuild it with Ubuntu 11.04 64 bit and change up the server software a bit to be more accessible to my wife as well as to be a bit more modern (torrentflux and derivatives have been dead for a while now).


In this rebuild I wanted to make the services on the server more accessible for my wife. So my software selection is a bit more cohesive as I want all the services to be accessible to more than just the technically inclined. I also wanted her to be able to download missed TV shows without my help should she find the need to do so.

Software I chose to install:

  • Peer Guardian for Linux – Blocks IP addresses from known haters and other groups of your choice.
  • Mediatomb PS3 Media Server – A upnp server for playing movies and other media
  • Transmission – A pretty cool bittorrent client
  • Torrentwatch-x – Web based RSS tracker for bittorrents, integrates with transmission
  • Mollify – A simple web based file browser
  • Samba – For windows workstation integration
  • Webmin – I didn’t want to mess with a manual samba configuration so I set this up to simplify things 🙂

Initial Server Install

As I refuse to just post a bunch of screenshots of pressing “next” I’m going to skip the base install documentation. The brief rundown of what to do is to install Ubuntu server 11.04 64 bit, do not select drive encryption, select “OpenSSH server”, “LAMP Server”, and “SAMBA file server” for the core software. If you flubbed this up for whatever reason you can always run “sudo tasksel” to select these metapackages later on.

I started out with some generic apps. For whatever reason add-apt-repository was not available in the 64bit server version of ubuntu 11.04. Install this to make that handy command available again. I add in rkhunter, screen and htop cause I like them 🙂 We also install ntp to update our time automatically:

I also modified the base apt repository list: Uncomment the following in /etc/apt/sources.list (sudo nano /etc/apt/sources.list):

Update your system and make our working directory used in the rest of this post. All scripting and commands posted are assuming that this Downloads folder exists, should you do things any other way then you will have to keep that in mind throughout the post and modify things as needed. Adding to that, the whole post is not simply a copy and paste fully scripted out procedure so do things intelligently and with fair warning that your results may vary based on your environment and technical acuity:

Peer Guardian for Linux Install

Install the repository and the software. You will be asked a series of questions. You can skip them and modify the pglcmd.conf file directly afterwards if you like. I do recommend you be careful when selecting your block lists. The default should be fine but you may want to add a few more from the list when given the option:

If you skipped or just chose the default wizards then update the default config file to allow services that have nothing to do with torrent traffic in and out of your server:

If you ever find that an update makes PeerGuardian unable to be started run sudo dpkg-reconfigure –force pglcmd. Here is some extra information taken directly from pgl when it failed to start for me. Make of it what you will:

If any blocklists are missing, they will be downloaded. This may take several

minutes. Please be patient and don’t abort. If you want to follow the update

process, then do in another terminal a

tail -f /var/log/pgl/pglcmd.log

The lists are saved to /var/spool/pgl/.

The installation of pglcmd will fail, if starting pgld fails. So if

downloading the blocklists fails temporarily, the installation will fail. In

this case you may turn the automatic starting off by setting in



Then complete the installation and turn the automatic start on again:

sudo dpkg-reconfigure –force pglcmd

Transmission Install

This small guide  should get you going but you still have to look at enabling UPnP/NAT-PMP on your firewall. If you are running TomatoUSB (my new favorite) then go to port forwarding -> UPnP/NAT-PMP to enable this setting. (Note: I wrote this up with without explaining a whole lot, I was looking for something else entirely when I found this well written guide with good explanations on the settings:

First install Transmission. Create a new home for transmission, Note that we add the incomplete directory so if a torrent dies or gets interrupted it remains in that directory instead of mucking up your downloads directory. We enable this behavior later on. Make it so you can modify this directory and all its contents by simply being in the debian-transmission group (this coincides with a transmission umask setting we will make shortly). Enable ports 9091 and 51413 (if using ufw, by default this is not enabled and therefore not needed). Finally update the transmission configuration, you need to do this with the daemon entirely stopped or the configuration changes will get overwritten the next time you restart the services:

Replace the following lines to (optionally) set downloaded torrents umask so that members of the debian-transmission group can read and write completed torrents (so you don’t have to sudo to move and delete the files). Also, get rid of authentication and update to your new directory layout:

Add your primary user account to the transmission group, replace <username> with your own login ID:

Startup Transmisison:

Test Transmission by going to http://servername:9091/transmission/ and uploading a torrent of your choice. When it starts downloading and connecting to peers validate that our blocklist configuration is indeed working by checking the logs in real time:

Torrentwatch-X Install

Torrentwatch-X is a nifty web interface for tracking rss feeds which point to torrents for such things as TV shows. I set this up so if my wife needs to get some TV show she missed it is as simple as a few clicks in a browser to download. Below should get everything setup in a way that is integrated with your prior transmission install:

Modify /etc/torrentwatch/torrentwatch.config and replace the [Settings] area only with the following to integrate transmission with torrentwatch-x:

Mollify Install

I opted for installing Mollify for my wife to be able to easily access the server files from any computer. Here is how to get it setup:

Enter the following

Create your database with whatever login and password you want to use:

Go to http://<servername>/mollify/backend/install/ to complete the mollify installation (basically select next then create an admin account admin/admin). Logon to http://<servername>/mollify/backend/admin/.

Select Published Folders on left, Click on the add folder button, Put in the path of /home/torrents/downloaded with the description of “Downloaded Torrents”, Select the new published path and then click on “Add Folder for New Users/Groups”, check your admin account. Give your wife the admin account or create a new one, up to you. Other configuration settings for mollify can be set manually, here is a link to possible options : There are also example configurations at /var/www/mollify/backend/examples

PS3 Media Server Installation

Originally I was going to use mediatomb but I was having all kinds of issues getting it working the way I wanted and the xml config file and extra scripts you would need to get it working well is a total pain in the rear to setup. I finally scratched the mediatomb idea and went with PS3 Media Server. It runs on java and is more memory intensive but I simply do not care at this point (last sentence said in a frustrated tone).  Besides someone already wrote an awesome script to automate the install 🙂

Double-check that your user name is still part of the admin group, I found for some reason it was not after running the install process (nano /etc/group, look for the admin group and make sure your account name is listed at the end of the line). Then start a new terminal session with your server with X11 forwarding set (ie. ssh -X yourserver). From here you you have to stop the service, edit your settings, and restart the service:

Edit your settings so that you are streaming /home/torrents/download and /home/torrents/upload (or whatever directory you want to stream, I chose these two to be able to automatically stream downloaded torrents and uploaded content quickly). Save your settings, exit, start pms-linux:

You can now just access the simple web terminal to kick off rescans of your media folders should you find the need to do so. The site will be http://<servername>:5001/console/

Webmin Installation

This isn’t really needed but I wanted to setup the /home/torrents/download directory to be accessible via samba and I did not want to deal with doing it all via command-line. So I opted for webmin’s samba module to do the configuration:

You can now logon to your webmin interface by going to https://<servername>:10000/ and using <your username>/<yourpass>. If this does not work then use root/<yourpass>, select webmin -> Webmin Users -> Convert Unix Users -> select your username and select to convert now. Finally, share out any files/folders that you wish to share using the samba plugin within webmin.


Comments (7)

  1. 11:03 PM, 10/26/2012jblar  / Reply

    Agreed, this command is useless if the file does not exist.

    Modify /etc/torrentwatch/torrentwatch.config and replace the [Settings] area only with the following to integrate transmission with torrentwatch-x

    Is this file supposed to be created?

  2. 4:48 PM, 05/10/2012Johann  / Reply

    I would recommend ajaxexplorer… in stead of Mollify, as you will not need mysql there..
    Nice simple guide here:

  3. 11:47 PM, 03/08/2012Deon Furlow  / Reply

    Rather beneficial post. I just stumbled on your web site and wished to state that I’ve absolutely loved reading through your blog site posts. Any way I?¯ll be subscribing towards your feed and I hope you submit again quickly.

  4. 1:42 AM, 03/02/2012Brian M  / Reply

    Awesome tutorial… I just setup my nas for XBMC and was looking for a web based torrent downloader.


  5. 9:19 AM, 01/22/2012B. Davies  / Reply

    Great guide!
    One question though. You state ” mkdir /etc/torrentwatch” and “Modify /etc/torrentwatch/torrentwatch.config” for “Torrentwatch-X Install” . Where is this file?
    Thank you
    Again great guide.

  6. 9:23 AM, 11/13/2011Bruce T  / Reply

    I’ve been looking everywhere for a step by step headless install. Thanks Man!!!

  7. 4:07 AM, 10/09/2011Solid Cactus  / Reply


    Just wanted to say nice one for this guide! Some very useful info in their for setting up a home media/download server. Have you considered Usenet for automating movies/TV/music? Would probably take this to the next level.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Pingbacks (1)


Get every new post delivered to your Inbox

Join other followers