Deluge/Ubuntu

Here are the steps to install Transdroid when you use Deluge on Ubuntu:

Compiling and installing Deluge

The support for Deluge in Transdroid is limited to the new Deluge 1.2 version. Unfortunately, this isn’t officially released yet so we need to compile and install it ourselves. The instructions therefore are taken from the Deluge website. (Don’t like compiling yourself? These is also a Launchpad PPA repository that provides a .deb package.)

The first thing you need to do is get the latest Deluge code from their development SVN server. Open a command line and check out the code:

svn checkout http://svn.deluge-torrent.org/trunk deluge

If you need to update the installation later on your can use the ‘svn update’ command to get the latest version, before recompiling and installing the project.

Before compiling get all the dependencies for the project. The following command should get them all, but depending on your machine’s installation you may need more. The official list of dependencies can be found on the Deluge website.

sudo apt-get install build-essential python-all-dev python-all python-support libboost-dev libboost-thread-dev libboost-date-time-dev libboost-filesystem-dev libboost-serialization-dev libboost-program-options-dev libboost-regex-dev zlib1g-dev libssl-dev

Now we can compile the code and install it on our system:

python setup.py clean -a
python setup.py build
sudo python setup.py install

You can now run the application by starting both the daemon and the web interface.

deluged
deluge-web &

I use the & at the end of the command to run the web UI disconnected from the terminal we are working in.

You should now test if the web UI works. Open your browser and go to http://localhost:8112/. It will ask for a password, which is ‘deluge’ by default. Next you need to connect to the running deluged daemon.

Connecting the web UI to the running Deluge daemon

If you want to change the web UI password or the default port number 8112, click on ‘Preferences’ in the top bar and open the ‘Interface’ tab.

Web UI settings screen

Remember that you always need to have both the deluged and deluge-web running and that the web UI is always connected to the deamon. If (like in most use cases) you only use one background daemon, you might want to have the Deluge web interface automatically connect to the daemon. See the official Deluge FAQ answer for setup instructions.

Allow access from anywhere

The next step is very important if you want to use Transdroid to control Deluge from anywhere you go and not just your home Wi-Fi network. You will need to open up the port 8112 and redirect this to your home computer. First get your Ubuntu computer’s IP address. Right-click on the connections icons in the top panel; this is the NetworkManager Applet. If choose ‘Connection Information’ it will give you some statistics about your current computer’s network connection. You need the number that says ‘IP Address’. Note it down or remember it: this is your computer local IP address.

View your local computer's IP address using the network manager

Now go to your the manager interface of your router or ADSL modem. It will most likely have a NAT tab or settings screen. Here you will need to set up a port forward from all external traffic on port number 8112 to you local computers’ IP address – the one that you just retrieved from the Ubuntu connection manager – on the same port. There are too many routers and ADSL modems to make detailed explanations here, but you can use the website PortForward for in-depth help.

Setting up Transdroid

The final step is to set up Transdroid. Install the software from the Android Market and open up the application. You will see a message that you need to set up a server configuration first. Hit your Android device’s menu button and choose ‘Settings’. Next, click the ‘Add a sever’ button to create your first sever configuration. You can add more later, if you need to.

Now fill in all the settings. The name is totally up to you. From the type menu you choose for Deluge of course.

The IP address is your server’s external IP address. If you do not know this, open up a browser on your Ubuntu machine and surf to whatismyip.com. It will present you the external IP address that you need in Transdroid.

The port number is the next setting and is 8112. (Except for when you manually changed it, of course.)

Transdroid port settings for Deluge

Choose to enable authentication and fill in the web UI password, which is ‘deluge’ by default. Note that there is no username.

Time to test your settings! First disconnect from the Wi-Fi network if you are connected to the local network (the one where your Ubuntu machine is in as well). This is important, because you will need to use different settings for that.

Now, hit the back button of your Android device twice to return to the main screen. It should now state that it is connecting to the sever. After a couple of seconds you should get a listing of all the active torrents in Deluge. Rewards yourself by downloading some torrents, right from your phone. :)

Local Wi-Fi network access

One thing you should know when you have a Wi-Fi network at home, is that you cannot use your external IP address as described above while you are connected this way. When connected to the wireless network that your Ubuntu machine is in, you will need to use your machine’s internal IP address instead.

Easiest thing to do is to open Transdroid’s settings menu again and add a new sever configuration. Use the exact same details that you used before, but now use your Ubuntu machine’s local IP address. Of course you also want to give it a name that identifies it as being your local configuration.

