Install Flood on your seedbox

flood
rtorrent

#1

68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6a6f686e667572726f772e636f6d2f73686172652f666c6f6f642d73637265656e73686f74732d612e706e67

Flood is a modern web UI for rTorrent with a Node.js backend and React frontend.

To get started, install Node.js and npm via NodeSource’s PPA as a non-root user.

cd ~
curl -sL https://deb.nodesource.com/setup_9.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt-get install nodejs
sudo apt-get install build-essential
sudo npm install -g node-gyp

Next step is to install Flood

cd /srv
sudo git clone https://github.com/jfurrow/flood.git
cd flood
cp config.template.js config.js
sudo chown -R user:user /srv/flood/
npm install

Change “user:user” to your chosen username from when you installed QuickBox.

There’s a few small changes to make to the config:

sudo nano /srv/flood/config.js

In the config.js file, under scgi port change 5000 to the network.scgi.open_port listed in your /home/user/.rtorrent.rc file, for me this was 39089 but it might be different for you.

On line 5, change floodServerHost and floodServerPort to:

floodServerHost: '0.0.0.0',
floodServerPort: 3030,

On line 16, change ssl, sslKey and sslCert to:

ssl: true,
sslKey: '/root/.acme.sh/DOMAIN/DOMAIN.key',
sslCert: '/root/.acme.sh/DOMAIN/DOMAIN.cer',

Replace DOMAIN with the domain entered in the Let’s Encrypt setup then save the file with Ctrl + X then Y. If you haven’t installed Let’s Encrypt yet, su into root, run box install letsencrypt and follow the prompts.

Finish installation of Flood with:

npm run build

Now to start Flood via systemd, sudo su into root and run:

nano /etc/systemd/system/flood.service

Copy and paste the below script

[Service]
WorkingDirectory=/srv/flood
ExecStart=/usr/bin/npm start
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=notell
User=%I
Environment=NODE_ENV=development
 
[Install]
WantedBy=multi-user.target

To enable the new flood.service:

systemctl enable flood
systemctl start flood

Flood should now be running alongside QuickBox and ruTorrent.

All done! Access Flood via https://example.com:3030

Image%202018-01-26

If you want to add a Flood menu entry into the QuickBox dashboard, open the custom.menu.php file located in the /srv/rutorrent/home/custom directory.

Under the first section titled // INSERT YOUR CUSTOM EXTERNAL or INTERNAL LINKS HERE! // add
$floodURL = "https://" . $_SERVER['HTTP_HOST'] . ":3030/";

Next, find the section titled // INSERT YOUR CUSTOM EXTERNAL or INTERNAL MENU ITEMS HERE! // and add
<li><a class="grayscale" href="<?php echo "$floodURL"; ?>" target="_blank"><img src="img/brands/flood.png" class="brand-ico"> <span>Flood</span></a></li>

Lastly, go to the /srv/rutorrent/home/img/brands directory and add the below flood.png image to the folder.

flood


Let's Encrypt error
:bulb: Flood rtorrent GUI on QuickBox
#2

Nice, gonna give this a go now. Looks great. Thanks for posting :grin:


#3

Absolutely Awesome :smile:


#4

Awesome!! Thanks!!


#5

awesome Thanks


#6

Works great, any idea to force it to connect via https?


#7

Install went smoothly, BUT when i access myip.com:3000 i get :

myip doesn't allow the connection "_ERR_CONNECTION_REFUSED_"

from a chrome browser. Is there something i missed ?


#8

set the ip in the config file to 0.0.0.0 it forces it to listen on external ip


#9

Just pls tell me what config file should i put it into :slight_smile:

Is it /srv/flood/config.js line :

scgi: {
host: ‘0.0.0.0’,


#10

its in the config.js line
floodServerHost: ‘0.0.0.0’,


#11

Well, no luck :frowning:
Everything goes fine until accessing myip.com:3000

either leaving that config.js as is or editing it with 0.0.0.0


#12

Close the current Flood screen and try this:

cd /srv/flood
sudo cp config.template.js config.js

That’ll give you a new config.js, open it using sudo nano /srv/flood/config.js

Scroll down till you see this:

  scgi: {
     host: 'localhost',
     port: 5000,

Change port 5000 to your ruTorrent scgi port. The easiest way to get this is to go to your QuickBox dashboard, go to the Service Control Center widget, hover over the little icon next to ruTorrent and it’ll display your current scgi port. That’s the port you replace port 5000 with in the config.js.

Save the changes made to config.js, and run:

screen -S flood
cd /srv/flood
npm start

If you’ve done that and it still doesn’t work, did you make any other changes to your config.js?

Edit: If you did the scgi port part correctly then I’m not sure what else it could be. Make sure you’re not trying to access Flood via HTTPS :stuck_out_tongue:


#13

First of all, thank you for the help. I didn’t edit anything else than that port 5000.
Tried once again but still
_ERR_CONNECTION_REFUSED_


#14

What distro/version are you using? I’ve only tested this on Ubuntu 16.04.

Is ufw or any other firewall enabled?

Also, when you start flood with npm start it should output a log, can you post that here?


#15

Using Ubuntu Server 16.04.
Unfortunately, i removed it all because it slowed down the whole server like crazy till many things hung. :confused:

EDIT:
rtorrent (rutorrent) still is kinda slow, ~30 seconds before it responds and fully loads. Regarding my misadventures here, do you know where it could be from ?


#16

I’ve updated the Wiki to include how to start Flood at boot via systemctl


#17

Hello, Vustom. Thank you so much for Flood. However like /u/gregblink, I’m getting a “connection refused” error too and I’ve tried it on two servers. I have checked with the post and comments time and again to see if I’m doing something wrong and the only questionable line was “sudo chown -R user:user /srv/flood/”, as in, should the “user:user” be “myusername:myusername” or just “myusername”?


#18

I’ve used “myusername:myusername” so for me it’d be “vustom:vustom”. I’m not really sure why you guys are getting a connection error as I’ve used this guide myself without issue. Running Ubuntu 16.04 with QuickBox, Resilio Sync, ruTorrent and Flood. Are either of you running any extra QuickBox apps & do any errors appear when running npm install --production in /srv/flood?


#19

Thanks for replying, Vustom. Here is the debug log: https://pastebin.com/HPuLT2cc

Nope. I’m not using any extra apps. This “connection refused” error happened on the two servers I have owned. I don’t know why this keeps happening. Perhaps you can help, looking at the debug log. Cheers!


#20

Hello I followed all instructions but i get connection refused ( i tried to change the port, reinstall on different users ) but nothing work :confused:

EDIT : everything is fine, set the host to 0.0.0.0 & port to 3001 ( and don’t forget to turn ssl true in config if you have ssl )