: :

Shinobi Video SSL 2020 Updated

  • This help text was compiled using Ubuntu 18.04 server LTS and tested using Ubuntu 20.04 LTS

Install Shinobi using the online documentation

bash <(curl -s https://gitlab.com/Shinobi-Systems/Shinobi-Installer/raw/master/shinobi-install.sh)

On the default shinobi website, do the following:

  • Change your Shinobi Default username and password. This is under Preferences of the /super site.
  • Change the Shinobi port from 8080 to 80. This is under Configuration of the /super site.
  • Restart the Shinobi core. This is under Controls and Logs of the /super site.

Back to the console of your linux machine:

Become a super user

sudo su

Make sure your distribution is up to date

apt-get update
apt-get dist-upgrade

Install certbot

apt-get update
apt-get install software-properties-common
apt-get update
apt-get install certbot

Setup the folder structure you are going to use for certbot

cd /home/Shinobi
mkdir certs
cd /home/Shinobi/web
mkdir -p .well-known/acme-challenge

Generate the certificate

certbot certonly --webroot -w /home/Shinobi/web -d shinobi.website.com

Edit the Shinobi super configuration file to turn on SSL by adding this:

cd /home/Shinobi
nano conf.json
"ssl": {
"key": "/etc/letsencrypt/live/website.ssl.name/privkey.pem",
"cert": "/etc/letsencrypt/live/website.ssl.name/fullchain.pem",
"port": 443
},

Ctrl O, Enter to Save and Ctrl X to exit

It looks like this in place:


{
"port": 80,
"addStorage": [
{
"name": "second",
"path": "__DIR__/videos2"
}
],
"db": {
"host": "127.0.0.1",
"user": "majesticflame",
"password": "",
"database": "ccio",
"port": 3306
},
"mail": {
"service": "gmail",
"auth": {
"user": "[email protected]",
"pass": "your_password_or_app_specific_password"
}
},
"ssl": {
"key": "/etc/letsencrypt/live/website.ssl.name/privkey.pem",
"cert": "/etc/letsencrypt/live/website.ssl.name/fullchain.pem",
"port": 443
},

"cron": {

"key": "change_this_to_something_very_random__just_anything_other_than_this"
},
"pluginKeys": {
"Motion": "change_this_to_something_very_random____make_sure_to_match__/plugins/motion/conf.json",
"OpenCV": "change_this_to_something_very_random____make_sure_to_match__/plugins/opencv/conf.json",
"OpenALPR": "SomeOpenALPRkeySoPeopleDontMessWithYourShinobi"
}
}


Restart Shinobi

pm2 start camera.js
pm2 start cron.js

Profit

Facebook
Twitter
LinkedIn

2 Responses

Leave a Reply

Your email address will not be published. Required fields are marked *