Skip to content

Migrate from older versions of Flood

Jesse Chan edited this page Jan 9, 2021 · 4 revisions

Flood-UI/flood is kept as it is at this moment, in order to avoid sudden breakage of legacy tutorials/users.

Development lives at this repository for the time being. There are major architectural changes, improvements and additions of features. As a result, some issues, feature requests and pull requests are no longer valid. Please refile them in this repository if they are still valid.

v1 -> v4

Flood 4.x uses a command line interface (CLI) for configuration. config.js is deprecated. This allows Flood to be installed system-wide. Read README carefully.

  1. It is no longer needed to clone the repository and compile Flood from sources. Instead, simply run sudo npm install --global flood (or @jesec/flood for rolling builds). Then, you can run flood to launch Flood. Run flood --help to view available configuration arguments.
  2. Flood requires a recent version of Node.js.
  3. Flood frontend no longer depends on build-time configurations. As such, you don't need to recompile if there is a change in configuration.
  4. baseURI configuration mandates requests to be prefixed. If you use reverse proxy with --baseuri, you would have to redirect requests to /{baseURI}/ instead of /. See wiki for more information about reverse proxy.
  5. Flood stores all runtime files to a runtime directory (instead of server/db and server/temp). By default, runtime directory is ~/.local/share/flood. You may specify runtime directory via --rundir CLI argument.
  6. Flood adds torrent to rTorrent by local file path. This may lead to additional filesystem permission requirements. Read Troubleshooting section of README for more details.
  7. Docker image has been revamped. Read README, Wiki and Discussions for more details.
  8. Changes to API endpoints. Notably:
    1. /auth moved to /api/auth
    2. /api/client/add-[files/urls] moved to /api/torrents/add-[files/urls]
    3. add-files accepts JSON with base64-encoded torrent instead of multipart/form-data with binary

Migration Paths

It is recommended to start from scratch. Read README and wiki carefully.

Alternatively, it is also possible to migrate in a lossless manner:

  1. Upgrade to the latest legacy Flood version, if you are not already on it. Simple follow the old Updating instructions. This is because some old database migration paths are removed in v4.
  2. Move database folder dbPath (default: server/db) to ~/.local/share/flood/db. ~/.local/share/flood is the default runtime directory. Alternatively, you can move it to your own <rundir>/db if you wish to specify --rundir manually.
    1. mkdir -p ~/.local/share/flood
    2. mv server/db ~/.local/share/flood/db
  3. Check the current config.js. If you changed a configuration and you wish to retain the change. Read schema/Config.ts to know which command argument you should use to reapply the configuration. Note that Flood now generates a very strong secret at the initial launch by default, so you don't have to specify a secret manually.
  4. Flood is now available in npm, so it is no longer needed to compile Flood from sources. As a result, you may remove source directory (git repository) of Flood.
  5. Run sudo npm install --global flood (@jesec/flood if you want cutting-edge build) to install Flood to system.
    1. If you wish to continue compiling Flood from sources, see Building Flood.
  6. Flood is now installed. Run flood to launch it. flood --help gives hints about command line arguments.