-
Notifications
You must be signed in to change notification settings - Fork 172
Docker
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.
To follow this document, you will need:
- A Linux machine with Docker installed (For Docker installation, please visit: https://docs.docker.com/install/linux/docker-ce/ubuntu/)
- Basic knowledge of Linux command
This document will use a 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 source from 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 -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.
-
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
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 # docker run --name flood-standalone \ -e FLOOD_SECRET=$(openssl rand -hex 32) \ -v /path/to/flood/data:/data \ -p 80:3000 flood
-
Access the Flood in browser. Change relative setting with appropriate value.
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 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 |
Currently all data including database will be saved in /data
directory in container. User should mount a host directory to it for future usage.
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.
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
- Public Key: