A Linux Systems Engineer, Cloud Architect, and DevOps enthusiast who loves automation, monitoring and stress testing perferably in the realms of Open Source.
Powered by Jekyll on Github Pages
Utorrent server on Linux - Step by step
30 Dec 2011
It has been six years since I migrated to Linux (from windows) and never looked back. I used to use uTorrent on windows as my torrent client. It was small, light-weight and very user friendly. Frankly speaking in these six years of my linux voyage, I never found any alternative to that. Until recently I heard that utorrent is now available for linux. Keeping my hopes high, I gave it a try and it lived up to my expectations. As expected it is free but closed-source, with a little hope from the forums that it might become open-source in the future. But anyways, I am really thankful to the utorrent team for briniging out utorrent for linux.
A couple of things felt missing but still it is better than the most, infact, all! It is currently an alpha release of version 3.0 build, with only web-based GUI and 32bit release (requires 32bit libraries on x64 systems).
Here is a complete step by step installation guide:
Step 0: Pre-Requisites
According to the website:
x86 Ubuntu 9.10+, Debian 5+, Fedora 12+
Linux kernel 2.6.13 or newer required
The utserver binary requires glibc-2.11 or newer. Do check this before continuing. To check your version of glibc:
(Note: If you have old libraries, or facing any library related error, I have a different guide for you HERE )
I am using a 32 bit Centos 6.2, but this guide should work with most linux distributions. If you are using a x64 distribution, you’ll need to install all the 32 bit libraries.
In case of a 32 bit distro, there are hardly any dependencies to be installed. They are installed by default even in the minimal installations. Here is the list of dependencies anyways:
glibc >= 2.11
If you are using a 32 bit distro:
If you are using a 64bit distro, install the 32bit libraries:
Step 1: Make basic directories
I will keep it in /opt (ofcourse you can keep it anywhere you like)
Step 2: Download µTorrent Server
At the time of this writing, µTorrent Server alpha (3.0 build 25053) was the latest available one. You can find the latest release here. Download the package to a tmp location, extract and then copy the required files:
Step 3: Libraries check
Before proceeding further, it will be a good idea to locate any missing libraries.
Use ldd command to find out any missing library:
You might get the following error:
/opt/utorrent/utserver: error while loading shared libraries: libssl.so.0.9.8: cannot open shared object file: No such file or directory
/opt/utorrent/utserver: error while loading shared libraries: libcrypto.so.0.9.8: cannot open shared object file: No such file or directory
If openssl is installed properly, this might be because you have a newer version of the shared library. Creating a softlink should solve the problem.
First find out what version you have:
This will show you the library you have installed, for example in my case it showed me that I’ve libssl.so.1.0.0 and libcrypto.so.1.0.0 installed:
Now simply create a soft link from the one you have to the one required by utserver:
(ofcourse you can always install the correct version of openssl instead of doing this softlink trick)
If every thing is fine you should get output some what like this:
(You can ignore the “no version information” warning). This shows every requirement is fulfilled and utorrent server can now run on this machine. Lets now do some final config tweaks.
Step 4: Create config file
In theory you can just run the utserver binary (like you did in the previous step), and utorrent server should be ready and useable. You don’t necessarily need a config file But it is always a good idea to have a config file in hand, it’ll make editing and experimenting with the configurations much easier and give you a lot more options to play with.
I wasn’t able to find a complete and comprehensive config file. Users are either not using config file or using it just for a couple of options.
I’ve created this config file from the documentation and added all the options I found. All the directives are explained in the comments and set to the default value.
Here it is (only dir_root is set to /opt/utorrent/data all other values are default):
Don’t worry most of the lines in the config are comments (only 34 directives in total). I recommend going through it once.
Copy-Paste this configuration into the file utserver.conf in /opt/utorrent/conf/ directory using your favourite text editor like vim or download it directly:
Now you can start the utorrent server with the following command:
and stop it with:
That is not very convenient, so lets create a script to make things easier.
Create a file called utsctl in /opt/utorrent and copy-paste the code into it using your favourite editor or download it directly:
Once you have created this script file, lets make it executeable:
And also make it easily accessible, so that we don’t have to type the whole path again and again:
Now starting stoping and checking the status is as easy as this:
Step 5: Start µTorrent Server
Lets now start the utorrent server:
It should output “server started - using locale en_US.UTF-8” and return back to bash prompt. (Optionally, you can add this command to rc.local to auto-start it at startup)
You should now be able to access the utorrent server gui on localhost:
or via the ipaddress/hostname if accessing from a remote computer:
(don’t forget to allow this port in the system’s iptable firewall and any other firewall in between)
Here is a screen-shot:
Playing with the configuration:
When you change a configuration in utserver.conf, just restarting the utserver daemon won’t update the changes in WebUI. You’ll have to remove the settings.dat files and then start the server again i.e,
I’ve added the “reload” option in the utsctl script that will do all these three things:
Good Luck :)
Questions/Suggestions/Comments/Corrections/Additions about this HowTo are welcome.