Build Your Own Usenet Indexer - A How-To Guide

Creating a Personal NZB Indexer
While numerous NZB indexers exist, like NZB Matrix and NZBs(dot)ORG, their indexing capabilities are limited to a portion of the total Usenet content.
This guide details the process of constructing a customized indexer, granting you the ability to catalog precisely the Usenet content you desire.
Why Build Your Own Indexer?
Existing indexers, despite their convenience, don’t offer complete coverage. A self-built indexer allows for focused indexing.
You gain control over the sources included, ensuring that your searches are comprehensive and tailored to your specific needs.
Benefits of a Custom Solution
- Complete Control: Index only the Usenet content relevant to you.
- Enhanced Privacy: Avoid reliance on public indexers with potential logging concerns.
- Customization: Tailor the indexing process to your specific requirements.
Building your own indexer requires technical effort, but the benefits of control and customization can be significant for dedicated Usenet users.
By implementing a personal indexing solution, you bypass the limitations of pre-built services and unlock the full potential of Usenet.
Essential Requirements:
To proceed, several prerequisites must be met. These include access to a computer with the Ubuntu operating system installed.
Furthermore, a valid Usenet account is necessary for the process. A foundational grasp of utilizing the Linux terminal is also expected.
Finally, a reliable and sufficiently fast internet connection will ensure smooth operation.
Getting Started:
Provided you possess each of the aforementioned components, you are prepared to begin. Let's initiate the process and move forward.
Installing NewzNab
The entire installation process will be carried out from the command line, so launch a terminal and execute the following command:
sudo gnome-terminal
This action will initiate a terminal session with root privileges, eliminating the need to repeatedly type 'sudo' for subsequent commands.

Initially, it’s crucial to update your package repositories:
apt-get update

Typically, web-related files on Ubuntu are located within the /var/www directory. Therefore, a directory for the NewzNab installation will be created, and write permissions will be established on the folder:
mkdir –p /var/www/newznab
chmod 777 /var/www/newznab

The next step involves installing PHP:
apt-get install –y php5 php5-dev php-pear

Several additional PHP extensions are also required:
apt-get install –y php5-gd php5-mysql php5-curl

The PHP configuration file needs to be modified; the nano editor will be used for this purpose:
nano /etc/php5/cli/php.ini

Two settings within this file require adjustment. First, modify:
max_execution_time = 120

Also, the date.timezone setting must be updated. A comprehensive list of valid values can be found here.

A database system is now needed; MySQL has been chosen for this installation:
apt-get install mysql-server-5.5
apt-get install mysql-client-5.5
apt-get install libmysqlclient-dev

During the configuration process, you will be prompted to set a password. Ensure a robust password is selected, particularly if the indexer is intended for public access.

Finally, Apache needs to be installed:
apt-get install –y apache2

The same modifications made to the base PHP configuration must also be applied to the Apache configuration. An additional setting also requires alteration, and nano will be used again:
nano /etc/php5/apache2/php.ini
The following settings need to be changed:
- memory_limit = -1
- max_execution_time = 120
- date.timezone = Europe/London

An Apache configuration file for the website must now be created. Execute:
nano /etc/apache2/sites-available/newznab

Paste the following content into the file when nano opens:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName localhost
DocumentRoot /var/www/newznab/www
ErrorLog /var/log/apache2/error.log
LogLevel warn
</VirtualHost>
Then, save the changes to the file.

With all prerequisites installed, NewzNab can be installed. Navigate to the download page and obtain a copy of NewzNab Classic.

Once downloaded, extract the archive.

Now, copy all the extracted files.

Paste them into:
/var/www/newznab

Open a new terminal and run the following commands to register NewzNab as the default website and enable the rewrite module:
sudo a2dissite default
sudo a2ensite newznab
sudo a2enmod rewrite
sudo service apache2 restart
An error may occur during the restart process due to the use of 'localhost' in the configuration file; this can be ignored and the process continued.

Finally, to resolve potential permission issues, execute the following commands:
sudo chmod 777 /var/www/newznab/www/lib/smarty/templates_c
sudo chmod 777 /var/www/newznab/www/covers/movies
sudo chmod 777 /var/www/newznab/www/covers/music
sudo chmod 777 /var/www/newznab/www
sudo chmod 777 /var/www/newznab/www/install
sudo chmod 777 /var/www/newznab/nzbfiles/
Configuration of NewzNab
With NewzNab now installed, the next step involves its configuration. Customization is essential to maximize the utility of your self-hosted indexer. Begin by accessing the installation page through your web browser at http://localhost/install.
Upon loading the page, initiate a prerequisite status check by clicking the designated button.
You will likely encounter warning statuses for the 'date.timezone' and 'memory_limit' settings. These can be safely disregarded for the time being, and you may proceed.

The subsequent stage requires inputting the necessary credentials for your MySQL database.

Furthermore, you'll need to provide the details associated with your Usenet account.

Next, establish a username and password for your personal access. These credentials will be used for logging into the website’s administrative interface.

An error may occur when specifying the storage location for nzb files. A quick resolution involves executing the provided chmod command within a terminal.

You have now successfully reached the administrator area.

Adjusting NZB Categories
Before proceeding, it’s important to modify how nzb categories are handled. To do this, click on your username located in the top right corner of the screen.

Then, select the 'Edit' link.

Subsequently, deselect the checkboxes corresponding to 'Movies', 'Music', and 'Console'.

After completing this adjustment, return to http://localhost/admin and follow the remaining steps to finalize the configuration of your indexer.

This concludes the setup process. Follow the author on Twitter: @taybgibb