* WASM module (argon2-browser) does not work properly. Revert "README: add info about single-executable" This reverts commit55343a1353. Revert "CI: separate artifacts" This reverts commit28ba0efd2d. Revert "CI: build pkg executables" This reverts commit482fde49b1. Revert "pkg: initial configuration" This reverts commit6849e9c55b.
7.2 KiB
Flood
Flood is a monitoring service for rTorrent. It's a Node.js service that communicates with rTorrent instances and serves a decent web UI for administration. This project is based on the original Flood project.
Feedback
If you have a specific issue or bug, please file a GitHub issue. Please join the Flood Discord server to discuss feature requests and implementation details.
More information
Check out the Wiki for more information.
Getting started
Pre-Requisites
- rTorrent needs to be installed and running with XMLRPC configuration.
- For Linux & OS X, check out rTorrent's installation wiki and/or this third-party tutorial. When you run
./configure, be sure to run with the--with-xmlrpc-cflag. - For Windows, try this guide.
- For Linux & OS X, check out rTorrent's installation wiki and/or this third-party tutorial. When you run
- Install NodeJS version
Current(you might want to manage different Node versions with nodenv or nvm or n). Flood tracks latest NodeJS release and does NOT provide support to legacy NodeJS versions.
Installation
sudo npm i -g flood or npx flood
Or use @jesec/flood for cutting-edge builds.
Configuration
By default, Flood uses a command line configuration interface. If you installed Flood via npm, you should be able to use flood or npx flood to launch Flood. If you compile Flood from source, you will be able to use npm run start to execute Flood.
Run flood --help, npx flood --help or npm run start -- --help to get help about command line arguments.
If you want to know more about configurations, check config.template.js.
If static configuration is preferred, copy config.template.js to config.js and edit it.
When Flood's builtin user management is enabled (default), you will be prompted to configure the connection to rTorrent when loading the web interface.
What to configure
- If you are proxying requests to Flood from your own web server, configure Flood's path from the host at the
--baseuri(orbaseURI) property. All requests will be prefixed with this value.- For example, if serving Flood from
https://foo.bar/apps/flood, you would setbaseURIto/apps/flood. If serving flood fromhttps://foo.bar, you do not need to configurebaseURI. - Read more about proxying requests to Flood on the Wiki, this is a common pain-point for users.
- For example, if serving Flood from
- Check Wiki, especially
Securitysections.
Upgrade
Run the installation command again.
Troubleshooting
- Debian, Ubuntu and RHEL-based distributions users can install latest
nodejsfrom NodeSource. - Flood and filesystem:
- Flood's relationship with rTorrent is NOT truly server-client. Flood server performs file operations itself. Flood server itself needs to have permissions/access to the files.
- Flood only uses the path provided by rTorrent so it needs to have the same filesystem context as rTorrent. If a file is "/path/to/a/file" to rTorrent, it has to be "/path/to/a/file" to Flood in order to get file operations working. It can't be "/mnt/some/different/path/file".
- Ask for help in the Flood Discord server.
Docker
docker run -it jesec/flood --help
Or jesec/flood:master for cutting-edge builds.
To upgrade, docker pull jesec/flood.
Note that you have to let Docker know which port should be exposed (e.g. -p 3000:3000) and folder mapping (e.g. -v /data:/data).
Don't forget to pay attention to flood's arguments like --port and --allowedpath.
Currently Docker images of this project don't bundle rTorrent (yet). Its usefulness is limited as a result. You have to install rTorrent inside the container or make it possible for Flood inside Docker to interact with your rTorrent instance.
Filesystem parts in Troubleshooting are especially important for containers.
Building Flood
Clone from repository
git clone https://github.com/jesec/flood.git
Compiling assets and starting the server
From the root of the Flood directory...
- Run
npm install. - Run
npm run build. - Run
npm start.
Access the UI in your browser. With default settings, go to http://localhost:3000. You can configure the port via --port argument.
Notes
- When you use
npm run startto execute Flood, you have to pass command line arguments after--. For example,npm run start -- --host 0.0.0.0 --port 8080. This applies to anynpm run(e.g.start:development:client).
Updating
- To update, run
git pullin this repository's directory. - Check
config.template.jsfor configuration changes. - Kill the currently running Flood server.
- Run
npm installto update dependencies. - Run
npm run buildto transpile and bundle static assets. - Start the Flood server with
npm start.
Local Development
- Run
npm install. - Run
npm run start:development:serverandnpm run start:development:clientin separate terminal instances.npm run start:development:serveruses ts-node-dev to watch for changes to the server-side source. Or open the folder with VS code and thenRun -> Start Debugging. You may use a Javascript IDE to debug server codes.npm run start:development:clientwatches for changes in the client-side source. Access the UI in your browser. Defaults tolocalhost:4200. You may use browser's DevTools to debug client codes.
--help --show-hidden shows advanced arguments.
--proxy proxies requests from a development client to a URL of your choice (usually URL to a Flood server). It is useful when you wish to do development on the frontend but not the backend. Or when the frontend and backend are being developed on different hosts.
Environment Variables
DEV_SERVER_PORT: webpackDevServer's port, used when developing Flood. Defaults to4200.DEV_SERVER_HOST: webpackDevServer's host, used when developing Flood. Defaults to0.0.0.0.DEV_SERVER_HTTPS: webpackDevServer's protocol, used when developing Flood. Defaults tohttp.
Building Docker
docker build --pull --rm -f Dockerfile -t flood:latest .docker run -it flood --help
