How to install Shinobi Video on a FreeNAS Jail

Prelude


So I've been doing a lot of research lately on how I should go about setting up surveillance cameras around our home. Features like remote viewing, motion detection and alerts are a necessity. At first I thought of using ip cameras then just use their own application for remote viewing and recording like Mi Home from Xiaomi, Hik-Connect from HikVision and so on. This was okay at first but then I found out that most of these cameras upload data to their corresponding servers. From what I understand, these servers act as relays in order to allow consumers to view live streams from their camera remotely without having the need for static ip addresses, port forwarding as well as DVRs/NVRs.

It does make sense to do this in some way because it does make it easier for consumers. Otherwise consumers will need to request static ip addresses from their respective ISPs or setup a DDNS at home, then setup port forwarding on their routers. Security also needs to be considered since they are opening their network to the internet.

However, the fact that these cameras uploads data to their respective servers made me think twice because of privacy reasons. Since I already have a FreeNAS available at home, I decided to just install a surveillance software on it, setup DDNS and setup port forwarding on my router.

First things first, I need to decide which software to use. My requirements are:
  • Should be free.
  • Should support linux (Ubuntu, CentOS, FreeBSD).
  • Should not require too much RAM and CPU.

I only looked at a few software.
  • Zoneminder. Unfortunately, I had a hard time setting this up on a CentOS7 in Google Compute Engine.
  • Shinobi. Successful on first attempt in Google Compute Engine. Also looks promising.
  • Motion. Didn't get to try it since I already installed Shinobi successfully.

And that's how I came to a decision. Shinobi it is.

Before we begin, here are some information about my FreeNAS.
root@shinobi_1:/ # uname -a                                                     
FreeBSD shinobi_1 11.1-STABLE FreeBSD 11.1-STABLE #0 r321665+9902d126c39(freenas/11.1-stable): Tue Aug 21 12:24:37 EDT 2018     root@nemesis.tn.ixsystems.com:/freenas-11-releng/freenas/_BE/objs/freenas-11-releng/freenas/_BE/os/sys/FreeNAS.amd64  amd64
root@shinobi_1:/ # 
Specs:
Intel(R) Pentium(R) CPU G4600 @ 3.60GHz
8GB RAM
2x2TB HDD 3.5"
1x500GB HDD 2.5"

Installation and Setup


Navigate to Jails and add a Jail.
Launch the Shell for that Jail. Must be root.

In my current FreeNAS version, running the installation produces an error.
Shared object "libdl.so.1" not found,
In order to fix this, I had to make some modifications as suggested in this thread. Basically modified the file /usr/local/etc/pkg/repos/FreeBSD.conf

from
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/freebsd:11:x86:64/latest",
  mirror_type: "srv",
  enabled: yes
}
to
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/freebsd:11:x86:64/release_2",
  mirror_type: "srv",
  enabled: yes
}
Then execute the following commands:
pkg update -f
pkg upgrade -f
Once done, pull the repository.
git clone https://gitlab.com/Shinobi-Systems/Shinobi.git Shinobi
Change directory to Shinobi.
cd Shinobi
Start the installer.
chmod +x INSTALL/freenas.sh && INSTALL/freenas.csh
Instructions on how to access your Shinobi instance will be available at the end of the installation process. By default, the URL for the super user should be:
http://your_jails_ip_address:8080/super
Here is where you create user accounts. To access the Dashboard, go to:
http://your_jails_ip_address:8080
Username and Password for this are those created mentioned above.

Sample screenshot after successful installation

Here is a sample screen shot of the Shinobi setup.


And that's it. Enjoy!

Here are some of the references that helped me achieve this.


UPDATE: I've been using Shinobi for more than a year now and it has been sufficient for my needs. I also developed an android application which you can get at Google Play. It needs a lot of work but if setup correctly, you will be able to view and control your cameras.

6 comments:

  1. Hi Allen,
    I followed this, until this line
    "git clone https://gitlab.com/Shinobi-Systems/Shinobi.git Shinobi"
    when I got "Command not found".
    What have I done wrong, please?

    ReplyDelete
  2. Hi Frank,

    You'll need to install git first. You can download it at https://git-scm.com/downloads

    ReplyDelete
  3. Didnt work - Had to download another script that at least allowed me to install the software and access the web interface.
    Still problematic though - setting up new users and none is validated when trying to login. Then suddenly you couldnt logout as superuser - web page kept going back to default page *still logged in as superuser admin, but no way to logout - weird ?? Even after restarting the jail, the web page kept reverting back from log off back to default inlogged page - No option to add cameras - also noticed a message in the log stating "this install of shinobi is not activated" - No idea what this means

    ReplyDelete
  4. All repositories are up to date.
    pkg: No packages available to install matching '-y' have been found in the repositories
    git: Command not found.
    ./ShinobiCE: No such file or directory.
    root@shinobi:~/shinobi #

    ReplyDelete
  5. what does this actually mean???

    Shown in log once installed ...
    "This Install of Shinobi is NOT Activated"

    ReplyDelete
  6. This is the first time I'm seeing this message. I believe it refers to the version of the Shinobi that was installed. Mine is a very old version and didn't have that when I installed it. I would recommend that you ask your question here https://www.reddit.com/r/ShinobiCCTV/. The creator of the software typically replies within 24 hours.

    ReplyDelete