Skip to content
This repository has been archived by the owner on Jun 18, 2022. It is now read-only.
/ web Public archive

(DEPRECATED) An open source GUI to configure the machinery and to view events that were detected by the machinery.

Notifications You must be signed in to change notification settings

kerberos-io/web

Repository files navigation

Kerberos Open Source - Web (Archived)

This project is archived, and move to the new agent repository: Kerberos Agent.


License

The Kerberos Open Source project is licensed with BY-NC-SA 4.0, this means that everyone can use Kerberos and modify if to their needs, in a non commercial activity.

More information about this license.

Vote for features

Report features if you think something is missing, and should be added to Kerberos Open Source, we love to hear about your ideas.

Why Kerberos?

As burglary is very common, we believe that video surveillance is a trivial tool in our daily lifes which helps us to feel a little bit more secure. Responding to this need, a lot of companies have started developing their own video surveillance software in the past few years.

Nowadays we have a myriad of expensive cameras, recorders, and software solutions which are mainly outdated and difficult to install and use. Kerberos Open Source goal is to solve these problems and to provide every human being in this world to have their own ecological, affordable, easy-to-use and innovative surveillance solution.

Introduction

Kerberos Open Source is perfect for personal usage. It's great if you only have a couple of surveillance cameras to be managed. A Kerberos agent (e.g. on a Raspberry Pi or inside a Docker container) runs for each camera. Their are many different installation possibilities, please have a look at the architecture or installation page.

Every Kerberos agent has it's own web interface (front-end) to review media recording, and processing engine (back-end) of a specific surveillance camera. The Open Source version doesn't come with a central overview of all recordings generated by your Kerberos agents. For this feature we highly recommend Kerberos cloud.

If you want to manage more than 10 Kerberos agents, it's recommended to use Kerberos Enterprise. This will help you to scale, support high availability and load balancing. Check out the architecture section for a better understanding of when to use what.

The web

The web is responsible for the visualization. It's a GUI which helps the user to find activity at a specific period, configure the machinery, view a live stream, see system information and much more.

It's written in PHP using the extremely popular PHP Framework Laravel, and Javascript using the client-side framework BackboneJS. We will discuss the different pages and functionality briefly. Please check out the demo environment if you want to see a real life example.

How does it work?

Read more on our documentation website to have a better understanding of how the web works.

Installation

Kerberos Open Source comes with different installation flavours (it includes both the machinery and web repository). The reason is because depending on the use case one option is better than another. A short list of recommendations:

  • KiOS: You have a Raspberry Pi, and you only want to run a Kerberos agent on it.s
  • Raspbian: You have a Raspberry Pi, but you want other services running next to the Kerberos agent.
  • Docker: You have a lot of IP cameras, and/or don't want to mess with dependencies.
  • Generic: You want to develop/extend Kerberos with your own features, or you want to run a Kerberos agent on a not supported OS/architecture.

Install from source

If you want to install the web, you'll need to have a webserver (e.g. Nginx) and PHP running with some extensions. You also need NodeJS and npm installed to install Bower. Below you can find the installation procedure to install the web on your preferred environment.

Install Dependencies

Install Git, PHP7 (+extensions) and NodeJS.

A) Ubuntu

sudo apt-get update && sudo apt-get upgrade
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install git nginx php7.0-cli php7.0-gd php7.0-mcrypt php7.0-curl php7.0-mbstring php7.0-dom php7.0-zip php7.0-fpm nodejs npm

B) Raspbian

echo "deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi" | sudo tee --append /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -t stretch php7.0 php7.0-curl php7.0-gd php7.0-fpm php7.0-cli php7.0-opcache php7.0-mbstring php7.0-xml php7.0-zip php7.0-mcrypt nodejs npm
sudo ln -s /usr/bin/nodejs /usr/bin/node

C) OSX

brew install php7.0 php7.0-curl php7.0-gd php7.0-fpm php7.0-cli php7.0-opcache php7.0-mbstring php7.0-xml php7.0-zip php7.0-mcrypt nodejs npm

Configure webserver

Install Nginx,

sudo apt-get install nginx

or if you're running OSX use brew.

sudo brew install nginx

Creating a Nginx config.

sudo rm -f /etc/nginx/sites-enabled/default
sudo nano /etc/nginx/sites-enabled/default

Copy and paste following config file; this file tells nginx where the web will be installed and that it requires PHP.

server
{
    listen 80 default_server;
    listen [::]:80 default_server;

    root /var/www/web/public;
    index index.html index.htm index.nginx-debian.html;

    server_name kerberos.rpi kerberos.rpi;
    index index.php index.html index.htm;

    location /
    {
            autoindex on;
            try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$
    {
            fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
    }
}

Clone source

Create a www location.

mkdir -p /var/www

Get the source code from Github.

cd /var/www && sudo git clone https://github.com/kerberos-io/web && cd web

Install PHP packages by using composer.

curl -sS https://getcomposer.org/installer | sudo php
sudo mv composer.phar /usr/bin/composer
sudo composer install

Add write permission for the storage directory, and the kerberos config file.

sudo chmod -R 777 storage
sudo chmod -R 777 bootstrap/cache
sudo chmod 777 config/kerberos.php

Install bower globally by using npm.

sudo npm -g install bower

Install Front-end dependencies with bower

cd public
sudo bower --allow-root install

Restart nginx

sudo service nginx restart

How to access

You can access the web by entering the IP-address in your favorite browser. You'll see a welcome page showing up, on which you will be able to choose an username and password; the default username and password is root.