FreeNAS to Ubuntu: Torrent Server (Transmission)

If you’re coming from FreeNAS 7 to Ubuntu, you remember the very handy torrent server that was built in. Well we can exactly replicate that with Transmission’s and its WebGUI. A torrent server provides you a great way to download torrents directly to your server. It also allows you to constantly seed torrents, even when your main computers are off. I use this to host copies of OS’s (such as Ubuntu!) so other people can download them faster.

Note: This is an article in the series FreeNAS to Ubuntu. Check out the article for the initial Ubuntu fileserver setup coming from FreeNAS.

First we need to install Transmission.

sudo apt-get install -y transmission-daemon

Transmission’s settings are saved in a JSON file. We’ll edit that to update the settings appropriately. We’re going to enable the remote interface, allow all computers connect to it, change the password (which will be encrypted when we reload the settings), and change the download-dir and incomplete-dir. First, let’s stop transmission. For some reason, it occasionally overwrites the settings when restarting.

sudo service transmission-daemon stop
sudo nano /var/lib/transmission-daemon/info/settings.json
----
# Change:
# "rpc-enabled": false,
"rpc-enabled": true,

# "rpc-password": "$kljfkljwerjwauiouak438908",
"rpc-password": "plaintext-new-password",

# "rpc-whitelist-enabled": true,
"rpc-whitelist-enabled": false,

# "download-dir": "",
"download-dir": "/mnt/storage/Torrents/",
# "incomplete-dir-enabled": false,
"incomplete-dir-enabled": true,
# "incomplete-dir": "",
"incomplete-dir": "/mnt/storage/Torrents/incomplete",

Now we need to create the appropriate directories, and give them proper permissions. We are going to own the directory to the Transmission user and group (debian-transmission), give that user:group full permissions, and then give read permissions to the world (the rest of the users). You could alternately add yourself to the to the debian-transmission group, so that you have write and execute permissions, but for this tutorial, we’re going to share it out via Samba, so read is all we’ll need.

mkdir -p /mnt/storage/Torrents/incomplete/

chown -R debian-transmission:debian-transmission /mnt/storage/Torrents/ 
chmod -R 774 /mnt/storage/Torrents/

Now that everything is ready, we need to restart the server to encrypt the password and reload the settings.

sudo service transmission-daemon start

Now you should be able to connect to your server by visiting “hostname:9091″. You can set up port forwarding on your router so you can connect when you’re away from home, by forwarding a port to your server’s IP and port 9091. This port can be changed in the transmission config file. The setting is called “”rpc-port”: 9091,”.

About Josh Gachnang

Josh Gachnang is a small business consultant with 5 years of experience in developing IT systems. His specialties include moving IT infrastructure to the cloud, standard and mobile web development using Python and Django, and promoting with social media.

8 thoughts on “FreeNAS to Ubuntu: Torrent Server (Transmission)

    • Since this series is transitioning from FreeNAS to Ubuntu, I feel like sticking with the same software is easiest. From a quick search, it looks like I’d also need a web server to run TorrentFlux, which adds to the complexity, but I could be wrong there.

  1. Pingback: FreeNAS to Ubuntu: Initial Fileserver Setup with ZFS | Server Cobra

  2. Pingback: Links 16/2/2012: Netrunner 4.1, More Ubuntu 12.04 Previews | Techrights

  3. Pingback: Build a torrent server (Ubuntu) « 0ddn1x: tricks with *nix

  4. Hey,

    Didn’t see it covered in the post, but Transmission has a JSON (I think) RPC functionalities as well as both GTK and QT frontends (in addition to the web frontend you described).

    The handy trick is with a frontend on your comp you don’t need to copy magnet links between browser windows or do the complicated torrent download-upload-or-monitor dance. You click magnet links, open torrents as usual. Only the program on your comp is actually just a fancy display and the actual seeding/leeching is still happening on the server.

    Just saying….

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>