Shinobi CCTV / NVR - Raspberry PI Zero-W Security Camera - Software Setup and Usage
Shinobi Installation with Docker
Shinobi is a free, open source, self-hosted CCTV / IP Camera / NVR system that you access through a web-browser. It has tons of supported devices, and methods for adding new devices, as well as an great number of features like customizable layout, motion detection, Recording with pre and psot buffers, and so much more.
Shinobi has a really nice script for installing directly to a Ubuntu based system, and does everything for you if you prefer to run it that way, but today I'll be using a version available as a Docker container.
I use Docker-CE (Community Edition) for this, and use the instructions found here in order to install Docker on any of my systems. I use this method whether it's on a Digital Ocean droplet, or my own machines at home.
First, you'll want to create a directory (most likely in your home folder) called 'shinobi'.
Next, we want to move into that directory, and create three sub-directories inside of it.
Now we'll make three directories inside this one: 'config', 'database', and 'videos'.
Our pre-setup is complete.
Run the Docker Command
Next we'll start the download and install process using the following docker command:
docker run -d -p 8280:8080 -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro -v /home/brian/shinobi/config:/config -v /home/brian/shinobi/database:/var/lib/mysql -v /home/brian/shinobi/videos:/opt/shinobi/videos -v /dev/shm/shinobiDockerTemp:/dev/shm/streams --name=shinobi migoller/shinobidocker
Let's break it down a bit:
- -d - Run as a daemon (for the Windows users, as a service) so it doesn't stop, but continues running in the background.
- -p 8280:8080 - map the host port to the docker port specified next. In this case I will access this web application at the IP of my server on port 8280. The app actually runs on port 8080 in the docker container, which is why we map it that way.
- -v = create the following volume mapping my local directory to the directory in the docker container. This is why we created those directories in the step above. NOTE: there is one more Volume defined, but we don't need to create that directory in our host system.
- --name=shinobi - call the container shinobi so it's easy for me to find in Docker or Portainer, or whatever I use.
- migoller/shinobidockeer - this is the image we'll be using to actually run our Shinobi instance.
Make sure the command is typed in correctly to your terminal, then press Enter. If you get an error immediately, you may need to use
sudo at the start of the command before the word
docker in order for it to work. It depends on whether you've added your user to the docker group on the host.
Now be patient while the image downloads, and dockere starts the container.
Login for the First Time
The first time you access your new install, you'll want to go to your server IP, port 8280, and the "super" directory. So you'll type something like the following into your browser:
Now, you should use your server's IP address, not the one I have above.
Once you get to the Super User login for Shinobi, you'll login with the username:
email@example.com and the password
From there you'll add yourself as the first user. Fill in the fields, don't worry about the 'key' field, then save.
Now you can go back to your browser address bar, and go to
and login using the user you just created.
From there, you'll start setting up cameras. I won't go into the camera setup here because the system has so many options, and honestly,the Shinobi documentation pages are really good, so you should use those as your reference.