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

Wiki > Flood

Flood is an alternative rTorrent web interface using Node.js.

A random port number between 10000 and 32767 is needed and will be used to access Flood once installation is complete. The port number 13340 has automatically been generated and will be used throughout this article, but can be changed if needed.

Installation

  1. SSH into the server following the instructions found here /wiki/ssh

  2. Launch Flood in a background screen session on your random port 13340

     screen -dmS flood npx flood --host 0.0.0.0 --port 13340
    
  3. Access Flood at http://server.whatbox.ca:13340. Choose a username and password you will use to access Flood. For the socket path, enter /home/user/.config/rtorrent/socket

Automatically Restart

Setup Flood to automatically restart should the server reboot for any reason.

  1. Use nano to create the script file and enter the text below. nano -w ~/flood_restart.cron

     #!/bin/bash
     if pgrep -f "npm exec flood --host 0.0.0.0 --port 13340" > /dev/null
     then
         echo "Flood is running."
     else
         echo "Flood is not running, starting Flood"
         screen -dmS flood npx flood --host 0.0.0.0 --port 13340
     fi
     exit
    
  2. Save the file with Ctrl+x and if it prompts press the "y" and Enter to accept overwriting.

  3. Make the script executable. chmod +x ~/flood_restart.cron

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

  5. Enter the following text

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