p4xel

utserver (uTorrent) Plugin for unRaid 5.0

Recommended Posts

This plugin is no longer maintained. It will probably not work anymore. I am sorry for inconvenience, I hope someone else could take over the development. Regards, p4xel.

 

Hello everybody.

 

This plugin installs a linux version of uTorrent. More info about relase can be found on uTorrent website.

As a template I used SABnzbd-plugin (credits go to Benjamin Waller, Influencer and W-W).

 

Some notes:

  • Script downloads utserver (utorrent server for linux) from utorrent website (current version - 3.0 build 27079)
  • Default installation directory is /mnt/cache/apps/utserver, please change it according to your unRaid configuration
  • Default port is 8003
  • Default login is "admin" with no password
  • Please specify temporary and download directory location. Do not locate any of those on ramfs or flash.
  • Recommended location for installation and temporary directories is a cache drive. Best way is to create a user share and set it to be "cache only". If you don't want it to be accessible from the network, set Export to No.
  • Default WebUI address is http://tower:8003/gui.
  • You can set more advanced options in uTorrent WebUI. They are overriding those set in plugin settings page. If you need to reset, go to utserver install directory and remove following files: settings.dat, settings.dat.old

 

You can download plugin at the bottom of this post.

 

Installation:

  • Put the plugin into your plugin directory - copy the file into your unRaid network share (by default \\tower\flash\config\plugins)
  • Restart your unRaid box, or install plugin via telnet (recommended)
    • cd /boot/config/plugins
      installplg utserver.plg

     

    [*]Go to unRaid Settings menu, set paths and port according to your needs, enable plugin and click Apply

 

When updating, you may need to delete previous files manually:

