# NZBGet

NZBGet is an Usenet-client written in C++ and designed with performance in mind to achieve maximum download speed by using very little system resources.

## Installation

- nzbget - daemon, with CLI, and web client listening on port `6789`.
- nzbget-svn - Same as above, but the latest svn version.

## Configuring NZBGet

The default path to the configuration files is `/usr/share/nzbget`. The main configuration can be found in `nzbget.conf`.

## NZBGet Configuration

Copy the configuration file to a custom directory:

    # mkdir -p /usr/local/share/nzbget
    # cp /usr/share/nzbget/nzbget.conf /usr/local/share/nzbget/nzbget.conf

## Starting NZBGet

Note: The NZBGet package doesn't provide a systemd service file. You will have to start it manually instead.

- As running as root:

      # nzbget -c /usr/local/share/nzbget/nzbget.conf

- Starting as daemon:

      # nzbget -c /usr/local/share/nzbget/nzbget.conf -D

## Running NZBGet under different user

For better security it would be better to run NZBGet under a different user. In this example we had created a new user named `nzbget` without a password. Edited the configuration file:

    /usr/share/nzbget/nzbget.conf

    DaemonUsername=nzbget
    MainDir=/home/user/Downloads/NZBGet
    UMask=0007

Created, chown & chmod the desired directories:

    # mkdir /home/user/Downloads/NZBGet
    # chown -R user:nzbget /home/user/Downloads/NZBGet
    # chmod -R 770 /home/user/Downloads/NZBGet

Starting NZBGet:

    $ sudo -u nzbget /usr/bin/nzbget -c /usr/share/nzbget/nzbget.conf -D

Now `/home/user/Downloads/NZBGet` will be accessible for the `user` and for the `nzbget` group to which the `nzbget` user belongs. Making the target directory world read/writable is highly discouraged (i.e. do not chmod the directory to 777). Instead, give individual users/groups appropriate permissions to the appropriate directories.

## Troubleshooting

### NZBGet crashes on start

This may happen when the user edited the NZBGet configuration by the Web-interface (located at http://localhost:6789) filling it with double configs. Clean the configuration and restart the server/daemon again.

## Performance Tips

### Write articles to RAM

Change the WriteBufferSize to one of the following values:

- Value "0" causes an OS-dependent default value to be used.
- With value "-1" (which means "max/auto") the program sets the size of buffer according to the size of current article (typically less than 5)
- A custom value can and must be written in bytes, do not use postfixes "K" or "M".

## See also

- NZBGet Documentation
- Performance Tips

Category:

- Internet applications