How can I automate downloads in NZBGet?

NZBGet is a powerful Usenet downloader that allows you to automate the process of downloading binary files. By automating downloads, you can save time and ensure a hands-free experience, allowing NZBGet to manage your downloads without constant manual intervention. This guide explores ways to set up automation within NZBGet.

Automating NZBGet downloads can integrate with tools like Sonarr, Radarr, and Lidarr, making it easy to fetch content such as TV shows, movies, and music. By connecting NZBGet with these tools, users can streamline the download process, ensuring that content is downloaded and processed automatically, reducing manual efforts.

Why Automate Downloads in NZBGet?

Automating downloads in NZBGet offers several key benefits that can significantly improve your overall experience when using Usenet for file downloading. Here’s a detailed explanation of why automation is a great idea:

1. Efficiency

  • Hands-Off Operation: Automation allows you to set up NZBGet once and let it run on its own, without requiring constant manual intervention. Once everything is configured, it can automatically download, repair, extract, and even organize your files without you needing to do anything.
  • 24/7 Availability: You don’t need to be physically present or monitor NZBGet to download files. Automation ensures your downloads keep running whether you’re at your computer or not, even while you’re sleeping or away from home.

2. Consistency

  • No Missed Downloads: Automating the process ensures that your NZBGet client will automatically grab NZB files and start downloading them as soon as they are available. This is especially important for those who rely on regular media updates, such as TV shows or movies, to keep their libraries current.
  • Predictable Workflow: By automating tasks like file extraction, repair (PAR checks), and organizing completed downloads, you eliminate the risk of forgetting to complete a step, such as manually unpacking files or moving them to the right directory.

3. Seamless Integration with Media Management Tools

  • Integration with Sonarr, Radarr, and Lidarr: Automation allows you to integrate NZBGet with media management tools like Sonarr (TV shows), Radarr (Movies), and Lidarr (Music). Once you set it up, these tools can automatically fetch NZB files from Usenet, send them to NZBGet for downloading, and even organize the files into your desired folder structure.
  • Example: When a new episode of a TV show you follow is released, Sonarr can find the NZB file for it, send it to NZBGet, and NZBGet will automatically download, repair, and extract the file, all without any manual input.
  • Reduced Setup Time: By automating NZB fetching and processing, you minimize the need to manually search for and download NZB files from Usenet indexers or providers, saving you valuable time.

4. Time-Saving

  • Set it and Forget it: Once your automation rules are in place, you don’t have to spend time downloading each file manually or monitoring the progress of each download. Automation takes care of fetching, downloading, repairing, extracting, and organizing, allowing you to focus on other tasks or enjoy your media.
  • Batch Processing: Rather than manually processing each individual NZB file one by one, automation allows you to batch-process multiple downloads at once, further streamlining the process.

5. Reduced Risk of Human Error

  • Consistent Workflow: Without automation, human error can occur—such as forgetting to add an NZB file to NZBGet, failing to repair files when needed, or missing a download entirely. By automating, you ensure that every download is handled the same way every time.
  • Fewer Mistakes: Automated systems handle repetitive tasks precisely, reducing the risk of mistakes that might arise from managing downloads manually, especially when dealing with complex file structures or multiple NZB files.

6. Resource Management

  • Efficient Use of Resources: Automation helps ensure that your system is using its resources efficiently. By setting up specific download times or limiting download speeds, you can reduce the impact of downloads on your other activities.
  • Scheduling Downloads: You can set up automation to download files only during off-peak hours, which can save on bandwidth costs, prevent network congestion, and avoid slowing down other online activities.

7. Scalability

  • Manage Large Volumes of Downloads: As your media library grows, the number of NZB files you need to download will also increase. Automating the process makes it easier to scale your downloads without becoming overwhelmed. You don’t have to manually keep track of dozens or hundreds of new releases; automation handles it for you.
  • Multiple Indexers: You can set up multiple NZB indexers for redundancy, ensuring that NZBGet can automatically download from various sources without missing anything.

8. Post-Processing and Organization

  • Automatic File Repair and Extraction: Once a download completes, NZBGet can automatically repair the file (if needed) using PAR files and extract RAR files without requiring your attention. This makes sure that all downloads are ready for use as soon as they’re finished.
  • Organizing Downloads: You can also automate the process of moving and renaming files into the appropriate folders based on their category (e.g., TV shows, movies, music). This keeps your library neat and well-organized.

Prerequisites for Automation

Before you can start automating downloads in NZBGet, there are a few essential prerequisites that need to be in place to ensure everything functions smoothly. These prerequisites help set up the environment and ensure that NZBGet can automatically process NZB files and integrate with other automation tools.

1. NZBGet Installation

  • NZBGet Software: The first step is ensuring that NZBGet is properly installed on your device (whether it’s a PC, server, or NAS). You can download the latest version from the NZBGet website.
  • Installation: Follow the installation instructions based on your operating system (Windows, macOS, Linux, etc.). For Linux, this might involve using package managers like apt (Ubuntu/Debian) or yum (CentOS). For Windows, an installer is available that guides you through the setup.
  • Configuration: Once installed, you’ll need to configure NZBGet by entering basic settings like download paths, directories for temporary files, and your Usenet provider settings (which we will cover in the next step).

