Newznab on Windows 10

This guide will help you install everything you need to get Newznab+ running on Windows 10. The links to various binaries needed for the Windows installation are likely to go out of date, so get used to searching for similar sounding downloads. Big thanks to TheArkive for the inspiration for this guide.

Step 1: Install Apache

Download the Apache2.4 Windows binaries from Apache Lounge. Extract the directory in the zip file to the root of the C Drive i.e. C:\Apache24\

Install Apache as a Windows service by opening a command prompt and typing the following. You should recieve the message ‘The ‘Apache2.4’ service is successfully installed’:

cd c:\Apache24\bin
httpd -k install

Check it starts correctly by typing the following into the command prompt:

net start Apache2.4

Open a web browser and navigate to http://localhost/ Observe that it shows the default Apache page saying ‘It Works!’.

Step 2: Install PHP

Download Windows PHP binaries from the URL below. The most common version to select is x64 Thread Safe

Once downloaded, create the directory C:\PHP and extract the contents of the zip file into it. Rename php.ini-production to php.ini:

mkdir c:\PHP
extract zip into c:\PHP
rename php.ini-production to php.ini

Open the php.ini file and make the following edits to ensure these modules are uncommented and set some of the defaults advised by the newznab installation:

extension=curl
extension=gd
extension=mbstring
extension=mysqli
extension=pdo_mysql

date.timezone = 'Europe/London'
max_execution_time = 120
memory_limit = -1

Add the PHP path into the Windows PATH. Do this buy opening the PC System Properties > Advanced System Settings > Environment Variables:

System Variables
Select Path
Click Edit
Click New
Enter C:\PHP

Step 3: Configure Apache and a vhost for the newznab web application

Locate the file C:\Apache\conf\httpd.conf and edit it in notepad. Locate the following modules and ensure they are uncommented:

LoadModule rewrite_module modules/mod_rewrite.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so

Find the section <Directory /> and change it as follows:

<Directory />
        AllowOverride All
        Require all granted
</Directory>

Location the vhost conf section and uncomment it:

# Virtual hosts
Include conf/extra/httpd-vhosts.conf

Set the default document to include .php by finding this section and amending as below:

<IfModule dir_module>
        DirectoryIndex index.php index.html
</IfModule>

Add the handler for .php extension files to the PHP handler by adding these four lines to the very end of the file. If you downloaded a different version of PHP, ensure the path to the dll is the right name for your version and exists in the folder (if it doesnt you probably downloaded the non thread safe version):

AddHandler application/x-httpd-php .php
AddType application/x-httpd-php .php .html
LoadModule php_module "c:/php/php8apache2_4.dll"
PHPIniDir "c:/php"

This guide configures newznab inside a virtual host with a faux hostname - newznab.local which needs to be added to the hosts file in order to resolve. Edit the following file C:\Apache24\conf\extra\vhosts.conf in notepad.

Remove the example entries and replace with the section below:

<VirtualHost *:80>
        DocumentRoot    "C:/nn/www"
        ServerName      newznab.local
        ErrorLog        "logs/nn.local-error.log"
        CustomLog       "logs/nn.local-access.log" common
</VirtualHost>

Add the faux domain newznab.local to your local PC hosts file. Edit the file C:\Windows\System32\drivers\etc\hosts in Notepad. You must running Notepad as Administrator in order to save this file. Add a new entry as follows:

127.0.0.1       newznab.local

Step 4: Download and install Mariadb (Mysql)

Download Maria from the following location. Select the latest stable version

Install the .msi. Accept all the defaults. Ensure UTF8 option is checked, and set a default root password:

set a root password (You will have to enter this during the newznab install)
use utf8 collation
accept the default installation options

Step 5: Download and install a subversion client

TortoiseSVN is a good choice as an SVN client on Windows. During installation pick the option to include the command line tools. Download the latest version of the x64 installer

Once tortoise is installed, Checkout the newznab application by creating a new directory and checking out the files. Create a directory C:\nn\

In explorer right-mouse-button on the C:\nn\ folder and select SVN Checkout. Enter the newznab newznab+ subversion repository:

svn://svn.newznab.com/nn/branches/nnplus

Enter the SVN username and password provided by the instructions in the purchase email, the credentials are obtained by visiting the newznab chat room at http://www.newznab.com/chat.html

The files will be downloaded into C:\nn\

Step 6: Install PHP Pear

Go to the PHP Pear website to download the go-pear.phar PEAR installer file:

Download https://pear.php.net/go-pear.phar into c:\php\
Open command prompt
cd c:\PHP
php go-pear.phar

Note

If it says 13 no path found to C:\php.exe then type 13 and pick path to c:\php

Step 7: Run the newznab installer

Everything should be in place now to load the newznab website and run through the application installer. Before doing so its recommended to restart apache to ensure all new settings are picked up. Open a command prompt and type:

net stop Apache2.4
net start Apache2.4

Then open a browser and type http://newznab.local/ into the address bar. You should see the start of the newznab installation process. If you see ‘It works’ still, its likely something to do with the vhost config not being picked up - ensure you have done everything in step 3. Follow the newznab installation wizard to the end.

Step 8: Configure newznab

Open a browser, go to the admin home page http://newznab.local/admin/site-edit.php and set up some paths and config options:

default home page : /browse
newznabID : <provided in signup email>
unrar path :  <see optional step 1 for installing 3rd party apps>
mediainfo path : <see optional step 1 for installing 3rd party apps>
ffmpeg path :  <see optional step 1 for installing 3rd party apps>
lame path :  <see optional step 1 for installing 3rd party apps>
save audio preview : yes
check for password : deep
delete passworded releases : yes

Activate one group to use as a test by navigating to the group list http://newznab.local/admin/group-list.php Try highspeed:

Type alt.binaries.multimedia.anime.highspeed into the filter box
Click the Activate link

Step 9: Run update scripts

A couple of scripts are used to populate newznab - update_binaries and update_releases. Now newznab is installed and configured it needs to be populated:

cd C:\nn\misc\update_scripts
php update_binaries.php
php update_releases.php

Complete

newznab is now installed. Navigate to the home page to observe indexed content

Optional Step 1: Configure newznab to use 3rd party apps

At the time of writing the following locations were the appropriate places to find binaries that can be used by newznab to perform additional functionality. For the purpose of this guide they are all copied into a directory called C:\nn\externalapps:

Mediainfo

Unrar

FFmpeg

Lame