23. August 2022
Shinobi - The open source CCTV solution
Shinobi is Open Source, written in Node.js, and real easy to use. It is the future of CCTV and NVR for developers and end-users alike. It is catered to by professionals and most importantly by the one who created it.
SHINOBI DOCS Get Started ¶
Some Aspects
¶
Shinobi can be used as a Baby Monitor, Construction Site Montage Viewer, Store Camera DVR, and much more.
Defeats Limits
¶
Don’t be held back by a maximum number of streams based on browser.
Modern Recording
¶
Record to MP4
or WebM
and open videos on your mobile device.
Realtime Data
¶
Websocket provides realtime events pushed to connected clients.
Requirements
¶
These requirements will be installed for you with The Ninja Way
. The Ninja Way is the recommended way to install. It will allow ease in updating as well as changes to the code.
Node.js (12.x)
, FFmpeg (Between 3.3 to 4.1)
, and MariaDB (10.4+)
are the main components that Shinobi needs. With the Ninja Way it is expected that all these requirements will be fulfilled for you.
To get the best experience and most support it is suggested that you install on a dedicated machine with Ubuntu 20.04
then install Shinobi the Ninja Way
.
-
Become root to use the installer and run Shinobi. Use one of the following to do so.
-
Download and run the installer.
bash <(curl -s https://gitlab.com/Shinobi-Systems/Shinobi-Installer/raw/master/shinobi-install.sh)
-
Once complete open port 8080 of your host in a web browser.
-
After Installation
Login to your Super user account at http://your.shinobi.video/super
to create your first Admin account.
Username : [email protected]
Password : admin
Set up Sub-Accounts
Configuration File Options (Incomplete)
conf.json
is the file that you create from conf.sample.json
during the install process using the following command from inside the Shinobi directory.
cp conf.sample.json conf.json
Anyway! on to what’s really important. What’s in the file itself. This is the contents of conf.sample.json
.
1{
2 "port": 8080,
3 "addStorage": [
4 {"name":"second","path":"__DIR__/videos2"}
5 ],
6 "ssl":{
7 "key":"/path/to/key/file",
8 "cert":"/path/to/cert/file"
9 },
10 "db": {
11 "host": "127.0.0.1",
12 "user": "majesticflame",
13 "password": "",
14 "database": "ccio",
15 "port":3306
16 },
17 "mail":{
18 "service": "gmail",
19 "auth": {
20 "user": "[email protected]",
21 "pass": "your_password_or_app_specific_password"
22 }
23 },
24 "cron":{
25 "key":"change_this_to_something_very_random_
26 _just_anything_other_than_this"
27 },
28 "pluginKeys":{
29 "Motion":"change_this_to_something_very_random_make_
30 _sure_to_match_/plugins/motion/conf.json"
31 }
32}
Available Options for conf.json
Options | Required | Type | Description |
---|---|---|---|
cpuUsageMarker | no | string | The marker that is used to search for CPU usage in top command. Default is %Cpu . Some systems, like Puppy Linux, require it be set to CPU. |
defaultMjpeg | no | string | A path leading to a JPEG file. This default image is needed for when the camera cannot provide frames. |
doSnapshot | no | boolean | By default the snapshot in the top left open its own FFMPEG process for a moment to get a single frame, You can avoid this by turning on JPEG API or setting this option to false. |
updateKey | no | string | For updating by API. |
streamDir | no | string | default is /dev/shm/streams/ . Remember to end with / . Leave it undefined or null to use default. Be careful in using HLS as Stream Type. This directory should be set as somewhere in RAM |
videosDir | no | string | default is videos/ in the Shinobi directory. Remember to end with /. Leave it undefined or null to use default. |
windowsTempDir | no | string | default is C:/Windows/Temp. If your system is not located on the C: drive then you must add this option in your conf.json file. |
DropboxAppKey | no | string | Future releases will hide dropbox functions when this key is left null. |
ip | no | string | IP that is used for the Shinobi server instance. Default is undefined, which will tell the webserver to automatically choose. |
port | yes | int | Port that is used for the Shinobi server instance. Default is 8080 |
utcOffset | yes | string | Timezone that matches your SQL database. |
db | yes | object | The login information for the SQL database |
db.host | yes | string | The IP address or domain name. Default is 127.0.0.1 |
db.user | yes | string | The user name. Default is majesticflame. |
db.password | yes | string | The password. Default is no password. |
db.database | yes | string | The database name. Default is ccio. |
db.port | yes | int | The port number for Shinobi. Default is 3306. |
cron | no | object | The object that contains some options for cron.js |
cron.deleteOld | no | boolean | cron will delete videos older than Max Number of Days per account. Default is true. |
cron.deleteNoVideo | no | boolean | cron will delete SQL rows that it thinks have no video files. Default is true. |
cron.deleteOverMax | no | boolean | cron will delete files that are over the set maximum storage per account. Default is true. |
no | object | If your Email account uses 2-Step Authentication, like Gmail, then you will be require to create an Application Password. | |
ssl | no | object | If you would to use SSL (Encryption) you can include this object. |
ssl.key | yes* | string | Required if SSL object is present. This is a reference to a file that usually ends in .key. |
Example : ssl/server.key will direct to a folder named ssl inside your Shinobi directory. |
|||
ssl.cert | yes* | string | Required if SSL object is present. This is a reference to a file that usually ends in .crt. |
Example : ssl/server.crt will direct to a folder named ssl inside your Shinobi directory. | |||
ssl.passphrase | yes* | string | If your key and certificate use a passphrase you must define it or SSL will not start. |
ssl.port | no | int | This is the port SSL will listen on. If option is undefined 443 will be used. |
language | no | string | Default is en_CA. You can check the langauges folder inside the Shinobi directory for more options. You can make more by using node tools/translateLanguageFile.js. |
addStorage | no | object | View the sample above for how to structure this object. |
passwordType | no | string | This can be sha256, sha512, or md5. md5 is the default. |
passwordSalt | yes* | string | This is only needed if passwordType is set to sha512. |