Installing Newznab Guide


Recommended Posts

I'm going to provide more of an overview then a step by step guide. At this time, I'm not going to get into exact step by step detail to the level it take to get someone with no prior knowledge about any of this running. I'm assuming anyone reading this is using Community Applications, can install Dockers and plugins, has some basic command line knowledge, can use the right text editors to edit Linux script and config files and (most obviously) knows enough or can read enough about newznab to set it up and configure it.

 

1. Install the following

- Nerd Tools plugin.

- Linuxserver.io Apache Docker.

- Any MariaDb or MySQL Docker or Plugin.

 

The database Docker or plugin version really doesn't matter since you can connect Newznab to any of them. At this time i am using Needo's MariaDB docker because it was the first database docker published and I've been doing this since dockers were first around. I've never changed it because it still works. But, the Linuxserver.io docker would be one of the more obvious choices here.

 

 

2. In the Nerd Tools configuration install the following packages.

- apr

- apr-utils

- neon

- serf

- subversion

 

These are needed to run subversion to download Newznab. I have the Perl package installed but I don't believe it is required for subversion. If the subversion command line doesn't work then install it too.

 

 

3. Download Newznab

 

Log-onto the unRAID server and go to the Apache Docker installation location - the directory where you pointed /config to in the Apache docker setup. Then, further go into the www directory that is there. Now, use Subversion to download Newznab. The command line should be,

 

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

 

If this works how I remember, you should have the newznab install directly in this www directory so you have 5 directories and 6 files in the directory. If it dumped everything into yet another subdirectory them move everything from that directory to the www directory and delete that subdirectory.

 

You should have paid for Newznab by now and received a username and password to use for this.

 

 

4. Setup the Apache docker.

 

By default Apache is looking for the website in the www directory where you just installed Newznab but Newznab creates another www directory inside the Docker www directory. So, you have to setup Apache so it looks for it in the www/www directory. Go to the same Apache docker "/config" directory as in step 3 then go into the apache\site-confs subdirectory and edit the default.conf file. Change the top part to look like this.

<VirtualHost *:80>
    DocumentRoot /config/www/www

    <Directory "/config/www/www">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
            Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

 

Basically, just change /www to be /www/www

 

Now setup the Apache docker to use the advance script so you can install perl and unrar (optionally for use in Newznab for deeper password checking).

 

In the Apache docker setup set the "ADVANCED_SCRIPT" variable to true.

 

In the Apache install directory (where you pointed /config) put a file called "userscript.sh" containing the following.

 

apt-get install php-pear
apt-get install unrar-free

 

 

Now, restart the Apache docker and go to it's WebUI and you should get the Newnab setup page. It'll take a bit the first time because the docker has to install those packages first before being run. Go through the setup pages and point it to your usenet server and the MariaDB or mySQL database and it should come up ready to use. As a minimum, you need to go into the site setup and put in your Newznab ID and you should also activate a single group for testing to ensure it's working.

 

Since I installed unrar I put "/usr/bin/unrar" into the path to unrar box in the Newznab site setup. Then, I could use deep password checking.

 

 

5. The last part is to setup the indexing script.

 

Yet again starting at the same Apache "/config" directory in step 3, go to this directory.

- \www\misc\update_scripts\nix_scripts.

 

Edit the newznab_screen.sh file and edit the top part to look something like this.

#!/bin/sh
# call this script from within screen to get binaries, processes releases and 
# every half day get tv/theatre info and optimise the database

set -e

export NEWZNAB_PATH="/config/www/misc/update_scripts"
export NEWZNAB_SLEEP_TIME="300" # in seconds
LASTOPTIMIZE=`date +%s`

while :

do
CURRTIME=`date +%s`
cd ${NEWZNAB_PATH}
#/usr/bin/php5 ${NEWZNAB_PATH}/update_binaries.php
/usr/bin/php5 ${NEWZNAB_PATH}/update_binaries_threaded.php
/usr/bin/php5 ${NEWZNAB_PATH}/update_releases.php

 

 

The import line is the NEWZNAB_PATH because and to take the # off the start of the update script lines for the ones you want to use. I use the threaded update binaries script but you could use the other script too. I use 300 seconds or 5 minutes as the update interval but you can change this to whatever time interval you want.

 

 

6. Now, test it to make sure it will index.

 

Log-in to the Apache docker by using this line at the unRAID command prompt.

 

- docker exec -t -i Apache /bin/bash

 

Then run this.

 

- sh /config/www/misc/update_scripts/nix_scripts/newznab_screen.sh

 

And the update scripts should start to run.

 

 

6. To automate the updating when the Apache docker runs add this line to the Apache userscript.sh file and re-start the apache docker.

 

sh /config/www/misc/update_scripts/nix_scripts/newznab_screen.sh &>/dev/null &

 

I would recommend you "Browse Groups" to check they are being updated at least once a day. If they quit being updated then just re-start the Apache docker.

 

 

 

As you can see, this isn't simple. The last time I actually did this was at least a year ago so I might have missed something. So, let me know if you get so far and I missed something obvious so it doesn't work for you.

 

Link to comment
  • 11 months later...

The 

"In the Apache docker setup set the "ADVANCED_SCRIPT" variable to true." and the apt-get part give me grief - I don't see that option in my apache docker

 

The solution to this is to create your own option called parameter with the name advanced_script and the variable true. Then the script works properly!

Edited by Zoba
Link to comment

It was there as Key 3 when I last installed that container. They must have removed it from the template, but apparently still support it since it worked for you. No big deal, just add a variable called ADVANCED_SCRIPT with the value set to true as you noted.

 

I quit using Newznab a few months ago because it was not finding much of anything with the regex that you get with it. 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.