-
Notifications
You must be signed in to change notification settings - Fork 173
Docker
Flood is a WebUI for rtorrent, a popular BitTorrent client used in Linux machines. This document will walk through the steps of installing and configuring Flood via Docker. Please note that this document doesn't cover the installation and configuration for rtorrent or any other software.
To follow this document, you will need:
- A Linux machine with Docker installed (to install docker, follow the instructions for your specific system at https://docs.docker.com/install)
- Basic knowledge of Linux commands
This document will use an Ubuntu 18.04 machine with Docker 18.06.1-ce installed.
-
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 the source from the release tab as it is quite outdated.
$ git clone https://github.com/jfurrow/flood.git /path/to/flood
-
Change to the directory and build the docker image.
$ cd /path/to/flood # docker build --network=host -t flood-github .
Note: Do not forget the "." as it tells docker where the Dockerfile located. In the progress of building, you might get error messages. Don't worry as they will not affect the final build.
Note: You might need/want to run
docker
with superuser permissions. You can do this using thesudo
command. -
Create a container from the image created in step 2.
# docker run --name <name> -e <env_var>=<value> -p <host_port>:3000 -v <path_to_data>:/data flood-github
name description <name> The name for the container (optional) <env_var> Name of an environmental variable <value> Value for said environmental variable <host_port> Port number to be exposed to host (thus possibly also to the internet) <path_to_data> A directory for saving Flood's data # docker run --name flood-standalone \ -e FLOOD_SECRET=$(openssl rand -hex 32) \ -v /path/to/flood/data:/data \ -p 80:3000 flood
-
Access Flood via a browser. Change
<host_addr>
and<host_port>
according to your configuration.<host_addr>
is the address of the machine where Flood is running.https://<host_addr>:<host_port>/
https://localhost:80/
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 recommended to set and save) |
RTORRENT_SCGI_HOST | URL / IP Address | localhost | The address of your rtorrent SCGI socket |
RTORRENT_SCGI_PORT | Integer: 1-65535 | 5000 | The port of your rtorrent SCGI socket |
RTORRENT_SOCK | boolean | NotSet | Enable UNIX socket connection to rtorrent |
FLOOD_ENABLE_SSL | boolean | NotSet | Enable bundled SSL encryption |
Currently all data including the database will be saved in the /data
directory in the container. You should mount a host directory to it for future usage.
To use SSL encryption, you need to obtain an SSL certificate from a trusted CA or self-sign one. Place the public key in <path_to_data>/flood_ssl.cert
and the private key in <path_to_data>/flood_ssl.key
. After that, you can set -e FLOOD_ENABLE_SSL=true
when creating the container.
In its current configuration, Flood via Docker has the following limitations:
- Fixed database path.
- Fixed server port.
- Fixed rtorrent socket location and name. It has to be located at
/data/rtorrent.sock
. - Fixed SSL certificate locations and names. They have to be located at:
- Public Key:
/data/flood_ssl.cert
- Private Key:
/data/flood_ssl.key
- Public Key: