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

Medusa

Installation

pip

  1. Install pip for python3 (if you haven't already)

       curl -s https://bootstrap.pypa.io/get-pip.py | python3 - --user
    
  2. Add it to your PATH (if you haven't already)

      echo "PATH=\$HOME/.local/bin:\$PATH" >> ~/.bashrc && source ~/.bashrc
    

Medusa

  1. Download Medusa.

     git clone git://github.com/pymedusa/Medusa.git
    
  2. Install python module dependencies

     pip3 install --user -U -r Medusa/requirements.txt
    
  3. Start Medusa in daemon mode to create the initial configuration files.

     python3 ~/Medusa/start.py -d
    
  4. Kill the Medusa process.

     pkill -f start.py
    
  5. Edit the configuration file to set a port and download location. Port 50495 has been automatically generated for you, but you may use another 5 digit port between 10000 and 65535.

     nano ~/Medusa/config.ini
    

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

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

  7. Start Medusa

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

Automatically Restart

Below are steps to take to have your Medusa instance automatically restart if it crashes, or if the server is rebooted.

  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 -fx "/usr/lib/python-exec/python3.6/python3 /home/user/Medusa/start.py -d --nolaunch" > /dev/null
    then
        echo "Medusa is running."
    else 
        echo "Medusa is not running, starting Medusa"
         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.

Usage

  • Open your browser and navigate to http://server.whatbox.ca:50495 to access the Medusa web interface.

Medusa Broken after update

Mid-March 2019 Medsua was updated to use Python3, this means if you set up Medusa on WhatBox before then and then update Medusa would now break, you'll see errors like this

Traceback (most recent call last): File "/mnt/mpathae/**********/Medusa/medusa/search/queue.py", line 503, in run self.success = snatch_episode(result) File "/mnt/mpathae/**********/Medusa/medusa/search/core.py", line 166, in snatch_episode client = torrent.get_client_class(app.TORRENT_METHOD)() File "/mnt/mpathae/**********/Medusa/medusa/clients/torrent/__init__.py", line 47, in get_client_class return get_client_module(name).api File "/mnt/mpathae/**********/Medusa/medusa/clients/torrent/__init__.py", line 36, in get_client_module return __import__('{prefix}.{name}'.format(prefix=__name__, name=name.lower()), fromlist=_clients) File "/mnt/mpathae/**********/Medusa/medusa/clients/torrent/deluged.py", line 15, in <module> from deluge_client import DelugeRPCClient ImportError: cannot import name DelugeRPCClient

You can fix this by doing the following (via SSH):

  1. Kill the Medusa process.

     pkill -f start.py
    
  2. Move to the Medusa install folder

     cd ~/Medusa/medusa
    
  3. Remove all .pyc files

     rm *.pyc
    
  4. Restart Medusa using python3

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