Install rTorrent with Flood on Ubuntu server 20.04

Typhon0
Typhon0
May 28, 2018 · 3 min read
Image for post
Image for post
Image for post
Image for post

There are multiple web interface for rTorrent like the most known ruTorrent. But all these alternatives haven’t a good UI. Here comes Flood, A modern web UI for rTorrent with a Node.js backend and React frontend.

The project is still work-in-progress but it’s already usable and features are added frequently.

You can find their Github here and more screenshots : https://github.com/jfurrow/flood

Installation have been tested on 17.04 and 20.04.

1. Install rTorrent

The easiest way is to install it from the repo, run:

2. Configure rTorrent

We need to create a dedicated user to avoid running rTorrent with root:

Now we will create a configuration file :

and copy the following:

# Where rTorrent saves the session
session = /srv/torrent/.session
# Which ports rTorrent can use (Make sure to open them in your router)
port_range = 50000-50000
port_random = no
# Check the hash after the end of the download
check_hash = yes
# Enable DHT (for torrents without trackers)
dht = auto
dht_port = 6881
peer_exchange = yes
# Authorize UDP trackers
use_udp_trackers = yes
# Enable encryption when possible
encryption = allow_incoming,try_outgoing,enable_retry
# SCGI port, used to communicate with Flood
scgi_port = 127.0.0.1:5000

You can customize the downloads path

If you haven’t created the folders (download and session), you need to do it :

mkdir /srv/torrent/downloadsmkdir /srv/torrent/.session

And set the permissions

chown rtorrent:rtorrent -R /srv/torrentchown rtorrent:rtorrent /home/rtorrent/.rtorrent.rc

Then we need to create a systemd startup service to launch rTorrent at boot

And add to the file :

[Service]User=rtorrent
Type=forking
KillMode=none
ExecStart=/usr/bin/screen -d -m -fa -S rtorrent /usr/bin/rtorrent
ExecStop=/usr/bin/killall -w -s 2 /usr/bin/rtorrent
WorkingDirectory=%h
[Install]WantedBy=default.target

Then enable it at boot and start it :

systemctl start rtorrent

3. Install Flood

You need first to install Node.js :

sudo apt-get install -y nodejs

if you don’t have Curl installed :

Then clone their repo:

git clone https://github.com/jfurrow/flood.git

if you don’t have Git installed :

We need to copy the template config file:

cp config.template.js config.js

Then install Flood :

4. Start Flood

Before lauching flood we will create a systemD to lauch Flood at startup ( easier to start , stop )

Create a dedicated user to run Flood:

Add permissions

Then create the script :

and copy this:

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

Enable it at boot and start it:

5. Testing

You should now can access it with http://YourIP:3000

Finally it will ask you to create a user/password.

Fill the rTorrent address and port with the one you put in .rtorrent.rc at scgi_port 127.0.0.1 and 5000 for me.

Congratulation ! Flood with rTorrent is installed :)

If you have issues, feel free to comment

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store