Shinobi CCTV docker
Instalação e configurações Shinobi
Shinobi API
Link: https://docs.shinobi.video/api
RESTful API
Simple and Efficient
Everything that the official dashboard does is through the Shinobi API. Meaning If you decide to build your own user interface or just using certain functions of Shinobi; The API will make quick work of it.
When you authenticate with Shinobi it will offer you an Authorization Token. This token is your Session Key as well and can be used as an API Key. This key will remain active for 15 minutes after the last acivity or while your WebSocket is connected.
Let's Begin
Create an API Key or Login to get started.
After Authentication
Instalação Shinobi Docker
Link: https://gitlab.com/Shinobi-Systems/ShinobiDocker git clone https://gitlab.com/Shinobi-Systems/ShinobiDocker.git
Install Shinobi with Docker
2024-05-07
https://shinobi.video https://docs.shinobi.video/installation/docker
Quick Install
- Run this in terminal.
bash <(curl -s https://gitlab.com/Shinobi-Systems/Shinobi-Installer/raw/master/shinobi-docker.sh)
Advanced Install
- Download this repository and enter it.
- If you do not have Docker installed run
sh INSTALL/docker.sh
.
- If you do not have Docker installed run
- Review and modify the
docker-compose.yml
file.- Leave it as-is for default setup.
- Run the preparation and starter script.
bash setup_and_run.sh
Once Installed
You will be asked if you want to use the included database, default is Yes. Once complete open port 8080 of your Docker host in a web browser.
The following tables offer a breakdown of the configurations that control how the
shinobi
andshinobi-sql
services are set up and interact within your Docker environment. Adjustments can be made to these values directly in the associateddocker-compose
files to modify the behavior of the deployment as needed.
docker-compose-sql.yml
: shinobi-sql
Service Environment Variables
Variable | Description | Default Value |
---|---|---|
MYSQL_ROOT_PASSWORD | The password for the MySQL root user. | rootpassword |
MYSQL_DATABASE | The name of the database to create. | ccio |
MYSQL_USER | The username for the database. | majesticflame |
MYSQL_PASSWORD | The password for the database user. | 1234 |
docker-compose-main.yml
: shinobi
Service Build Arguments and Environment Variables
Build Arguments
Argument | Description | Default Value |
---|---|---|
SHINOBI_BRANCH | The branch of the Shinobi git repository to clone during the build process. | dev |
Environment Variables
Variable | Description | Default Value |
---|---|---|
HOME | The home directory path within the container. | /home/Shinobi |
DB_HOST | Hostname of the MySQL database server. | shinobi-sql |
DB_USER | Username to connect to the MySQL database. | majesticflame |
DB_PASSWORD | Password to connect to the MySQL database. | 1234 |
DB_DATABASE | Name of the MySQL database to use. | ccio |
SHINOBI_UPDATE | Whether to pull updates from git when the container starts. | false |
Script Failing? Run this.
apt install dos2unix -y && dos2unix entrypoint.sh && chmod +x entrypoint.sh && dos2unix setup_and_run.sh && chmod +x setup_and_run.sh && bash setup_and_run.sh
Instalação Shinobi Docker Desktop Windows
Link: https://docs.shinobi.video/installation/docker-windows
Running Shinobi in Windows Docker Desktop
A step-by-step tutorial on how to install and run Shinobi using Docker on Windows. By following these instructions, you’ll have Shinobi up and running in a container, accessible through your web browser.
Below is a step-by-step tutorial on how to install and run Shinobi using Docker on Windows. By following these instructions, you’ll have Shinobi up and running in a container, accessible through your web browser.
Also Thanks to warbleeder in the Community Chat for putting the information together for this document to be written!
- Community Chat : https://shinobi.community
1. Download & Install Docker for Windows
-
Download Docker:
-
Click here to download the Docker Desktop Installer for Windows.
-
-
Install Docker:
- Run the Docker Desktop Installer you just downloaded.
- During the installation wizard, ensure that WSL (Windows Subsystem for Linux) is checked.
- After the installation completes, reboot your system when prompted.
2. Initial Docker Configuration
-
Open Docker Desktop:
- After rebooting, launch Docker Desktop .
- It may prompt you for an email address. You can skip this step.
- Proceed through the next couple of setup screens until Docker finishes its initial configuration.
-
Enable Host Networking:
- Once Docker is running, click the Settings icon (gear icon at the top-right of the Docker Desktop window).
- Go to Resources → Network .
- Check the box for Enable host networking .
- Click Apply & Restart .
- Wait for Docker to restart; if a prompt appears to cancel or continue, click Cancel to return to the main screen.
3. Pull the Shinobi Image
-
Open the Built-in Terminal:
- In Docker Desktop, look to the bottom-right corner and click the Terminal icon.
- Click Enable to activate the integrated terminal.
-
Pull the Shinobi Image:
- In the terminal, copy and paste or type:
docker pull registry.gitlab.com/shinobi-systems/shinobi:dev
- Press Enter . Docker will download the Shinobi image, which may take a few minutes depending on your connection.
4. Run the Shinobi Container
-
Copy the Image ID:
- Once the pull is complete, click on the Images tab in Docker Desktop.
- Locate the Shinobi image you just downloaded.
- Next to the image, click the copy button to copy the image’s ID (it will be in the form of a long sha256 hash).
-
Start the Container:
- Return to the Terminal in Docker Desktop.
- Type the following command, replacing
<Image_ID>
with the ID you copied:
docker run -d -p 8080:8080 <Image_ID>
- For example (with a sample ID):
docker run -d -p 8080:8080 sha256:f3f6ed55e741e260c0b975f8d89f1358018b53ab28b9887ae00e363fd2e3423c
- Press Enter to launch the Shinobi container.
3. Confirm the Container is Running:
- Click on Containers in Docker Desktop.
- You should see your new container listed and its status should be green, indicating it’s running successfully.
5. Access Shinobi in Your Browser
-
Open Shinobi Superuser Interface:
- Launch your web browser and navigate to:
http://localhost:8080/super
2. Log In with Default Credentials:
- Default Superuser Email:
admin@shinobi.video
- Default Password:
admin
3. Explore Shinobi:
Once logged in, you can manage and customize your Shinobi installation as needed.
6. Troubleshooting & Support
- If you encounter any issues:
- Make sure Docker Desktop is running.
- Ensure you’ve enabled WSL integration and host networking.
- Confirm that your container is active and not stopped.
- Double-check you’re using the correct port (8080).
- For further help, you can reach out on Discord , user warbleeder has been gracious to volunteer in helping users with questions or issues in relation to using Docker Desktop on Windows.
That’s it!
You have successfully installed and launched Shinobi on Windows using Docker. You can now explore camera setup, motion detection, video recording, and all the other powerful features Shinobi has to offer. Enjoy!