Flood (web interface for rtorrent) on CentOS 7

Install rTorrent
install rtorrent screen
adduser rtorrent

Confgure rTorrent

vi /home/rtorrent/.rtorrent.rc
    # Where rTorrent saves the downloaded files
    directory = /srv/torrent/downloads

    # 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

mkdir /srv/torrent
mkdir /srv/torrent/downloads
mkdir /srv/torrent/.session
chmod 775 -R /srv/torrent
chown rtorrent:rtorrent -R /srv/torrent
chown rtorrent:rtorrent /home/rtorrent/.rtorrent.rc

vi /etc/systemd/system/rtorrent.service
    [Unit]
    Description=rTorrent
    After=network.target

    [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

systemctl enable rtorrent.service
systemctl start rtorrent

Install Flood
yum install gcc-c++ make curl git -y
curl -sL https://rpm.nodesource.com/setup_8.x | bash -
yum install -y nodejs

cd /srv/torrent
git clone https://github.com/jfurrow/flood.git
cd flood
cp config.template.js config.js

To access flood remotely
vi config.js
floodServerHost: '0.0.0.0'

npm install

If no error, continue with:

npm install -g node-gyp
npm run build

Start Flood
adduser flood
chown -R flood:flood /srv/torrent/flood/

vi /etc/systemd/system/flood.service
    [Service]
    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

systemctl enable flood
systemctl start flood

Flood should be available via http://IP:3000. You need to create a new user and you’re all set.

Links:
https://github.com/jfurrow/flood
https://freedif.org/flood-modern-web-ui-for-rtorrent
https://github.com/nodesource/distributions
https://wiki.archlinux.org/index.php/RTorrent
https://en.wikipedia.org/wiki/BitTorrent_protocol_encryption

Leave a comment

You must be logged in to post a comment.