Whatbox Logo
Login for certain variables to be updated with your slot's information

Wiki > pyLoad

pyLoad is a "Free and Open Source download manager written in Python and designed to be extremely lightweight, easily extensible and fully manageable via web".

pyLoad stable (Python 2.7)

Install

  1. Connect to your slot through SSH

  2. Create a Python 2.7 virtualenv with the instructions found here or use an existing one.

  3. With your virtualenv activated, install some missing Python modules

     pip install pillow pycrypto tesseract
     pip install --compile --install-option="--with-openssl" pycurl
    
  4. Create ~/bin and add it to your shell's PATH if you haven't done so before. Download this compiled JavaScript binary to your bin directory.

     mkdir -p ~/bin && echo "PATH=\$HOME/bin:\$PATH" >> ~/.bashrc && source ~/.bashrc
    
     wget -O ~/bin/js https://dl.dropboxusercontent.com/s/cwjmcfzbpi0ktp9/js && chmod +x ~/bin/js
    
  5. Download the latest pyLoad release

     wget -O pyload.zip https://github.com/pyload/pyload/archive/stable.zip
    
  6. Extract the archive

     unzip pyload.zip; mv pyload-stable/ pyload/
    
  7. ~/pyload/pyLoadCore.py will start the configuration setup wizard on first run. For most options, you can safely hit Enter to use the defaults. The following options should be changed/set accordingly:

     - Username [User]
     - Password
     - Password (again)
     - Enable remote access (Select 'n' if you only plan to use the web interface.)
     - Downloadfolder (Example: /home/user/files would download to your ~/files directory.)
     - Configure ssl? (Select 'y' if you want to use https for the web interface. Ignore the commands it tells you to run for now.)
     - Port 19049 (Use a random 5 digit port between 10000 and 65535. The port number `19049` has automatically been generated by this page and will be used throughout this article, but can be changed if needed [Default:8000].)
     - Server (If you plan to use https, you should select 'threaded')
    
  8. (Optional) If you plan to use SSL for your webinterface, you will need to set up your ssl cert and enable the Use HTTPS option.

     cd ~/.pyload
     openssl genrsa 1024 > ssl.key
     openssl req -new -key ssl.key -out ssl.csr
     openssl req -days 36500 -x509 -key ssl.key -in ssl.csr > ssl.crt
     sed -i 's/"Use HTTPS" = False/"Use HTTPS" = True/' ~/.pyload/pyload.conf
    
  9. With your virtualenv activated, you may now start the pyLoad daemon.

     ~/pyload/pyLoadCore.py --daemon
    
  10. (Optional) Clean up the installation archive

    rm ~/pyload.zip
    
  11. (Optional) Restart the service if the server restarts

    Your server may need to be rebooted from time to time for upgrades or maintenance, to restart this service automatically edit your crontab with crontab -e and add the following line:

    @reboot /home/user/virtualenv2/bin/python2.7 /home/user/pyload/pyLoadCore.py --daemon
    

Usage

You may access your pyLoad web interface by going to http://server.whatbox.ca:19049 where 19049 is the port you chose during configuration. If you chose to use SSL, you will need to use https://server.whatbox.ca:19049 to access the web interface via HTTPS.

On first run, you will need to restart pyLoad from the Administrate link to load new/updated plugins.

pyLoad-ng beta (Python 3)

Installation

  1. Connect to your slot through SSH

  2. Create a Python 3 virtualenv with the instructions found here or use an existing one.

  3. Install pyLoad-ng in the virtual Python environment

     pip install pyload-ng
    
  4. Create the configuration files

     pyload --dry-run
    
  5. Run these commands to edit pyLoad-ng's configuration file to use a unique port and listen on all interfaces.

     sed -i 's|8000|19049|' ~/.pyload/settings/pyload.cfg
     sed -i 's|localhost|0.0.0.0|' ~/.pyload/settings/pyload.cfg
    
  6. Launch the pyLoad-ng daemon. If your virtualenv is in a different directory than ~/virtualenv3 you will need to edit this command.

     ~/virtualenv3/bin/pyload --daemon
    
  7. Access http://server.whatbox.ca:19049 with the default username pyload and password pyload

    Go to http://server.whatbox.ca:19049/settings , click "Users", then click the green "change" button. Set a new secure password for the pyload user.