Monday, May 25, 2009

Transmission 1.61 working!

I have been having trouble getting Transmission's bittorrent daemon working for a few versions now. Because of this, I have been using Transmission 1.51 for a time, however all torrents would stop when I disconnected my SSH connection from the machine. Today I successfully configured Transmission 1.61 on my Ubuntu server. I am running transmission-daemon 1.61 (8365) on Ubuntu 9.04 Server. This version of Transmission includes a startup script to restart the daemon if the computer reboots.

To be on the safe side, it is probably a good idea to completely uninstall any previous versions of Transmission from your computer. Do this by typing:
sudo dpkg -P transmission-daemon transmission-cli transmission-common
If you do not already have transmission installed then you can ignore this step. However, you will need to add the repositories so you can download it. Add this line to your /etc/apt/sources.list file:
deb jaunty main
Run these commands to import the key used to sign the packages and to update the list of packages available:
gpg --keyserver --recv 976b5901365c5ca1
gpg --export --armor 976b5901365c5ca1 | sudo apt-key add -
sudo aptitude update
Now you're ready to rock; run these command to install Transmission:
sudo aptitude install transmission-cli
After doing this, I commented out the line for the Transmission repository so that my system won't break again from an update. Add a hash (#) character at the beginning of the line you added a few steps ago in /etc/apt/sources.list so it looks like this:
#deb jaunty main
Now create a directory where you want to save downloaded files to. DON'T USE YOUR HOME DIRECTORY! I have my server installed on two partitions, one for / and one for /home. Since the /home partition is so much bigger, I put my download directory at /home/downloads. You can create that directory with this command:
sudo mkdir /home/downloads
The transmission-daemon doesn't run as process of your user, and it can be very dangerous to run processes as root so it runs as its own user called debian-transmission. Give control of your newly created downloads directory to the user debian-transmission with this command:
sudo chown debian-transmission:debian-transmission /home/downloads
Now its time to change some settings for the daemon. Shutdown transmission-daemon:
sudo /etc/init.d/transmission-daemon stop
Verify that no transmission-daemon processes are running with:
ps aux | grep transmission
You should get one line of output that says "grep transmission" at the end. If not, kill the extra processes. Now open /etc/defaults/transmission-daemon with a text editor. This requires superuser priviliges. To use the command line text editor VIM type:
sudo vi /etc/defaults/transmission-daemon
And if you want to use a GUI text editor type:
sudo gedit /etc/defaults/transmission-daemon &
Locate the line that reads:
OPTIONS="--auth --config-dir $CONFIG_DIR"
Change this line by inserting your own options. You see what the different options are by running:
transmission-daemon -h
This will print out the available options without starting the daemon up again. I changed the line on my system to look like this:
OPTIONS="--config-dir $CONFIG_DIR -T -L2000 -l500 -er -P51413 -w /home/downloads/"
transmission-daemon by default listens on TCP port 51413 for incoming connections but I recommend you that change it. Save and close that file.

Now you can startup the daemon again:
sudo /etc/init.d/transmission-daemon start
Happy downloading.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.