Skip to content
This repository has been archived by the owner on May 31, 2021. It is now read-only.
Sam Webb edited this page Oct 17, 2018 · 8 revisions

Introduction

Flood is a WebUI for rtorrent, a popular BitTorrent client use in Linux machines. This document will walk through the steps of installing and configuring Flood via Docker. Note, this document doesn't cover the install and configuration for rtorrent or any other software.

Prerequisites

To follow this document, you will need:

Document Setup

This document will use a Ubuntu 18.04 machine with Docker 18.06.1-ce installed.

Installation

  1. Flood doesn't have its own official docker hub image yet. You have to pull the latest source from GitHub and build it yourself. Don't download source from release tab as it is quite outdated.

    $ git clone https://github.com/jfurrow/flood.git /path/to/flood
    
  2. Change to the directory and build the docker image.

    $ cd /path/to/flood
    $ docker build -t flood-github .
    

    Note: Do not forget the "." as it tells docker where the Dockerfile located in. In the progress of building, you might get error message. Don't worry as it doesn't affect the final build.

  3. Create container form the image just created

    Note: you may need sudo to run docker depending on your installation.

    # docker run --name <name> -e <env_var>=<value> -p <host_port>:3000 -v <path_to_data>:/data flood-github
    
    Paramater
    name discription
    <name> The name for the container (optional)
    <env_var> Environmental Variable Name
    <value> Value for named Environmental Variable
    <host_port> Port number to be exposed to host, possibly the Internet also
    <path_to_data> A directory for saving your flood's data
    Example
    # docker run --name flood-standalone \
    	-e FLOOD_SECRET=$(openssl rand -hex 32) \
        -v /path/to/flood/data:/data \
        -p 80:3000 flood
    
  4. Access the Flood in browser. Change relative setting with appropriate value.

    https://localhost:80/
    

Environmental Variables

Variable Name Accepted Data Type Default Description
FLOOD_BASE_URI String / The directory to access flood
FLOOD_SECRET String flood A key for encrypting session cookie/JWT (strongly recommend to set and save)
RTORRENT_SCGI_HOST URL / IP Address localhost The address of your rtorrent SCGI listening
RTORRENT_SCGI_PORT Integer: 1-65535 5000 The port number of your rtorrent SCGI listening
RTORRENT_SOCK boolean NotSet Enable UNIX Socket connection to rtorrent
FLOOD_ENABLE_SSL boolean NotSet Enable bundled SSL encryption

Data

Currently all data including database will be saved in /data directory in container. User should mount a host directory to it for future usage.

SSL

To use SSL encryption, you need to obtain a SSL certificate from trusted CA or self-sign one. Place public key in <path_to_data>/flood_ssl.cert and private key in <path_to_data>/flood_ssl.key. Add -e FLOOD_ENABLE_SSL=true when creating container.

Limitations

As of current configuration, Flood via Docker have limitation listed below:

  • Fixed database path.
  • Fixed server port.
  • Fixed rtorrent socket location and name. It have to be placed under /data/rtorrent.sock.
  • Fixed SSL certificate location and name. It have to be placed under:
    • Public Key: /data/flood_ssl.cert
    • Private Key: /data/flood_ssl.key
Clone this wiki locally