2. Usenet Provider Access

  • What is Usenet?: Usenet is a global distributed discussion system that also serves as a platform for file sharing (binary files like movies, software, and more). To download from Usenet, you need a subscription to a Usenet provider that offers access to their servers.
  • Choosing a Usenet Provider: Providers like Newshosting, Giganews, or Easynews offer NZB file support and server access, typically with a monthly subscription fee. These servers are where NZBGet will pull the files from when automated downloads are triggered.
  • Getting Usenet Credentials:
    • Server Address: This is the URL or IP address of the Usenet server.
    • Port Number: The port used for SSL or non-SSL connections (e.g., 563 for SSL).
    • Username and Password: You’ll need these credentials from your Usenet provider to authenticate your connection.
  • Adding Usenet Provider to NZBGet:
    • In the NZBGet settings, navigate to Settings > News-Servers and add your provider’s server information (server address, port, username, password).
    • You may also need to configure SSL settings if you want encrypted connections for better privacy.

3. NZB File Sources (Indexers)

  • What is an NZB File?: An NZB file is a specialized file format used to download binary files from Usenet. It contains the metadata required to download parts of files from Usenet.
  • Manually Downloading NZB Files: You can manually search for NZB files from Usenet indexers and upload them to NZBGet. However, this is not ideal for automation because it requires manual effort.
  • Automating NZB Retrieval with Indexers: To fully automate your downloads, NZBGet needs to be integrated with Usenet indexers. These are services or websites that index Usenet content and provide NZB files for downloading.
    • Popular Indexers: Examples include NZBGeek, NZB.su, and NZB Finder. Most of these indexers require you to register and may also offer premium accounts with better access to high-quality NZB files.
    • API Integration: Most Usenet indexers offer API access, which allows NZBGet to automatically retrieve NZB files. You will need to generate an API key from your indexer account to allow NZBGet to communicate with it.
  • Connecting Indexers to NZBGet: Once you’ve chosen and registered with an indexer, you need to configure it in NZBGet:
    • Go to Settings > NZBGet Settings and enter the API key and URL for your chosen indexer(s).
    • Some automation tools, like Sonarr or Radarr, can also interact directly with indexers, allowing for automatic searching and retrieval of NZBs.

4. Media Automation Tools (Optional)

  • Sonarr (TV Shows): If you want to automate TV show downloads, you can integrate NZBGet with Sonarr. Sonarr automates the process of downloading new episodes based on your preferences (like quality, release group, etc.).
    • Setup: Install Sonarr, configure your Usenet provider and indexer in Sonarr’s settings, and link it to NZBGet by entering the NZBGet API key into Sonarr.
  • Radarr (Movies): For movies, Radarr offers similar automation. It can automatically search and download movies from NZBGet using configured indexers and Usenet providers.
    • Setup: Similar to Sonarr, configure Radarr with the Usenet provider, set download quality preferences, and integrate it with NZBGet using the NZBGet API key.
  • Lidarr (Music): If you’re into music downloads, Lidarr is a great tool that can also automate NZB downloads for music albums. The integration process is the same as with Sonarr and Radarr.

5. Network and Permissions

  • Network Configuration: Ensure that your network setup allows NZBGet to connect to the Usenet provider and indexer. If you’re running NZBGet on a home server or NAS, ensure that your firewall or router settings allow outgoing connections on the Usenet ports (typically 119 for non-SSL and 563 for SSL).
  • Permissions: NZBGet will need appropriate file permissions to save, repair, and extract downloaded files into the directories you configure. Ensure that the download directories (temporary and completed) are writable by the NZBGet process.

6. Scheduling Tasks (Optional)

  • For advanced automation, you may want to schedule certain actions, like cleaning up old downloads or running post-processing scripts.
  • Cron Jobs (Linux/Mac) or Task Scheduler (Windows) can help schedule tasks that trigger based on your desired time or interval.

Automating with Indexers in NZBGet

NZB indexers play a crucial role. These indexers provide you with the NZB files that NZBGet uses to download content. By automating the process, you can streamline your downloads without manual intervention.

What is an NZB Indexer?

An NZB indexer is essentially a search engine for Usenet content. It indexes all the binary files (e.g., movies, TV shows, software, etc.) posted to Usenet newsgroups, making them searchable by keywords. When you want to download something from Usenet, you search an NZB indexer, find the NZB file, and pass it to a Usenet downloader like NZBGet.

Common NZB indexers include:

  • NZBGeek
  • NZB.su
  • DrunkenSlug
  • OZnzb
  • Newzbin

Why Automate NZB Downloads Using Indexers?

  • Efficiency: Automation allows NZBGet to fetch NZB files automatically based on your download preferences, removing the need for you to manually search and upload them.
  • Instant Downloading: Once a file is available through an indexer, NZBGet can automatically pick it up and start downloading, even without you needing to check or monitor the indexer.
  • Better Integration with Media Managers: When you integrate NZBGet with indexers, it becomes even more powerful when paired with media automation tools like Sonarr, Radarr, and Lidarr, which can automatically find and send NZB files to NZBGet.

