studying my hobby


Debian as Download-Station: pyLoad (v0.4.7+)

(9 votes, average: 4.78 out of 5)

You want to turn your little home-server into a download agent you can control through a web-interface or a jabber account on your mobile phone? Then follow these few steps to get this done quickly.
What is pyLoad? Let's read the introduction from the developers' website:

pyLoad is a fast, lightweight and full featured download manager for many One-Click-Hoster, container formats like DLC, video sites or just plain http/ftp links. It aims for low hardware requirements and platform independence to be runnable on all kind of systems (desktop pc, netbook, NAS, router).
Despite its strict restriction it is packed full of features just like webinterface, captcha recognition, unrar and much more. []

Read Update 10.08.2011 to get the current version.

Obsolete guide:

Show »

There already is an installation-package for debian, but it contains the dependencies of the GUI, but as you guess we don't need a GUI on a box without display. So you can modify the deb-package like that:

Show »

Well, I've done this, why wouldn't I share my deb-file with you? There you go:

Now you are ready for the first start, you will be asked a couple of questions:

If everything went well you should be able to login to the webinterface, if you chose the default port try dockstar:8000 Once you are logged in go to the settings menu, you may want to turn off the checksums due to the limited CPU of the dockstar.
I have found an init-script to run pyload as service, unfortunately it conflicts with apt-get when upgrading. So I added this line to /etc/rc.local to start pyload on startup:

This will create a screen named pyload for the user root, I do this as su -c because I want to store the configuration-files in /root/.pyload/
If you want to take a look at the console-output of pyload just attach the screen with:

And simply detach it by pressing CTRL+A D.

Update 13.02.2011:

After some research I finally found a method to start/stop/restart pyLoad with the following script. Remember to comment or delete the line from above in /etc/rc.local.
Create the file /etc/init.d/pyload (modify the USER variable with the user that you have created the config and make it executable)

Create the file /etc/default/pyload

And finally execute

to add the service.

Update 17.03.2011: v0.4.5

There is a new version available, I created the pyload-v0.4.5-noarch-mod.deb so you can easily update your installation!

Update 22.04.2011: Update tip.tar.gz

When I started using pyLoad, I subscribed the feed from bitbucket to get updates. Once they make an update, there is a tarball with these changes. I wrote a little script to update the pyLoad installation to the most recent tip.
You have to edit the path of your pyLoad installation, then run it:

Update 15.06.2011: v0.4.6

Today a new version has been released, so I updated my modded files. You can now download pyload-v0.4.6-all-mod.deb and update your installation:

Update 10.08.2011: v0.4.7

