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

Wiki > Medusa

Installation

virtualenv

Follow the instructions in the virtualenv article to install and activate a Python 3 virtual environment. If you have previously set up a virtualenv, you may reuse it or create a new one with a different name.

Medusa

  1. Download Medusa.

     git clone https://github.com/pymedusa/Medusa.git
    
  2. Activate virtualenv (if not activated)

     source ~/virtualenv/bin/activate
    
  3. Install python module dependencies

     pip install -r Medusa/requirements.txt
    
  4. Start Medusa in the foreground to create the initial configuration files.

     python3 ~/Medusa/start.py
    

Press Ctrl+C once the text browser appears.

  1. Edit the configuration file to set a port and download location. Port 19050 has been automatically generated for you, but you may use another 5 digit port between 10000 and 32767.

     nano ~/Medusa/config.ini
    

    Change the line that reads root_dirs = , to root_dirs = "0|/home/user/files".
    Change the "web_port" option to 19050 or your chosen port. Set a username and password for the web interface by editing web_username = "user" and web_password = "your password here"

  2. Change Your Bash Timezone. If you haven't set your Bash Timezone, your logs and television schedule will be incorrect.

  3. Start Medusa

     python3 ~/Medusa/start.py -d --nolaunch
    

Usage

  • Open your browser and navigate to http://server.whatbox.ca:19050 to access the Medusa web interface. If you selected a different port, use that instead.

Connecting to BitTorrent clients

Connecting to rTorrent

Under Settings > Search Settings > Torrent Search, select rTorrent and use the following information:

    rTorrent host:port: scgi:///home/user/.config/rtorrent/socket

Connecting to Transmission

You will need the Transmission daemon port from your Slot Info page.

Under Settings > Search Settings > Torrent Search, select Transmission and use the following information:

    Transmission host:port: http://localhost:port where port is the Daemon port for Transmission listed on your Slot Info page
    Username: user
    Password: Your server password

Connection to Deluge

You will need the Deluge daemon port from your Slot Info page.

Under Settings > Search Settings > Torrent Search, select Deluge (daemon) and use the following information:

    Deluge: scgi://localhost:port where port is the Daemon port for Deluge listed on your Slot Info page.
    Deluge username: user
    Deluge password: Your server password

Automatically Restart (optional)

  1. Make a file to be used for the script. touch ~/medusa_restart.cron

  2. Edit the file and enter the text below. nano -w ~/medusa_restart.cron

     #!/bin/bash
     if pgrep -f "Medusa/start.py -d --nolaunch" > /dev/null
     then
         echo "Medusa is running."
     else 
         echo "Medusa is not running, starting Medusa"
         ~/virtualenv/bin/python3 ~/Medusa/start.py -d --nolaunch
     fi
     exit
    
  3. Save the file with Ctrl+x, y and Enter to accept overwriting.

  4. Make the script executable. chmod +x ~/medusa_restart.cron

  5. Open your crontab. EDITOR=nano crontab -e

  6. Enter the following text at the end of the file.

    @reboot /home/user/medusa_restart.cron >/dev/null 2>&1
    */5 * * * * /home/user/medusa_restart.cron >/dev/null 2>&1
    
  7. Save the crontab with Ctrl+x, y and Enter to accept overwriting.