-
Notifications
You must be signed in to change notification settings - Fork 138
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.
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.
- 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 runflood
to launch Flood. Runflood --help
to view available configuration arguments. - Flood requires a recent version of Node.js.
- Flood frontend no longer depends on build-time configurations. As such, you don't need to recompile if there is a change in configuration.
-
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. - Flood stores all runtime files to a runtime directory (instead of
server/db
andserver/temp
). By default, runtime directory is~/.local/share/flood
. You may specify runtime directory via--rundir
CLI argument. - Flood adds torrent to rTorrent by local file path. This may lead to additional filesystem permission requirements. Read
Troubleshooting
section ofREADME
for more details. - Docker image has been revamped. Read
README
, Wiki and Discussions for more details. - Changes to API endpoints. Notably:
-
/auth
moved to/api/auth
-
/api/client/add-[files/urls]
moved to/api/torrents/add-[files/urls]
-
add-files
accepts JSON with base64-encoded torrent instead ofmultipart/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:
- 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.
- 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.mkdir -p ~/.local/share/flood
mv server/db ~/.local/share/flood/db
- 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. - 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.
- Run
sudo npm install --global flood
(@jesec/flood
if you want cutting-edge build) to install Flood to system.- If you wish to continue compiling Flood from sources, see Building Flood.
- Flood is now installed. Run
flood
to launch it.flood --help
gives hints about command line arguments.