Some of you might have seen there is a cli-deb available since v0.4.6. This one exactly equals my modded deb files. I decided not to update my files in future as long the cli version is downloadable at In order to update you need to remove my version (config won't be touched) and install the cli version, because they are conflicting:

If a new version is released I will not update this article unless there are big changes I need to tell you

Future releases:

In future you should be able to update pyload-cli as follows:


Tagged as: , , , , | 41,539 views Leave a comment
  • Alex


    thanks for your ideas! Unfortunately I get the following error message with your script with update-rc.

    update-rc.d: using dependency based boot sequencing
    update-rc.d: warning: pyload start runlevel arguments (2 3 4 5) do not match LSB Default-Start values (     2 3 4 5)
    update-rc.d: warning: pyload stop runlevel arguments (0 1 6) do not match LSB Default-Stop values (      0 1 6)
    insserv: Script pyload is broken: incomplete LSB comment.
    insserv: missing valid name for `Provides:’ please add.

    What is going on?


    • shyd

      I replied with an email days ago, hope you found a solution!

  • Dan

    Thank you for this guide, your init script and the pre-processed package.
    Short comment: I believe once you’ve migrated to an event-based boot sequence (i.e. Debian Squeeze), instead of running
    update-rc.d pyload defaults
    we should be using
    insserv pyload

    as per

    • shyd

      Thanks for your comment. You are absolutely right. I just edited this article.

  • jcromero

    Why have you changed the /etc/init.d/pyload script ? The old script was able to run pyload as a diferent user. A good option, in my opinion.

    • shyd

      I didn’t change anything since I posted it. You can set the user by modifying the USER variable.

  • jcromero

    jcromero@dockstar:~$ dpkg –contents paquetes/pyload-v0.4.4-noarch-mod.deb | grep init.d
    jcromero@dockstar:~$ dpkg –contents paquetes/pyload-v0.4.5-noarch-mod.deb | grep init.d
    drwxr-xr-x root/root 0 2011-03-14 18:59 ./etc/init.d/
    -rwxr-xr-x root/root 1213 2011-03-14 18:59 ./etc/init.d/pyload

    I refer to the script included in 0.4.5 version. It is different from the script in “Update 13.02.2011”

    • shyd

      You are right, there is an init script included since v0.4.5, I’ll take a look at this later on. If necessary I’ll update this article. Thanks for the hint!

  • jcromero

    Ups … It seems it is an upstream script. I understand now. Sorry.

  • jcromero

    I prefer your init script. I have done the following to create a pyload user (a la mldonkey user)

    sudo mkdir /var/lib/pyload
    sudo adduser –system –ingroup pyload –home /var/lib/pyload/ –no-create-home pyload
    sudo addgroup –system pyload
    sudo chown pyload:pyload /var/lib/pyload/

    I have configured later, with (only first time):
    sudo -u pyload pyLoadCore -s –configdir=/var/lib/pyload/ –changedir

    And added “–configdir=/var/lib/pyload/” to /etc/default/pyload OPTIONS var

    It would be great to have a postinst script to do all this.

    • shyd

      You can easily put this into a script. To add the -configdir to the line take a look at “sed” for the stringmanipulation.

  • ulttazauberer

    Since the 0.4.5 version the init script won’t work for me. Also the won’t run, but its the same file like before.

    I think I have to switch back to the 0.4.4. The already loaded packages are not marked, but the files are on the hdd. Any workarounds for that?

    • shyd

      I just made some testing. The new version will overwrite my init-script. I don’t have problems to start pyload with the new one. Can you provide some errors you get? “Won’t work for me” doesn’t help that much.
      If you are looking for the old deb:

      For pyload specific questions please consider asking in the forums, because I am not a developer at the pyload project:

  • ulttazauberer

    Hmm, i think I used your old script for the new version. I will test the included one. For now I’m running 0.4.4 without problems.

    Also the reconnect works fine.

  • using your deb and following your steps… do i get a webinterface to control pyload or no?

    • shyd

      If you follow these steps, yes, you will get a web interface.

  • Featues missing:

    no SSL available
    This is needed if you want to establish a secure connection to core or webinterface.
    If you only want to access locally to pyLoad ssl is not usefull.

    Gui not available
    The Graphical User Interface.

    no JavaScript engine found
    You will need this for some Click’N’Load links. Install Spidermonkey or ossp-js
    You can abort the setup now and fix some dependicies if you want.

    I this normal???

    • shyd

      You have to use selfsigned certs.

      That is the essential thing why I created this deb. We don’t need a gui on a server, so its not available.

      Not needed on a server either.
      If you are installing pyLoad on a desktop machine, please install the original deb from This article faces screenless servers only.

    • Kerberos

      apt-get install python-openssl

      that will give you SSL support

  • Every time i start my stora, i need to manually start the service… anyway to do that automatically?

    • shyd

      I think you are looking for insserv pyload

      • Done that… Restart and it the start the “service”

        • shyd

          Yes, after reboot pyload should come up automatically.

          • Not working… after rebbot the service is not up…

  • executing “python /usr/share/pyload/”

    just get…

    could not create folder for logs: Logs
    Traceback (most recent call last):
    File “/usr/share/pyload/”, line 897, in
    File “/usr/share/pyload/”, line 281, in start
    self.init_logger(logging.INFO) # logging level
    File “/usr/share/pyload/”, line 409, in init_logger
    File “/usr/lib/python2.6/logging/”, line 112, in __init__
    BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
    File “/usr/lib/python2.6/logging/”, line 64, in __init__
    logging.FileHandler.__init__(self, filename, mode, encoding, delay)
    File “/usr/lib/python2.6/logging/”, line 827, in __init__
    StreamHandler.__init__(self, self._open())
    File “/usr/lib/python2.6/logging/”, line 848, in _open
    stream =, self.mode, self.encoding)
    File “/usr/lib/python2.6/”, line 881, in open
    file =, mode, buffering)
    IOError: [Errno 13] Permission denied: u’/root/.pyload/Logs/log.txt’


    • shyd

      “could not create folder for logs: Logs”
      “IOError: [Errno 13] Permission denied: u’/root/.pyload/Logs/log.txt’”
      Check the permissions and the owner.

  • Pingback: Seagate Dockstar Discussion and Tutorial Thread()

  • mentalo

    thanks for the deb!

  • Wie muss man genau updaten?
    Nur die deb herunterladen und mit dpkg -i installieren?
    Oder muss man auch dpkg-reconfigure ausführen?

    • shyd

      Normally it should work if you just dpkg -i, yes.
      If the dependencies change you might have to run dpkg-reconfigure as well. But if you come from v0.4.5 it’s not necessary.

  • How to update from 0.4.5 to the new 0.4.6 deb?

  • New version have some bugs…

    On Downloads link i get a error:

    pyLoad – Webinterface

    An Error occured, please enable debug mode to get more details.

    HTTP Response 500

    Traceback (most recent call last):
    File “/usr/share/pyload/module/lib/”, line 651, in _handle
    return callback(**args)
    File “/usr/share/pyload/module/lib/”, line 1144, in wrapper
    rv = callback(*a, **ka)
    File “/usr/share/pyload/module/web/”, line 101, in _view
    return func(*args, **kwargs)
    File “/usr/share/pyload/module/web/”, line 195, in downloads
    for file in sorted(listdir(join(root, item))):
    UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xc3 in position 37: ordinal not in range(128)

    • shyd

      This might be a special error for your environment, as I am not a developer of the pyLoad project, please contact the pyLoad team.
      Make sure you stop the pyLoad service before updating. My solution is to try to update to the current tip, see “update 22.04.2011” above.

  • crio29

    i just updated my pyload from 0.4.5 to 0.4.6 (all from your custom deb). update runs fine but now the problem is i cant manage anything in webui (add, remove, edit buttons disapeared). did you get theses errors ?

    thanks in advance

    • shyd

      I didn’t get such errors. You can try to run pyLoad manually from the terminal with python /usr/share/pyload/ and check the output for errors which probably give some hints on what is going wrong. If you don’t get them fixed on your own, feel free to send me an email with the output/errors.

  • dodo

    pyLoad daemon running as root is not a security problem?
    Transmission debian package, for example, create a user to run the daemon.
    How to change the script to execute pyLoad with a different user?

    • shyd

      It is, indeed. But currently I don’t know how to change the user with the init-script included in the deb, maybe one of the devs can tell us.
      But you can change the script to the one I posted on “Update 13.02.2011”, there is an option to set the user.

  • xddy

    Hi, there,

    I just installed the v0.4.6 as well as Update 13.02.2011, however, when I tried the webui, none of online file reserve website like megaupload, filesonic,…. would work. I tried youtube, it works with no problem. Anyone could tell me how to figure out where the problem is?


    • xddy

      BTW, it shows waiting, then starting, but not started, then error happens.

    • shyd

      I know there are a lot of fixes concerning some plugins since 0.4.6 in the current tip. You may try to update the files as described in Update 22.04.2011.

      Hope this helps.

      • xddy

        Thank you very much for your reply, I tried the tip.tar.gz, however, it doesn’t work.

        But I guess I found where the problem is. When I check the plugin in Config, I found some plugins are missing like megaupload, filesonic, etc., of coz youtube plugin is there. So, it should be the reason of download failing from those websites.

        Now, I’m wondering how I can add those plugins to pyload. New to python, no ideas about that…

        BTW, in your Update 22.04.2011 may not be working correctly coz the folder is with different name but not pyload.


        • xddy


          I checked the plugin.conf and found there are only couple of plugin entries for those who show up in webgui config for plugins, so now my question would be how to add new definition in plugin.conf.

          • shyd

            I took a look at the plugin.conf and at what you described. I would say some entries are “missing” because there are no options to set, you don’t need to add them in the config. But I can’t answer the question for sure. For pyLoad specific questions, please ask the devs at

            If the doesn’t work for you, what is the exact path pyload is installed in? Maybe I can modify the script to make it more flexible.

            • xddy

              Yes, you are right, downloading works for megaupload now after I re-install it, will try other hosters later.

              The downloaded tip.tar.gz contains a folder named something else but not pyload after tar, your .sh would not extract files to the pyload folder but create a new folder in/usr/share, you may need to make some changes.


              • xddy

                sorry, one more question, for the user issue, if I use root as the USER in script 22.04.2011, it works fine, but when I use other users, it would autostart, and ideas how to make other user work? coz using root could be a security problem as mentioned by dodo. Thanks.

                • shyd

                  I just tried this from scratch – it works. I logged in as the user I want to run pyload with. Then I ran pyLoadCore to create the config and tested the WebIF.
                  Then I logged in as root and started the service with the 22.04.2011-script and default-file. A look into “top” shows a running python task for the correct user.

              • shyd

                Thanks for the hint! Obviously there are changes in bitbucket. I updated the .sh so it should work now.
                Btw: If you restart pyLoad, it updates its plugins.

  • Pyload not working with fileserve premiun account… :(

    Is there any good alternative?

  • New pyLoad Version 0.4.7 available

    • shyd

      Thanks, I’ve already seen. I have to check if a new .deb is necessary, because there is a cli-deb available since v0.4.6.

  • “Update 22.04.2011: Update tip.tar.gz” script not working…

    The tip file changed is name… The new one is “spoob-pyload-tip.tar.gz”

    • shyd

      It should work as it is. I made a change on 01.08. to make the new structure in the tarball work with the installation.
      The link is – you can wget this. Downloading with a browser will result in “spoob-pyload-tip.tar.gz” because of the file header changed by bitbucked.

      • I instaled Mercurial, and just clone it source… ;)

        Clean and easy! ;)

        • shyd

          The easiest way if you ask me
          But I wanted a solution with no need of extra software like hg.

  • Pingback: Dockstar | Tutogo()

  • enolive

    thanks for your nice guide!

    FYI, the newer pyload-cli.deb packages seems to include a daemon start script, but yours is better. Maybe you wanna contribute it? ;-)

    • shyd

      Jep, it does, great idea, I’ll think about it


    Did you tried or use Aria2 ( ) seems interesting…

    Torrent + WWW

    • shyd

      Nope, I didn’t. Thanks for the hint!

  • cobra

    Is it posible to make a fail_download_script in order to notify me when a download failed?
    I have one notifying me when download starts, but I don’t know if after starting it fails…

    • Hi,
      nothing is impossible ;)
      You know about the dir /usr/share/pyload/scripts, obviously. For further development tips please contact the devs in