- /boot/config/plugins/utserver/*

- utserver file in your installation directory.

 

Alternative WebUI (recommended)

 

There is an unofficial WebUI, which is much better alternative to official release.

You can find it here: http://forum.utorrent.com/viewtopic.php?id=58156

To install it, download the zip file, rename it to webui.zip and copy into utserver installation directory (keep a copy of original webui.zip so you could come back to it if you wouldn't like replacement). I may include an option to install it in future updates.

 

uTorrent remote

 

edit utserver.conf and add following lines

uconnect_enable: 1
uconnect_username: yourusername
uconnect_password: yourpassword

and restart utserver

Don't use username and password that you already used with Windows version.

 

 

Changelog:

 

Version 0.3.7

- changed way of stopping daemon

 

Version 0.3.6

- utserver.conf settings saved properly

 

Version 0.3.5

- settings saved properly to confing file when plugin is disabled

- status messages (during installation, while enabling and disabling)

- correct version information in Settings page

 

Version 0.3.4

- changed the way of downloading and extracting utserver

 

Version 0.3.3

- fixed dynamic installation directory issue

 

Version 0.3.2 and older

- changed download url to dynamic, not hardcoded

- added data and temp directories to unRaid/utserver setting

- fixed install script

- fixed typo in installation directory

- added utorrent configuration

 

Cheers,

p4xel

utserver_0.3.5.zip

utserver_0.3.6.zip

utserver_0.3.7.zip

Share this post


Link to post
Share on other sites

Congrats on the first plug-in, :)

I personally don't use torrents, so I can't say I'll give it a try, but I'm sure other users will(when I did use torrents, I preferred utorrent myself as well)

 

I notice you said it may not be the best working plug-in, is there any particular problem or feature you had trouble with?

Share this post


Link to post
Share on other sites

I don't use bittorrent too much, prefer usenet, but some things cannot be found anywhere else than torrent. I just added it "just in case I needed it", to have fully capable downloader.

 

I tried not to hard-code any particular version of the plugin, but to fetch the latest version, but I couldn't make it easily work with utorrent download page (auto-download with redirect). Next thing - I don't know how to properly stop the daemon, so I used killall (didn't work with kill by pid for some reason). Also I didn't test it too much. It work on my box, but I cannot guarantee it will on any other configuration. Most of all - I am not linux literate enough, I learned bash commands on the fly while making this plugin.

 

Next thing, I thik I would like to adapt ADOS (from my old ASUS router) to unRaid. Project page is here: http://wl500g.info/showthread.php?13227-ADOS-a-probable-replacement-for-Download-Master. It has been abandoned by developer, but may be a good base.

Share this post


Link to post
Share on other sites

Excellent! I too have found Transmission lacking. I plan to build a beta/RC server within the next few weeks, I'll test this out!

Share this post


Link to post
Share on other sites

Hi,

 

It's a good start but I found a few problems with the plugin:

First, there is a typo in the install function of the script:

 

cp -R /tmp/utorrent-server-3.0/* $INSTALLDIR

should be

cp -R /tmp/utorrent-server-v3_0/* $INSTALLDIR

 

Second, when starting utserver, it tries to pass the location of the utserver.conf file but it has not created one so it fails to start the server.

 

Third, because there is no utserver.conf file there is nowhere in the plugin that actually tells utserver the port you selected and if it did start, it would use the default port of 8080.

 

I have fixed these in the attached plg file (renamed to txt so I can attach it)(edit:removed, see below).

 

There are some improvements I can see it needing (I may work on these when I have time) the most important of which I think is that (some) options for the utserver.conf file need to be included in the settings page. The options in the unRAID settings page only tell utserver where to install (and now what port to use) but the data directory is useless.

Share this post


Link to post
Share on other sites

Hi LMon,

 

Thank you for pointing that out. I had this file already put into my utserver dir and forgot to include it in the plugin (for port change, so it wouldn't interfere with UnMenu).

 

I also had DataDir included in it. I will fix that and post with your corrections. I was hoping that someone like you would take a look and check for any mistakes.

 

Maybe it will develop into proper plugin.

 

One more thing - I had problems with stopping the utserver process. I used killall which I don't think is a good way of doing it. kill pid was not working well thou. I will have a look into it.

Share this post


Link to post
Share on other sites

i tried kill -9 pid and it was actually killing the process, but pid file was still existing hence bash sleep kept looping until I removed it manually. I then added rm pid to the script but I believe it is not the way it should be done.

 

I checked how to start/stop utserver daemon on different linux distribution, and in init script they use start-stop-daemon which is not present on UnRaid.

Share this post


Link to post
Share on other sites

I have installed the new updated plugin, but is never install any packages.....

 

I have this path /mnt/cache/apps/utserver, but nothing is installed and folder not created....

Share this post


Link to post
Share on other sites

I have installed the new updated plugin, but is never install any packages.....

 

I have this path /mnt/cache/apps/utserver, but nothing is installed and folder not created....

I haven't corrected the plugin yet, and LMon's txt file seems to be in wrong coding (non UTF-8). I will look into it tomorrow morning. This time I will mak sure it installs and works as supposed to from the begining.

Share this post


Link to post
Share on other sites

Sorry about the encoding issue, I'm new to this sort of stuff. It was encoding it in ANSI, I've found out how to do it in UTF-8 now. I've attached a UTF-8 version to this post

 

p4xel, I also found the pid file issue and figured out how to fix it by looking at someone else's script here. They do the same thing you did, but like I said this is all pretty new to me so I don't know the way this is supposed to work. Although if you look at the script linked in the the thread I linked to the comments mention that many daemons don't delete their pid files.

utserver.txt

Share this post


Link to post
Share on other sites

Great find LMon. This may be incorporated into plugin in future releases. I updated the plugin and description in first post. Tested your modifications and it works great on my box (deleted all files and reinstalled).

If you would like take over the further development feel free to create new topic, and I will redirect to it from this post.

Share this post


Link to post
Share on other sites

Hi

 

Just downloaded utserver 0.2.zip and copied the plg file to my plugin dir. Executed installplg and then I opened the web interface.

 

First, the log from installing doesn't seem to install any uTorrent server at all - only config

 

root@Tower1:~# installplg /boot/config/plugins/utserver.plg
installing plugin: utserver
file /boot/config/plugins/utserver/utserver.png: downloading from http://forum.
utorrent.com/img/avatars/120492.png ... 2012-06-15 10:01:51 URL:http://forum.uto
rrent.com/img/avatars/120492.png [1310/1310] -> "/boot/config/plugins/utserver/u
tserver.png" [1]
success
file /tmp/utserver-cleanup: successfully wrote INLINE file contents
  /bin/bash /tmp/utserver-cleanup ... success
file /boot/config/plugins/utserver/utserver.cfg: successfully wrote INLINE file
contents
file /etc/rc.d/rc.utserver: successfully wrote INLINE file contents
  successfully changed file mode
file /usr/local/emhttp/plugins/utserver/utserver.page: successfully wrote INLIN
E file contents
file /usr/local/emhttp/plugins/utserver/utserver.png: successfully copied LOCAL
file
file /usr/local/emhttp/plugins/utserver/utserver.php: successfully wrote INLINE
file contents
file /usr/local/emhttp/plugins/utserver/event/disks_mounted: successfully wrote
INLINE file contents
  successfully changed file mode
file /usr/local/emhttp/plugins/utserver/event/unmounting_disks: successfully wr
ote INLINE file contents
  successfully changed file mode
file /tmp/utserver-install: successfully wrote INLINE file contents
  /bin/bash /tmp/utserver-install ... success
file /var/log/plugins/utserver: successfully wrote INLINE file contents
plugin successfully installed
root@Tower1:~#

 

Then, when I try to edit the configuration, the path changes I do dissapears when I click apply.

before-apply.png.e210eeca865069801a125d4cd0bb7ed9.png

afterapply.png.2afdc6d5338c8e07df10c80823f374e8.png

Share this post


Link to post
Share on other sites

Hi

 

Just downloaded utserver 0.2.zip and copied the plg file to my plugin dir. Executed installplg and then I opened the web interface.

 

First, the log from installing doesn't seem to install any uTorrent server at all - only config

 

root@Tower1:~# installplg /boot/config/plugins/utserver.plg
installing plugin: utserver
file /boot/config/plugins/utserver/utserver.png: downloading from http://forum.
utorrent.com/img/avatars/120492.png ... 2012-06-15 10:01:51 URL:http://forum.uto
rrent.com/img/avatars/120492.png [1310/1310] -> "/boot/config/plugins/utserver/u
tserver.png" [1]
success
file /tmp/utserver-cleanup: successfully wrote INLINE file contents
  /bin/bash /tmp/utserver-cleanup ... success
file /boot/config/plugins/utserver/utserver.cfg: successfully wrote INLINE file
contents
file /etc/rc.d/rc.utserver: successfully wrote INLINE file contents
  successfully changed file mode
file /usr/local/emhttp/plugins/utserver/utserver.page: successfully wrote INLIN
E file contents
file /usr/local/emhttp/plugins/utserver/utserver.png: successfully copied LOCAL
file
file /usr/local/emhttp/plugins/utserver/utserver.php: successfully wrote INLINE
file contents
file /usr/local/emhttp/plugins/utserver/event/disks_mounted: successfully wrote
INLINE file contents
  successfully changed file mode
file /usr/local/emhttp/plugins/utserver/event/unmounting_disks: successfully wr
ote INLINE file contents
  successfully changed file mode
file /tmp/utserver-install: successfully wrote INLINE file contents
  /bin/bash /tmp/utserver-install ... success
file /var/log/plugins/utserver: successfully wrote INLINE file contents
plugin successfully installed
root@Tower1:~#

 

Then, when I try to edit the configuration, the path changes I do dissapears when I click apply.

 

Enable plugin before clicking apply.

Share this post


Link to post
Share on other sites

Hmm. OK. I did that now. And it could be that it now saves the info. A little strange behaviour since if you select enable before you edit the fields, you can't edit the fields anymore and since the enable selection is the top most entry it is natrual to select that first.

 

Anyway. I'm still left with no luck. The page just waits forever when I select apply and the bottom line states "uTorrent server is not installed".  I suspect that this is because I can see no mention of any download of the uTorrent package in the plugin file.

 

/

Share this post


Link to post
Share on other sites

I thing I re-created the problem on my box and found the problem (i believe so) - installation script was checking for cache disk, and if not present it would wait in loop. Please download version 0.3 and reinstall.

Share this post


Link to post
Share on other sites

Installed.

 

Now the setting for data directory is gone.

 

It's not possible to disable utserver - it just reverts to enabled.

 

uTserver is still not installed.

utserverV3.png.d8052194311f805f2de68c756f282b6c.png

Share this post


Link to post
Share on other sites

Try it with v.0.3.1, I forgot about one # in rc.utserver stop. Should be fine now.

Share this post


Link to post
Share on other sites

Closing in....

 

Now it says:

 

installing utserver...
installing Version 3.0 (27079)
Starting utserver: sudo -u nobody /mnt/disk2/.apps/utserver/utserver -settingspath /mnt/disk2/.apps/utserver -configfile /mnt/disk2/.apps/utserver/utserver.conf -pidfile /var/run/utserver/utserver-8003.pid -daemon

 

And there it waits forever. But this I think is only an update issue, because if I return to the Utils menu by clicking the top menu and click on uTserver again I see the settings and it says "uTorrent server is running".

 

But I can't log in to the interface? I'm running uTserver as 'nobody'? Webpage asks for username and password, but none of my users id/pw will do.

 

Also, the configuration of the data directory is still commented out in the plugin code.

Share this post


Link to post
Share on other sites

Login in as 'admin' with no password by default - then change it :)

 

What I can't work out is where utServer is writing it's config file for items changed in the webGUI, nor can I get it to automatically load torrents from a specified directory - which is a pain..  I've filled it in, the directory exists etc but it doesn't seem to find anything..

Share this post


Link to post
Share on other sites

Ah... Cool

 

Now it works! (At least the interface, haven't had time to test uTorrent itself yet... )

Share this post


Link to post
Share on other sites

Does this plugin require a cache drive be present for the install to complete correctly or will it remain stopped until you give your own data and install dirs?

 

Thank you for your hard work!

Share this post


Link to post
Share on other sites

Up and running, looks great, need to do some more testing later.... ;-)

 

Removed the password, so no issue to access the web site ;-)

 

 

//Peter

Share this post


Link to post
Share on other sites

That could be a problem with your torrent I think. I just installed v0.3.1 on a "fresh" server and added a magnet link with all default settings and that started to download.

 

/M

Share this post


Link to post
Share on other sites

Copyright © 2005-2017 Lime Technology, Inc. unRAID® is a registered trademark of Lime Technology, Inc.