Skip to content

Updating from 4.x to 5.x

theotherp edited this page Jan 23, 2023 · 8 revisions

What changed

While version 5.0.0 offers no new features per se, a lot has changed under the hood. I've upgraded many of the libraries and upgraded the main framework to a new major version. The database is also a new version which is why a full migration is needed which should run automatically on the next start. This may hopefully reduce the size of the database file and cause less I/O (although I haven't been able to verify that).

But the biggest change is that I (mostly) got rid of Java. I still use it for development but now I can compile binaries for windows and linux which can be directly executed. This means that you don't need java installed to run NZBHydra. While this makes development a bit more complicated it got rid of one of the major complaints about NZBHydra. The compiled binaries also start a lot faster and use way less RAM (on my machine using docker and as a fresh install it starts in 0.9 seconds and uses 180MB memory now versus 9 seconds and 332MB memory before).

How to run

  • If you use docker nothing should change for you. Using the latest image NZBHydra should start as usual, automatically migrating the database on the first start. It may take the maintainers of the image you use (LSIO, BinHex or hotio) some days to upgrade to 5.x.
  • If you run NZBHydra on Windows or Linux directly (i.e. not using docker) and have an AMD64/ARM64 compatible CPU you can continue to do that (although I haven't been able to verify that on all Linux distributions). The startup exes or python files will just run an executable file instead of run java.
  • If you run NZBHydra on other architectures or OSes (M1 and/or on MacOS) or if for some reason the executable does not start on your machine you will have to use the "generic" release type which still requires Java 17. This is because I have to compile every executable on the target architecture and it's just not feasible/possible for me to that for the others. Sorry about that - if possible switch to docker.

How to update

In any case I recommend shutting down NZBHydra and making a complete copy of the folder (either just the data folder for docker users or the complete folder for the others).

Then:

  • On docker just pull the latest image.
  • For x64: Delete the lib folder in the NZBHydra folder. Download the appropriate release zip and extract it into the NZBHydra folder, overwriting all files.
  • For all the others: Download the "generic" release zip and extract it into the NZBHydra folder, overwriting all files.

Afterwards start NZBHydra as usual. Give it some time to migrate the database. Hopefully everything went fine and you have a shiny new NZBHydra update which requires no Java and runs faster and with less RAM - what more could you want? If you don't need Java for anything else feel free to uninstall it.

If hydra won't start

  • If you're on Linux and start hydra using the nzbhydra file please try running the wrapper python file instead. For some reason that seems to make a difference.

How to get support

If anything fails you can always switch back to the old folder or docker image until whatever issue you have is fixed. Then see https://github.com/theotherp/nzbhydra2/issues.

  • If NZBHydra starts please attach the debug infos ZIP.
  • If NZBHydra does not start please attach the .log files from the data/logs folder.