How to Automate NZB Downloads with an Indexer?

  1. Choose an NZB Indexer:
  • First, choose a Usenet indexer that suits your needs. Some are public (free), while others require a paid subscription for better quality and retention.
  • Popular options like NZBGeek, NZB.su, or NZBPlanet often require an account, and you will need an API key (a unique access code for their API service) for integration with NZBGet.
  1. Obtain an API Key from Your Indexer:
  • Sign up for an account with your chosen indexer.
  • After logging in, navigate to your account settings or API section to generate or copy your API key. This key is what will allow NZBGet to fetch NZB files automatically from the indexer.
  1. Integrate the Indexer into NZBGet:
  • Access NZBGet’s Web Interface: Open your NZBGet web interface in your browser (usually something like http://localhost:6789).
  • Go to Settings: In the NZBGet web interface, go to Settings > News-Servers.
  • Set Up the Indexer:
    • Scroll to the Indexers section of the settings.
    • Add your chosen NZB indexer by entering the necessary details:
    • Indexer name: Give it a recognizable name.
    • URL: Enter the API endpoint URL provided by the indexer (e.g., https://api.nzbgeek.info for NZBGeek).
    • API Key: Paste the API key you obtained earlier.
    • Click Save Changes.
  1. Set Up Automation Rules for NZBGet:
  • Once your indexer is integrated, you can set up automation rules so NZBGet fetches NZB files without you having to manually intervene.
  • Automation via NZBGet’s Categories: You can create download categories like Movies, TV Shows, Music, etc., in NZBGet and assign them to certain NZB files from the indexer.
  • NZBGet will automatically organize and process files based on these categories, ensuring that the right content is downloaded, extracted, and sorted into your desired folders.
  • Automation for Search: You can set up automatic searches for specific terms or shows, so when a new episode or movie is released, the indexer can automatically trigger NZBGet to start the download.

Automating with Sonarr, Radarr, and Other Media Managers

To make the process even more automated, you can integrate NZBGet with media management tools like Sonarr, Radarr, and Lidarr. These tools are designed to automatically search for and fetch NZB files from your configured indexers.

  • Sonarr (TV Shows): Once you configure NZBGet as a download client in Sonarr, Sonarr will automatically search indexers for new episodes based on your series list and then send the corresponding NZB files to NZBGet.
  • Radarr (Movies): Similarly, Radarr will automatically search for movies you want to download and send the NZB files to NZBGet.
  • Lidarr (Music): For music downloads, Lidarr works in a similar way.

How this works:

  1. Sonarr, Radarr, or Lidarr regularly checks your list of TV shows, movies, or music.
  2. When it finds a new release or episode, it sends the NZB request to NZBGet.
  3. NZBGet automatically fetches the NZB from the indexer and starts downloading it, without needing any manual input from you.

Automating with Usenet Download Clients

Usenet download clients like Sonarr, Radarr, and Lidarr are specifically designed to work alongside NZBGet (and other Usenet clients) to automate the process of finding and downloading content like TV shows, movies, and music. By linking NZBGet with these tools, you can set up an entire automated pipeline that fetches, downloads, and organizes content for you.

1. What is Sonarr, Radarr, and Lidarr?

  • Sonarr: Automates the process of finding and downloading TV shows. It can search Usenet indexers, find NZB files, and automatically send them to NZBGet for downloading. Once the download is complete, Sonarr handles post-processing, such as renaming, organizing, and even adding it to a media server like Plex or Emby.
  • Radarr: Similar to Sonarr, but for movies. It can search for movies in specific quality and download them automatically. Radarr can also handle post-processing, ensuring that movies are renamed, organized, and ready for your media center.
  • Lidarr: A tool for automating the download of music albums, similar to Sonarr for TV shows. Lidarr integrates with NZBGet to find music albums, download them, and perform necessary post-processing tasks like renaming and sorting.

These tools all have the ability to integrate with NZBGet through APIs, making them central to automation workflows.

2. Connecting NZBGet with Sonarr, Radarr, and Lidarr

Setting Up NZBGet for Automation

Before you can integrate NZBGet with Sonarr, Radarr, or Lidarr, you need to configure the NZBGet API (Application Programming Interface) settings to allow these clients to communicate with it.

  • Access NZBGet Settings: Open NZBGet’s web interface (typically at http://localhost:6789) and navigate to the Settings page.
  • Enable the NZBGet Web API: In the Web UI section of the settings, enable the web API by checking the option to allow remote connections.
  • Configure API Key: The API key is a unique string of characters that allows the automation clients (like Sonarr) to securely communicate with NZBGet. Note down this API key, as you’ll need it later to link Sonarr, Radarr, or Lidarr to NZBGet.
Integrating Sonarr with NZBGet
  1. Install Sonarr: If you haven’t already, download and install Sonarr.
  2. Configure Sonarr to Use NZBGet:
  • Go to Settings > Download Clients in Sonarr.
  • Click Add New and select NZBGet.
  • Enter your NZBGet hostname (usually localhost if it’s on the same machine), port (typically 6789), and the API key you got from the NZBGet settings.
  • Test the connection to ensure that Sonarr can communicate with NZBGet properly.
  1. Configure Sonarr’s Automation:
  • Once connected, Sonarr will automatically use NZBGet to download any TV show episodes you add to your library.
  • You can set preferences for the quality of episodes, and Sonarr will search indexers for the right NZBs. When an NZB is found, it will send it to NZBGet for downloading.
Integrating Radarr with NZBGet
  1. Install Radarr: If you haven’t yet, download and install Radarr.
  2. Configure Radarr to Use NZBGet:
  • Navigate to Settings > Download Clients in Radarr.
  • Select NZBGet and enter the same details as above (hostname, port, and API key from NZBGet).
  • Test the connection to make sure it works.
  1. Configure Radarr’s Automation:
  • Radarr works in the same way as Sonarr but is designed for movies. Set your preferred movie qualities, and Radarr will search indexers for NZBs of your desired films.
  • When a movie is found, Radarr will send the NZB file to NZBGet for downloading. Afterward, Radarr handles renaming, sorting, and adding it to your media library.
Integrating Lidarr with NZBGet
  1. Install Lidarr: Download and install Lidarr to manage music.
  2. Configure Lidarr to Use NZBGet:
  • Navigate to Settings > Download Clients in Lidarr.
  • Select NZBGet and enter your NZBGet connection details (hostname, port, and API key).
  • Test the connection to ensure everything is working properly.
  1. Configure Lidarr’s Automation:
  • Lidarr can automatically search for albums based on the artists or genres you want.
  • Once it finds the album, it sends the NZB file to NZBGet for download.
  • After the download completes, Lidarr will post-process the music by renaming and organizing the files.

3. Setting Up Download Preferences

Once NZBGet is connected to Sonarr, Radarr, and Lidarr, you can set up rules that will fine-tune the automated downloading process:

  • Quality Preferences: You can set what resolution or quality you prefer for TV shows or movies. For instance, you might want only 1080p or higher movies or TV shows.
  • Search Intervals: You can configure how often Sonarr or Radarr will search for new episodes or movies.
  • Metadata & Sorting: Customize how your files are named and organized on your storage system after downloading.
  • Categories: Configure NZBGet to organize your downloads by categories (e.g., “TV Shows,” “Movies,” “Music”).

4. Post-Processing Automation

Once your NZBs are downloaded via NZBGet, Sonarr, Radarr, and Lidarr take care of post-processing:

  • Renaming: The downloaded files will be renamed to match the show or movie title, based on your preferences.
  • Organizing: Files are moved to the appropriate folders (e.g., “TV Shows” or “Movies”).
  • Repairing & Extracting: If necessary, NZBGet will automatically repair incomplete files using PAR files and extract RAR archives to give you the final content.

This hands-off approach means your downloaded content is automatically organized and ready for viewing without any manual steps.

Automation via Scripts and Schedulers

This section focuses on using scripts and scheduling tools to enhance and automate your NZBGet setup, especially for post-processing tasks like repairing, extracting files, or even organizing downloads. With automation, NZBGet can perform these tasks without needing manual intervention, saving you time and ensuring downloads are managed smoothly.

1. Post-Processing Automation

Post-processing refers to tasks that are automatically triggered after NZBGet completes a download. These tasks can include repairing incomplete files, extracting the content from archives, renaming files, and organizing them into folders. NZBGet has built-in features for these processes, but you can enhance the automation using scripts.

Common Post-Processing Tasks:

  • Repairing downloads: Sometimes files might be incomplete or corrupted. NZBGet uses PAR files to repair these downloads automatically. You can configure scripts to run after the download is complete to attempt the repair process.
  • Extracting archives: If the download consists of compressed files (like .rar), you can set NZBGet to automatically extract the content to a designated directory. This process can be enhanced with custom scripts for tasks like checking for specific file types or moving files to a specific folder.
  • Renaming and organizing files: After the download, you may want to rename the files to match a particular naming convention or move them to specific folders based on the content (movies, TV shows, etc.).

How to Automate Post-Processing:

  • Create a Post-Processing Script: Write a custom script that performs tasks like:
  • Running par2 (for repair) or unrar (for extraction).
  • Renaming files based on a predefined pattern (e.g., “MovieName – 2025”).
  • Organizing files into a media folder (e.g., moving movies to the Movies folder). For example, a simple post-processing script in bash (for Linux or macOS) might look like this:
  #!/bin/bash
  # Script to move extracted files to the Movies folder and rename them

  DOWNLOAD_DIR="$1"
  MOVIE_NAME=$(basename "$DOWNLOAD_DIR")

  # Move the extracted files to the Movies folder
  mv "$DOWNLOAD_DIR" /path/to/Movies/"$MOVIE_NAME"
  • Configure NZBGet to Trigger the Script: After setting up the script, you need to configure NZBGet to run it after each download. This is done through the NZBGet settings under “Post-Processing”. You can specify the script to run for every completed download.

2. Task Scheduling with Cron Jobs or Task Scheduler

Once you have automated post-processing scripts, you can schedule tasks to run periodically or at certain times to ensure that NZBGet operates at optimal times (like checking for new downloads, cleaning up old files, etc.).

Cron Jobs (Linux and macOS):

Cron is a job scheduler on Unix-based systems (Linux, macOS). You can set up cron jobs to run certain tasks at predefined times or intervals (e.g., daily, weekly, or hourly).

Example: Automating NZBGet to Check for New Downloads Every Hour:

  1. Open your terminal and type crontab -e to edit the cron jobs.
  2. Add a cron entry like this to run NZBGet every hour:
   0 * * * * /usr/local/bin/nzbget -D

This will check for new NZB files every hour.

Windows Task Scheduler:

On Windows, you can use Task Scheduler to run programs or scripts at set intervals.

Example: Automating NZBGet to Run a Script Every Day:

  1. Open Task Scheduler and click on Create Task.
  2. In the Triggers tab, set the task to run daily or at a specific time.
  3. In the Actions tab, set it to run a script or program (e.g., a PowerShell script) that interacts with NZBGet.

3. Running Automation with NZBGet’s Built-in Features

NZBGet has some built-in support for automation without needing external scripts or schedulers. These include:

  • Categories: You can configure download categories in NZBGet, which can trigger different post-processing actions for different types of downloads (e.g., movies, TV shows, etc.).
  • Scheduler: NZBGet also has a basic scheduler to trigger tasks like checking the download queue, restarting NZBGet, or performing cleanup actions at set times. This can be useful for ensuring NZBGet operates on a regular schedule.

4. Using External Tools for Further Automation

You can integrate NZBGet with other automation tools to create a more advanced automated downloading and media management setup.

  • Sonarr, Radarr, Lidarr: These tools can automatically send NZB files to NZBGet based on your watchlist. For example, Sonarr can automatically find new episodes of TV shows and send them to NZBGet for download. After the download is complete, the post-processing script will handle extracting and renaming.
  • Automation Scripts: You can create scripts that further automate the workflow. For instance, a Python script can interface with NZBGet’s API to download files or even monitor the NZBGet logs to trigger specific actions based on download success/failure.

5. Scheduling Maintenance and Cleanup

Automation is not just for downloading. You can also use scripts and schedulers to perform maintenance tasks like:

  • Cleaning up old downloads: Set up a script to delete files that have been downloaded for a specific period (e.g., 30 days old).
  • Database optimization: If you have a large number of downloads, you might want to schedule regular database cleanup or optimization tasks to ensure NZBGet continues to perform efficiently.

Setting Download Categories and Automation Rules in NZBGet

Setting up Download Categories and Automation Rules in NZBGet helps to organize and streamline the downloading and post-processing tasks based on the content type. This is especially useful when automating downloads for different media types like movies, TV shows, or music.

1. What Are Download Categories?

Download categories allow you to specify different actions and behavior for files depending on the type of content you are downloading. For example:

  • Movies: You might want to extract and organize files into a specific folder.
  • TV Shows: You may want them to be sorted by season and episode.
  • Music: You could move files into a music folder and trigger specific actions, like renaming them.

Categories in NZBGet can be configured to handle these types differently, making your automated process more efficient.

2. How to Set Up Download Categories in NZBGet:

  1. Open NZBGet Configuration:
  • Go to the NZBGet web interface (typically http://localhost:6789).
  • Navigate to Settings > Categories.
  1. Add a New Category:
  • Click Add Category to create a new category for the content you want to download.
  • You can specify the name of the category (e.g., Movies, TV Shows, Music).
  • Define the path where you want the downloaded files to be saved. For example:
    • Movies: /mnt/media/Movies/
    • TV Shows: /mnt/media/TV Shows/
    • Music: /mnt/media/Music/
  • Set Permissions: You can set whether the downloaded files should be read-only or if additional actions (e.g., post-processing) should be triggered.
  1. Configure Post-Processing Actions for Categories:
  • Once a category is set, you can specify actions that should occur after the download completes, such as:
    • File extraction (RAR/ZIP files).
    • Repairing (PAR2 files).
    • Renaming files to match a desired naming convention (e.g., “MovieName (Year).mp4”).
    • Moving files to different locations or even syncing with media servers (e.g., Plex or Kodi).
  • These rules can be set per category.

3. Automation Rules for Download Categories:

Automation rules define how NZBGet should handle downloads within each category. These can be set to execute specific tasks automatically after a download is completed, ensuring a fully automated process.

Key Automation Rules:

  1. Post-Processing Settings:
  • Enable options for post-processing tasks like repairing files, extracting archives, and renaming files based on the category.
  • Use the Post-Processing Scripts feature to trigger custom scripts that automate further actions (e.g., organizing folders, notifying users).
  1. File Extraction and Repair:
  • Enable Repair: NZBGet can automatically attempt to repair downloads using PAR2 files if the download is incomplete or corrupted.
  • Enable Extraction: Once the download is complete, NZBGet can automatically extract the contents (e.g., RAR or ZIP files).
  1. Renaming Files:
  • NZBGet supports custom renaming rules, which can be applied per category. For instance:
    • For Movies: You can rename downloaded files using the format MovieName (Year).mp4.
    • For TV Shows: You can rename files as ShowName - S01E01 - EpisodeTitle.mp4.
  • This is important to maintain consistency across your media library, especially if you use media center software like Plex or Kodi.
  1. Custom Scripts for Automation:
  • NZBGet allows you to add custom post-processing scripts that can be triggered per category.
    • Example: A script that moves TV show downloads to a specific folder and adds them to Plex automatically after they finish downloading.
  • To set this up:
    • Go to Settings > Scripts and enable or create custom scripts for your categories.
    • Example of a script might be move_to_plex.sh that moves files from the download directory to the Plex library.
  1. Download Priority and Scheduling:
  • Set different priorities for different categories. For example, you may want to prioritize movie downloads over TV shows.
  • Scheduling: Use automation to control download windows (e.g., limit downloads to certain hours).
  1. Notifications:
  • Set up notifications that are specific to each category.
  • For example, get a notification only when a movie download completes, or a TV show download fails.
  • Notifications can be via email, Slack, Discord, etc., and can be customized per category or based on the result of the download.

4. Example of Setting Up Categories and Automation for Media Downloads:

Let’s say you are automating downloads for both movies and TV shows, using Sonarr and Radarr to send NZB files to NZBGet.

Movies Category:

  • Category Name: Movies
  • Path: /mnt/media/Movies/
  • Post-Processing:
  • Extract: Enable automatic extraction of RAR files.
  • Repair: Enable automatic repair using PAR2 files.
  • Rename: Use a naming convention like MovieName (Year).mp4.
  • Custom Script: Trigger a script like move_to_plex.sh after the download completes to move the movie file to your Plex library.

TV Shows Category:

  • Category Name: TV Shows
  • Path: /mnt/media/TV Shows/
  • Post-Processing:
  • Extract: Enable automatic extraction of RAR files.
  • Repair: Enable automatic repair using PAR2 files.
  • Rename: Use a naming convention like ShowName - S01E01 - EpisodeTitle.mp4.
  • Custom Script: Trigger a script to organize the files by season and add them to a media center.

5. Testing and Monitoring Your Automation:

After setting everything up, it’s important to test the automation to ensure everything works as expected:

  • Download test: Trigger a test download for both movies and TV shows, checking that files are moved and renamed correctly.
  • Monitor logs: Keep an eye on the NZBGet logs to ensure there are no errors or unexpected behaviors.

Using Notifications to Monitor Automation

When automating downloads in NZBGet, it’s essential to have a system for monitoring the process. Notifications can help you stay informed about the success or failure of your downloads, post-processing tasks, and any issues that may arise. Here’s how you can use notifications to monitor your NZBGet automation:

1. Why Use Notifications in NZBGet?

  • Real-time updates: Get notified about the status of your downloads without needing to constantly check the NZBGet interface.
  • Error handling: Receive alerts when something goes wrong (e.g., failed downloads, extraction issues, or server connection errors).
  • Download completion: Know when a download finishes and if it needs any further actions like extraction or repair.
  • System health: Ensure your automation is running smoothly and troubleshoot if necessary.

2. Types of Notifications in NZBGet

NZBGet supports several methods of notifying users about various events. These notifications can be configured for specific actions, like download completion or failure.

  • Email Notifications: Send updates about your downloads directly to your inbox.
  • Push Notifications: Use services like Pushover or Slack to receive real-time notifications on your phone or computer.
  • Webhooks: Trigger an external script or service based on a specific event in NZBGet (useful for advanced setups).
  • Custom Notifications: You can write your own scripts to trigger notifications for specific actions or errors.

3. Configuring Email Notifications in NZBGet

Email notifications are one of the simplest ways to receive updates about your downloads. You can configure NZBGet to send an email upon download completion, errors, or specific events.

Steps:

  1. Access NZBGet’s Settings:
  • Open the NZBGet web interface and navigate to Settings > Notifications.
  1. Enable Email Notifications:
  • Set up your SMTP server (the service you’ll use to send emails, like Gmail, Outlook, etc.).
  • Enter your email address, SMTP server settings, and authentication details.
  • You may need to enable “Less secure apps” on your email account (for Gmail or similar services) to allow NZBGet to send emails.
  1. Set Notification Triggers:
  • Choose which events trigger an email notification (e.g., download success, failure, pause, etc.).
  • Set email templates if you want to customize the subject and message body.

4. Push Notifications for Real-Time Updates

Push notifications can send alerts directly to your phone or desktop for immediate action. Services like Pushover, Pushbullet, or Slack can be used to receive notifications.

Using Pushover (Example):

  1. Sign up for Pushover: Go to Pushover and create an account.
  2. Obtain User Key and API Token:
  • After registering, get your User Key (for receiving notifications).
  • Create an application in Pushover to obtain your API Token.
  1. Configure NZBGet:
  • In the NZBGet settings, go to Settings > Notifications.
  • Choose Pushover as the notification method.
  • Input your User Key and API Token from Pushover.
  • Set the events that should trigger push notifications (e.g., completed download, errors, etc.).

You can now receive notifications directly to your phone or desktop whenever an event occurs in NZBGet.

5. Using Webhooks for Advanced Notification Setup

Webhooks can send HTTP POST requests to another service or server. You can use this to trigger custom actions, such as sending notifications to other platforms or running additional scripts after a download completes.

Example of Using Webhooks:

  1. Create a Webhook Receiver: This could be a server or a service that listens for the incoming webhook data (for example, a script or an automation tool like IFTTT or Zapier).
  2. Configure NZBGet Webhooks:
  • In NZBGet, go to Settings > Notifications > Webhooks.
  • Input the URL of the webhook receiver.
  1. Set Triggers: Choose the events that should send data to the webhook (e.g., successful downloads, errors, etc.).

You can use webhooks to integrate NZBGet with other services like Discord or custom applications, providing notifications or triggering additional actions (like re-queuing a failed download).

6. Custom Notification Scripts

For users who prefer total control, NZBGet allows you to write custom scripts to handle notifications. These scripts can execute any action you like, including sending messages to specific channels, logging events, or triggering other tools.

Example:

  • Sending Notifications via a Custom Script: You can write a script (in Python, Bash, etc.) that sends a custom notification when a download completes or encounters an error. The script could use APIs (Slack, Discord, etc.) to send messages to specific channels or individuals.

To set this up:

  1. Write your script: Create a script that will send a message, log an event, or trigger another action.
  2. Configure NZBGet: In the NZBGet settings, go to Settings > Notifications > Custom scripts and enter the path to the script.
  3. Set Triggers: Choose when the script should be executed (e.g., on download completion, failure, etc.).

7. Testing and Troubleshooting Notifications

Once you’ve set up your notifications, it’s important to test them:

  • Test email notifications by downloading a test file and checking your inbox.
  • Test push notifications by sending a manual notification from NZBGet to your Pushover or Slack account.
  • Check logs: If notifications aren’t working, check NZBGet’s logs (Settings > Log) for any errors related to notification configurations.

8. Tips for Effective Notification Monitoring

  • Set notification preferences to avoid being overwhelmed by too many alerts (e.g., limit notifications to critical events like errors or failures).
  • Monitor download health: Regularly check notifications to ensure that downloads are completing successfully and no actions are needed (e.g., repairs, extractions).
  • Combine with task automation: Use notifications in combination with post-processing scripts to automate additional actions (e.g., moving files, renaming).

Troubleshooting automation issues in NZBGet can be tricky, but breaking it down step by step can help pinpoint and resolve common problems. Below is a detailed guide to understanding and fixing the most frequent automation-related issues in NZBGet.

Troubleshooting Automation Issues in NZBGet

1. Check NZBGet Logs

  • Log Files: NZBGet logs are your first line of defense in troubleshooting. They provide detailed information about what’s going wrong.
  • Where to find logs: The log files are usually accessible through the NZBGet web interface.
  • What to look for:
    • Look for specific error messages such as failed API calls, network timeouts, or file extraction issues.
    • Pay attention to failed downloads and which step of the process caused the failure (downloading, repair, extraction, etc.).

How to access logs:

  • In the NZBGet web interface, go to “Status” > “Log”. You’ll find entries detailing each download, its status, and any errors or warnings.

2. Common API Communication Errors

If you have integrated NZBGet with external tools (like Sonarr, Radarr, or Lidarr), communication issues can arise.

  • API Authentication Problems:
  • Ensure the NZBGet API key is correctly set up in the third-party tools.
  • Check that the API key hasn’t changed or been reset.
  • Solution:
    • Go to Settings in NZBGet > Security and verify the API key.
    • In Sonarr or Radarr, go to the settings for the NZBGet connection and re-enter the correct API key.
  • Connection Errors:
  • Make sure NZBGet is listening on the correct IP address and port.
  • Solution:
    • Check your network settings to ensure NZBGet’s web interface is accessible from the automation tools (Sonarr, Radarr).
    • If NZBGet is behind a firewall, open the relevant port for communication (default is port 6789).

3. Failed Downloads or Incomplete NZB Processing

  • Common Symptoms: NZBGet starts the download but never completes it, or the download gets stuck at a certain percentage.
  • Possible Causes:
  1. Incorrect NZB files: If the NZB file is corrupted or incomplete, the download may fail.
    • Solution: Download the NZB file again from a reliable source or indexer.
  2. Server Problems: Your Usenet provider could be down or having issues.
    • Solution: Check your Usenet provider’s status page or try another NZB file.
  3. Missing or Failed PAR Files: NZBGet uses PAR files for repair if a download is incomplete or corrupted.
    • Solution: Check the logs for PAR-related errors. Ensure that NZBGet can access enough PAR files to repair the download.
  4. Insufficient Storage: If there’s not enough disk space, NZBGet may fail to complete the download.
    • Solution: Make sure there is adequate free space on the destination drive.
  • Check Repair Logs:
  • If NZBGet fails to repair a file, the log may show an error about missing or incomplete PAR files.

4. Post-Processing Failures

NZBGet has a robust post-processing system, but sometimes files don’t get extracted, renamed, or moved as expected.

  • Extraction Problems:
  • If NZBGet cannot extract files, it might be due to missing RAR files or an incorrect extraction path.
  • Solution:
    • Make sure that all RAR files are present.
    • Verify that the post-processing script or extraction settings are correct in NZBGet.
  • File Moving or Renaming Issues:
  • If files aren’t being renamed or moved to the correct directory, it’s usually a permissions issue or a misconfigured post-processing script.
  • Solution:
    • Check that NZBGet has the correct read/write permissions for the folders it’s trying to move files to.
    • Ensure your file renaming patterns are set up correctly in Settings > Post-Processing.

5. Network or Connectivity Problems

  • Download Speed Issues:
  • If downloads are very slow, NZBGet might not be properly connected to your Usenet provider, or your connection could be throttled.
  • Solution:
    • Verify that the server settings (address, port, SSL settings) are correctly configured.
    • Test the connection with another Usenet client to verify if the issue is with NZBGet or the Usenet provider.
  • Timeout Errors:
  • Cause: Network timeouts can happen when NZBGet fails to connect to the Usenet server due to poor connectivity or wrong server settings.
  • Solution:
    • Increase the timeout settings in the NZBGet configuration.
    • If using SSL, check that your SSL certificate is valid and the connection settings are correct.

6. Permissions and Path Issues

If NZBGet is not processing downloads correctly, it could be due to folder permissions or misconfigured file paths.

  • Permissions Issue:
  • Symptoms: Failed to move, rename, or extract files.
  • Solution:
    • Ensure NZBGet has permission to read/write to the directories it’s working with.
    • Check ownership and permissions for the download folder and the destination folder.
  • Incorrect Path Settings:
  • Symptoms: Files are not extracted or saved in the right location.
  • Solution:
    • Double-check the destination directory and category settings in NZBGet.
    • If using external scripts, verify the file paths set in the post-processing scripts.

7. Automation with External Tools Not Triggering

If Sonarr, Radarr, or Lidarr is not triggering NZBGet to start downloads, it could be a configuration issue.

  • Possible Solutions:
  • Verify that NZBGet is accessible via the API.
  • Make sure Sonarr/Radarr is correctly configured to trigger NZBGet when new content is found.
  • Check if the correct category and quality settings are set up in both NZBGet and the external tools.

8. General NZBGet Configuration Check

  • Settings Reset: If something isn’t working right, sometimes resetting to default settings can help identify the issue.
  • Backup & Reinstall: Back up your settings and logs, then reinstall NZBGet if other solutions aren’t working.

The “Advanced Automation Tips” section of the guide is for users who are comfortable with the basics and want to take their NZBGet setup to the next level. Here, we’ll cover more complex configurations that allow you to fine-tune your automation and make your NZBGet setup even more efficient.

Advanced Automation Tips for NZBGet

1. Conditional Downloads

Conditional downloads let you set specific criteria that must be met before NZBGet starts downloading a file. This can be particularly useful if you only want to download files that meet certain requirements, such as size, quality, or file type.

How to Set Conditional Downloads:

  • Quality Requirements: If you’re using NZBGet in conjunction with tools like Sonarr or Radarr, you can configure the software to only download NZB files that meet certain quality standards. For instance, you can specify that NZBGet should only download 1080p or higher resolution files. Example:
  • In Sonarr or Radarr, you can set a minimum quality threshold (e.g., “1080p” or “Bluray”).
  • NZBGet will only process NZB files that meet this quality standard.
  • File Size Criteria: You can configure NZBGet to automatically reject or prioritize files based on their size.
  • For example, you might want to avoid downloading anything under 1GB, especially for movies, or you might want to prioritize smaller files if you’re on a limited bandwidth connection.
  • File Type or Format: You can filter out specific file types (e.g., rejecting all files that aren’t in a .mkv format) or prioritize certain formats.
  • This is useful when downloading TV shows or movies and you want a specific file format for easier playback.

Where to Set This Up:

These settings can usually be adjusted in your automation tool (e.g., Sonarr, Radarr) that integrates with NZBGet, rather than in NZBGet itself.

2. Combining Multiple Automation Tools

NZBGet works well with various other automation tools, and combining them can give you even more control over your downloads.

Examples of Combining Automation Tools:

  • Sonarr, Radarr, and Lidarr: These tools are used to automatically find NZBs for TV shows, movies, and music, respectively. By integrating them with NZBGet, you create an automated pipeline:
  • Sonarr can search for new episodes of your favorite TV shows, grab the NZB file, and send it to NZBGet for downloading.
  • Radarr can do the same for movies, while Lidarr does the same for music.
  • Automation with File Renaming and Sorting: After NZBGet downloads and extracts the files, you can use automation tools like Filebot or Radarr/Sonarr’s own post-processing settings to automatically rename and organize your downloaded files into the appropriate folders (e.g., Movies, TV Shows, Music). For example:
  • Radarr automatically renames movies according to your naming convention and places them in your designated “Movies” folder.
  • Sonarr does the same for TV episodes.
  • Automatic Post-Processing: After NZBGet finishes downloading, you can set up post-processing automation scripts (like PyPostProcessor) to repair incomplete downloads using PAR files, extract RAR archives, and organize your media library. These scripts can be triggered based on file types or download completion.

3. Automating Retention of Old Downloads

If you don’t want your disk to fill up with old downloads, automating the removal or archiving of old files is a great way to keep things tidy. NZBGet itself has some built-in retention features, but it can also be integrated with external tools for better file management.

How to Automate File Deletion or Archiving:

  • Auto-deletion: Use NZBGet’s internal settings or combine it with scripts to delete files after a certain period or when they have been processed and moved to your media library. Example:
  • Configure NZBGet to delete the downloaded NZB files after the post-processing is done, so you don’t have redundant files in your system.
  • Archiving: Use a script (like rclone or rsync) to automatically archive old downloads to another drive or cloud storage (Google Drive, Dropbox, etc.). This helps save space while keeping backups of your downloaded content.

4. Advanced Post-Processing

NZBGet supports post-processing, where you can run custom scripts after the download completes, such as repairing files, extracting RAR archives, or organizing files into a media library.

How to Set Up Advanced Post-Processing:

  • Repairing with PAR Files: When a download is incomplete or corrupted, NZBGet can use PAR (Parity Archive) files to repair the download. You can set up NZBGet to automatically attempt repair after download completes. Example:
  • Enable the “Repair” option in NZBGet settings. When NZBGet detects missing or incomplete files, it will automatically try to repair them using available PAR files.
  • Extracting RAR Archives: Many NZB downloads come as compressed RAR archives. You can use NZBGet to automatically extract these archives after download.
  • You can configure NZBGet to automatically extract RAR files, and after extraction, clean up unnecessary archive files, saving you time and disk space.
  • Custom Post-Processing Scripts: You can create or use existing scripts to automate file renaming, organizing, or even uploading files to remote servers or cloud storage. For instance, a script could automatically move files into a specific media folder (e.g., “Movies” or “TV Shows”) after download completion.

5. Automating Notifications

Automating notifications is useful for monitoring your download progress, receiving alerts for successful or failed downloads, and troubleshooting without having to log into NZBGet manually.

How to Set Up Automated Notifications:

  • Email Notifications: You can configure NZBGet to send you email alerts whenever downloads start, complete, or fail. This is useful for monitoring downloads remotely. Steps:
  • Go to NZBGet’s settings > Notifications and configure SMTP (Simple Mail Transfer Protocol) settings to send notifications to your email address.
  • Integration with Slack/Discord: NZBGet can be integrated with platforms like Slack or Discord to send real-time messages about the download status.
  • Use an incoming webhook to send notifications to your preferred chat platform.
  • Custom Scripts for Alerts: For more advanced notifications, you can write custom scripts (in Python, Bash, etc.) that notify you about specific download events, such as the success of a particularly important download or failure in a batch of NZBs.

6. Using APIs for Custom Automation

NZBGet exposes a powerful API that can be used for custom automation tasks, like managing downloads, checking the status of downloads, or initiating actions remotely.

How to Use the NZBGet API for Automation:

  • Starting and Stopping Downloads: You can create scripts or set up third-party tools to trigger downloads from a remote location via the NZBGet API. Example:
  • Using a cron job, you could write a script that automatically checks for new NZB files every hour and sends them to NZBGet for downloading.
  • Monitoring Download Progress: You can write scripts that monitor the progress of your downloads and send you notifications when a download reaches a specific completion percentage or encounters an issue.

Conclusion

Automating downloads in NZBGet enhances efficiency and convenience by minimizing manual intervention. With proper integration with tools like Sonarr and Radarr, NZBGet can automatically fetch, download, and process files, making it a valuable solution for managing large-scale downloads, such as media content, without constant oversight.

By setting up categories, scripts, and notification systems, NZBGet allows users to automate not only the download process but also post-processing tasks like extraction and file renaming. These automations create a seamless experience, ensuring your system is always up-to-date with minimal user input while maintaining organization and efficiency.

Leave a Comment

Your email address will not be published. Required fields are marked *