Get started
Install and build
RustyGet builds from source with CMake, a C++20 compiler, and Rust. Release packages come back once the build workflows are rebuilt for the rewrite.
Requirements
| Tool or library | Version | Notes |
|---|---|---|
| CMake | 3.15 or later | 3.13 can build, but cmake --install needs 3.15. |
| C++ compiler | GCC 11+ or Clang 14+ | C++20 support is required. GCC 13 or later is recommended. |
| Rust | 1.99.0 | Pinned in rust/rust-toolchain.toml. With rustup, the right toolchain installs itself on the first build. |
| libxml2 | any current | Development headers |
Boost.JSON, Boost.Asio |
1.81 or later | CMake fetches Boost if your system lacks it. |
| OpenSSL | any current | For encrypted server connections |
| zlib | any current | For gzip in the web server |
| ncurses | any current | Optional, for the terminal interface |
| unrar, 7-Zip | any current | At run time, for unpacking |
Install the libraries
Debian 13 and Ubuntu 24.04:
sudo apt install cmake build-essential libncurses-dev libssl-dev libxml2-dev zlib1g-dev libboost-json-dev
Debian 12 names the Boost package by version, so use libboost-json1.81-dev instead of libboost-json-dev. On a release with neither, leave the Boost package out, and CMake fetches Boost itself.
macOS with Homebrew:
xcode-select --install
brew install cmake ncurses openssl libxml2 zlib boost
FreeBSD:
pkg install cmake ncurses openssl libxml2 zlib boost-libs
Install Rust
Install rustup from rustup.rs, then check that cargo is on your path:
cargo --version
You don't need to pick a version. The repository pins Rust 1.99.0, and rustup installs it the first time the build runs cargo inside rust/.
Build
git clone https://github.com/Appz4Fun/nzbget.git rustyget
cd rustyget
cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j 8
The binary is build/nzbget. The program still uses NZBGet's filenames, such as nzbget and nzbget.conf, while the rename is in progress.
To install it system-wide, along with the web interface, a configuration template, and a default configuration in /usr/local/etc:
sudo cmake --install build
sudo cmake --build build --target install-conf
To run it as your own user instead of as a service, give yourself a private copy of the configuration, which RustyGet finds at ~/.nzbget:
[ -e ~/.nzbget ] || install -m 600 /usr/local/share/nzbget/nzbget.conf ~/.nzbget
The test keeps an existing ~/.nzbget when you run the steps again for an upgrade.
To install into your home directory instead, without sudo, configure a separate build directory with the prefix, and use the paths under it. A build directory remembers the paths it first wrote into its copy of nzbget.conf, so don't reuse build:
cmake -B build-home -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$HOME/usr"
cmake --build build-home -j 8
cmake --install build-home
[ -e ~/.nzbget ] || install -m 600 ~/usr/share/nzbget/nzbget.conf ~/.nzbget
~/usr/bin/nzbget -D
Build options
| Option | Effect |
|---|---|
-DENABLE_TESTS=ON |
Builds the unit tests. Run them with ctest in the build folder. |
-DDISABLE_CURSES=ON |
Builds without the terminal interface. |
-DDISABLE_PARCHECK=ON |
Builds without par2 check and repair. |
-DDISABLE_GZIP=ON |
Builds without zlib. |
-DNZBGET_RUST_TARGET=<triple> |
Sets the Rust target for a cross build, such as aarch64-unknown-linux-gnu. |
First start
Copy the default configuration, then start RustyGet in the foreground from the source tree to check it:
[ -e ~/rustyget.conf ] || install -m 600 nzbget.conf ~/rustyget.conf
build/nzbget -c ~/rustyget.conf -o WebDir="$PWD/webui" -o ConfigTemplate="$PWD/nzbget.conf" -s
Downloads go under ~/downloads until you change MainDir. After cmake --install, the installed configuration files already point at the installed web interface, and nzbget -s is enough.
Then open the web interface at http://<host>:6789. The default login is nzbget with the password tegbzn6789. Change it in SECURITY before you expose the port. Quick start walks through the first settings.
If the terminal interface can't open your terminal, add -o outputmode=log.
Run as a service
On Linux with systemd, run RustyGet as its own user. Create the user with a home directory, which becomes the base of the default MainDir, ~/downloads, and give it the installed configuration file, which the web interface writes to:
sudo useradd --system --create-home --home-dir /var/lib/nzbget nzbget
sudo chown nzbget: /usr/local/etc/nzbget.conf
sudo chmod 600 /usr/local/etc/nzbget.conf
The file holds your news-server passwords and API keys once you save settings, so only the service user may read it.
Then add a unit such as /etc/systemd/system/nzbget.service:
[Unit]
Description=RustyGet Usenet downloader
After=network-online.target
Wants=network-online.target
[Service]
User=nzbget
Group=nzbget
Type=forking
ExecStart=/usr/local/bin/nzbget -D -c /usr/local/etc/nzbget.conf
ExecStop=/usr/local/bin/nzbget -Q -c /usr/local/etc/nzbget.conf
Restart=on-failure
[Install]
WantedBy=multi-user.target
Start it with sudo systemctl enable --now nzbget. These paths assume the default install prefix, /usr/local; adjust them if you set CMAKE_INSTALL_PREFIX.
On other systems, start RustyGet with nzbget -D from your init system and stop it with nzbget -Q.
Move from NZBGet
RustyGet reads NZBGet's configuration file, queue, and history, so you can point it at an existing setup.
- Stop NZBGet.
- Back up the queue directory (
QueueDir) andnzbget.conf. - Start RustyGet with the same configuration file.
RustyGet writes the queue in NZBGet's format and keeps its own extra data in a trailer that NZBGet ignores, so NZBGet can still read the queue afterward. Some RustyGet-only state is lost if you go back.
The new settings all default to NZBGet's behavior. Turn on the duplicate features one at a time, as described in Duplicate fleets.