This article will show you how to install Flood. The software is a front-end for rTorrent and an alternative to ruTorrent.
Prior to using this guide, please make sure you have:
You'll need to execute some commands via SSH to use this software. There is a separate guide on how to connect to your slot via SSH. Commands are kept as simple as possible and in most cases will simply need to be copied and pasted into the terminal window (then executed by pressing the Enter key).
Install Flood by logging in via SSH, then copying and pasting the following:
mkdir -p ~/node/apps git clone https://github.com/jfurrow/flood.git ~/node/apps/flood cp ~/node/apps/flood/config.template.js ~/node/apps/flood/config.js
Configuring before starting Flood
We need to make a few config changes before we can run Flood. Copy and paste the following to make those changes:
sed -i "s|floodServerHost: '127.0.0.1'|floodServerHost: ''|g" ~/node/apps/flood/config.js sed -i "s|floodServerPort: .*,|floodServerPort: $(shuf -i 10001-32001 -n 1),|g" ~/node/apps/flood/config.js sed -i "s|secret: 'flood'|secret: '$(< /dev/urandom tr -dc '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' | head -c20; echo;)'|g" ~/node/apps/flood/config.js sed -i "s|socket: false|socket: true|g" ~/node/apps/flood/config.js sed -i "s|socketPath: '/tmp/rtorrent.sock'|socketPath: '$HOME/private/rtorrent/.socket'|g" ~/node/apps/flood/config.js npm install --production --prefix ~/node/apps/flood npm i -g npm npm audit fix --force --prefix ~/node/apps/flood npm run build --prefix ~/node/apps/flood
Starting, stopping and restarting
This section covers the Flood process - starting it, stopping it and restarting it. It also covers checking if the process is running, in case that becomes necessary.
- start and display URL
- screen -dmS flood npm start --prefix ~/node/apps/flood/ && echo http://$(id -u -n).$(hostname -f):$(sed -rn 's/(.*)floodServerPort: (.*),/\2/p' ~/node/apps/flood/config.js)
- check running
- pgrep -fu "$(whoami)" "apps/flood"
- kill "$(pgrep -fu "$(whoami)" "apps/flood")"
- kill "$(pgrep -fu "$(whoami)" "apps/flood")" && sleep 3 && screen -dmS flood npm start --prefix ~/node/apps/flood/ && echo http://$(id -u -n).$(hostname -f):$(sed -rn 's/(.*)floodServerPort: (.*),/\2/p' ~/node/apps/flood/config.js)
- kill (force stop)
- kill -9 "$(pgrep -fu "$(whoami)" "apps/flood")"
- On trying to build Flood I get the error Cannot find module 'webpack-manifest-plugin'
Install that module with the following command, then retry the build:
npm install --prefix ~/node/apps/flood --save-dev webpack-manifest-plugin
When you first navigate to the URL provided by the start command you'll be prompted by Flood to create an account. Do so, and you'll see this screen:
At this point, refresh the page to be taken to the login screen. Log in using the details you just created and Flood should fully load, displaying your torrents.