Give it a test by going to the main screen and choose ‘servers‘ from the menu. You can select the other configuration from the pop-up menu. A little tip: switching servers can also be done by swiping your finger from left to right (or the other way around). No need to open the menu each time!

Troubleshooting

If Transdroid refuses to connect you, use these steps to trace the problem.

First try to connect to the web UI directly from your Ubuntu machine. Start a browser and surf to http://127.0.0.1:8112/. If you can a page not found error, deluge-web is not running or you set up the web UI to run on a different port number.

If you are presented a login screen but are refused access, please check your password, maybe re-enter them. As long as you cannot even access the web UI, Transdroid will not work as well.

If you do not see any running deamons in the connection manager, then deluge is not running. Start it and reloas the web UI. You should always first connect the web UI to the running daemon before using Transdroid.

If this direct connection works, check if you can connect using Transdroid while connected on your internal Wi-Fi network. Remember to use you internal IP address now. If this works but external connections via 3G/EDGE don’t, you have not set up the port forwarding correctly.

Still having troubles? Use the ‘error report’ feature in Transdroid’s menu to get personal help.

Good luck and enjoy!

12 thoughts on “Deluge/Ubuntu”

  1. Just something that worked for me with 1.2.0-rc5. Make sure you are not in classic mode in the normal UI (this also made my web-ui not fully work either).

  2. I am using transdroid with deluge1.2 and ubuntu. Running on Android 1.5 Its a great app but I have a problem I can’t seem to solve.

    It connects, and I can view my torrents just fine.

    When I try and download a torrent using the phone (ether by in built search or local file) app says its added and refreshes but nothing happens the file is not added or downloaded.

    Checked GTK GUI app and Web UI. All looks fine but no file added.

    Is this a known issue with deluge or do I need to set something up. Where does the torrent file get downloaded/uploaded to on my PC for deluge to access and add to the list? Do I need to set this somehow? Where?

    Any help most appreciated.

    1. Most likely the Linux user under which the deluge-web is running does not have sufficient rights to write files whereever you told Deluge to put them. So when Transdroid sends the file URL to Deluge, Deluge is trying to download the .torrent to your machine but fails to save it at the file system location you chosen.

      Please take a look at the Deluge logs what is going on. I am confident it’s something simple like this and not a error. Alternativerly, you may send me your Transdroid error log (using the menu option).

  3. Turyn appears to be correct. If “classic mode” is enabled, this causes problems with the web-ui.

    I believe this may be the root of MH’s issues as well. His problem is identical to the issue I was having. Once I disabled “classic mode”, everything worked great.

  4. Hi there. Love the app. But can’t seem to add torrents. This is what the deluge logs are showing:
    Thanks.

    from deluged.log
    ———————–
    [ERROR ] 19:25:51 core:246 Error occured downloading torrent from http://isohunt.com/download/90366913/ubuntu+mint.torrent
    [ERROR ] 19:25:51 core:247 Reason: [Errno 13] Permission denied: ‘ubuntu+mint.torrent’

    from deluge-web.log
    ——————————————————————————–
    [ERROR ] 19:25:51 client:375 RPCError Message Received!
    ——————————————————————————–
    RPCRequest: core.add_torrent_url(http://isohunt.com/download/90366913/ubuntu+mint.torrent, [])
    ——————————————————————————–
    File “/usr/lib/pymodules/python2.6/deluge/core/rpcserver.py”, line 297, in on_fail
    failure.raiseException()
    File “/usr/lib/python2.6/dist-packages/twisted/web/client.py”, line 374, in pageStart
    self.file = self.openFile(partialContent)
    File “/usr/lib/python2.6/dist-packages/twisted/web/client.py”, line 360, in openFile
    file = open(self.fileName, ‘wb’)

    IOError:
    ——————————————————————————–

    1. Deluge does not have suficient rights to save the .torrent file (that it is trying to download from isoHunt as requested) to your local machine. Please try to manually stop and start the Deluge daemon and retry. Often when Deluge is started on your machine startup (via an init script or something), the user that starts Deluge cannot write to the (default) torrent firectory.

      Hope this helps.

      1. How do you set the default torrent location in deluge? Or, what is the default torrent storage location? What permission settings are needed for that directory?

    1. You cannot ‘open files on your phone’ with Transdroid. That setting is only used to determine the path to the downloads folder on your torrent server; but Deluge can provide it so no need to enter this yourself. You can download files to your phone using an FTP server on your torrent server and the aFTP client on your phone.

Comments are closed.