A Warden of Jails, NAS4Free

jonathan Home Netwoking Leave a Comment

I decided to reinstall my media server over the weekend so I thought it would be a good idea to write up a couple of tutorials on how to get it going. First there is the underlying Operating System.

I won’t go into my hardware setup but I’m running an embedded NAS4Free installation on a USB drive to provide network storage. NAS4Free is an awesome NAS software that runs on FreeBSD. I’ll assume that you have NAS4Free running but if you’re running into issues, I’ll write a short post about this installation soon. One of my big pain points I wanted to address was the ability to run a DLNA/UPnP compliant media server with my storage. FreeBSD can spin up mini-systems called Jails that are kind of similar to virtual machines. It’s on one of these Jails I’ve installed my media server software Serviio. Serviio is an extremely flexible media server based on Java. I must admit I’m not a fan of Java but in this case I’m sacrificing a little performance and gaining a lot of flexibility. So how do we spin up a Jail?
You can do it manually and generally I am all for CLI. However, I’m running an embedded system and required a solution that is easy to manage. With some reading I weighed up the options and installed a NAS4Free plugin called TheBrig. My compliments to the developers of this plugin it really is a breeze to install and maintain Jails, with a few clicks I can update the software ports or OS release while the Jail is still active. I only wish everything was as smooth. You can follow the installations instructions here:

http://www.forums.nas4free.org/viewtopic.php?t=3894  (thanks to raulfg3)

There are some keep points to keep in mind. The first is if you have created Jails manually, you will need revert the configuration and delete any existing Jails, as it says: “TheBrig zero tolerance applies to previously established jails”. The other issue that gets overlooked is when installing the software. Please you ensure you have a 2 at the end of the installation command. This ensures you install the stable release. To summarise the steps:

1) Download TheBrig install script

fetch -o /tmp/thebrig_install.sh https://github.com/fsbruva/thebrig/raw/working/thebrig_install.sh

2) Change the permissions of the script so that you can execute it.

chmod a+x /tmp/thebrig_install.sh

3) Execute the install script (Where /Path/To/Jail is the location to the persistent location of your TheBrig install.)

/bin/sh /tmp/thebrig_install.sh /Path/To/Jail 2

When you run the script you will get an output like this:

Unpacking the tarball...
x conf/
x conf/bin/
x conf/bin/ftp_amd64
x conf/bin/ftp_i386
x conf/bin/thebrig_fetch.sh
x conf/bin/thebrig_start.php
x conf/bin/thebrig_start.sh
x conf/bin/thebrig_stop.sh
x conf/ext/
x conf/ext/thebrig/
x conf/ext/thebrig/extensions_thebrig.php
x conf/ext/thebrig/extensions_thebrig_check.php
x conf/ext/thebrig/extensions_thebrig_config.php
x conf/ext/thebrig/extensions_thebrig_download.php
x conf/ext/thebrig/extensions_thebrig_edit.php
x conf/ext/thebrig/extensions_thebrig_tarballs.php
x conf/ext/thebrig/extensions_thebrig_tools.php
x conf/ext/thebrig/functions.inc
x conf/ext/thebrig/lang.inc
x conf/ext/thebrig/menu.inc
x conf/ext/thebrig/off_small.png
x conf/ext/thebrig/on_small.png
x conf/freebsd-update.conf
x conf/portsnap.conf
x thebrig_install.sh
Renaming 64 bit ftp binary
Congratulations! Refresh to see a new tab under " Extensions"!

Now login into the NAS4Free webgui and you’ll have an extension tab with ‘TheBrig’ listed.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.