Compare commits
6 Commits
95b430b85d
...
7f036d84da
Author | SHA1 | Date |
---|---|---|
DoTheEvo | 7f036d84da | |
DoTheEvo | f273073937 | |
DoTheEvo | 3ecbf5f2c6 | |
DoTheEvo | f7f16be03b | |
DoTheEvo | 739fb531ec | |
DoTheEvo | 14ce06da5f |
|
@ -8,51 +8,52 @@ You know little and want to start somewhere, FAST!
|
||||||
# Requirements
|
# Requirements
|
||||||
|
|
||||||
* A **spare PC** that will be the server. Can be a **virtualmachine**.
|
* A **spare PC** that will be the server. Can be a **virtualmachine**.
|
||||||
* **Google**.<br>
|
* **Google** and **chatGPT**.<br>
|
||||||
If the guide says do X, and steps seem insuficient,
|
If the guide says do X, and steps seem insufficient,
|
||||||
you google that shit and add the word **youtube**.
|
you google that shit and add the word **youtube**,
|
||||||
|
or you ask chatGPT few questions.
|
||||||
|
|
||||||
# Install a linux on the server
|
# Install a Linux on the server
|
||||||
|
|
||||||
![endeavouros_logo](https://i.imgur.com/DSMmaj8.png)
|
![debian_logo](https://i.imgur.com/LHdGx2S.png)
|
||||||
|
|
||||||
[Some video.](https://www.youtube.com/watch?v=SyBuNZxzy_Y)
|
* **Download linux iso**. I picked [Debian\(650MB\)](https://www.debian.org/)
|
||||||
|
* *Why that linux and not xxx linux?*<br>
|
||||||
* **download linux iso**. For noobs I picked [EndeavourOS \(2GB\)](https://github.com/endeavouros-team/ISO/releases/download/1-EndeavourOS-ISO-releases-archive/EndeavourOS_Cassini_Nova-03-2023_R1.iso)
|
* Fuck you, thats why. I am not writing a novel here.
|
||||||
* *why that linux and not xxx linux?*
|
* Make a **bootable usb** from the iso, recommend using [ventoy](https://www.ventoy.net/en/doc_start.html)
|
||||||
* Under the hood its Arch Linux.
|
* Download ventoy; run; select usb; click install; exit;
|
||||||
* *why arch then?*
|
* Copy the iso on to the usb as you would any file.
|
||||||
* fuck you, thats why, I am not writing a novel here.
|
* **Boot from the usb**, maybe on newer machines need to disable secure boot in bios
|
||||||
* **make bootable usb** from the iso, recommend use [ventoy](https://www.ventoy.net/en/doc_start.html)
|
* **Click through the installation**
|
||||||
* download; run; select usb; click install; exit; copy iso on to it
|
* [Theres plenty of youtube videos.](https://youtu.be/rf3EN7e-34g?t=419)
|
||||||
* **boot from the usb**, maybe on newer machines need to disable secure boot in bios
|
* Leave `root` password empty, so that sudo is installed automaticly
|
||||||
* **click through the installation**
|
* this will disable root account, if you would want it, just set password for root<br>
|
||||||
* pick online installer when offered
|
`sudo passwd root`
|
||||||
* during install, there can be step called `Desktop` - pick `No Desktop`<br>
|
* For username lets say `noob` with password `aaa`
|
||||||
or whatever, does not really matter
|
* During software selection [uncheck everything](https://i.imgur.com/MKrPMx2.png)
|
||||||
* when picking disk layout choose wipe everything
|
except:
|
||||||
* username lets say you pick `noob`
|
* SSH server
|
||||||
* done
|
* standard system utilities<br>
|
||||||
|
* This means no graphical interface, just command line.
|
||||||
|
|
||||||
# Basic setup of the linux server
|
# Basic setup of the linux server
|
||||||
|
|
||||||
![ssh](https://i.imgur.com/ElFrBog.png)
|
![ssh](https://i.imgur.com/ElFrBog.png)
|
||||||
|
|
||||||
|
**SSH** - a tiny application that allows you to execute commands from your comfy
|
||||||
|
windows PC on the damn server.<br>
|
||||||
|
During Debian install you should have had SSH server checked,
|
||||||
|
so it would be installed automatically.
|
||||||
|
If you missed, install it - `sudo apt install ssh`
|
||||||
|
|
||||||
**SSH** - a tiny application that allows you to execute commands
|
Now to **find IP address** of the machine so we can remotely connect to it.
|
||||||
from your comfy windows PC on the damn server
|
|
||||||
|
|
||||||
* log in to the server and be in terminal
|
* Log in `noob` / `aaa` and be in terminal.
|
||||||
* ssh is installed by default, but disabled
|
* `ip r` - shows [at the end the IP](https://i.imgur.com/eGkYmKB.png) of the machine<br>
|
||||||
* to check status - `systemctl status sshd`
|
lets say you got `192.168.1.8`<br>
|
||||||
* to **enable it** `sudo systemctl enable --now sshd`
|
|
||||||
* `ip a` or `ip r` - show [somewhere in there](https://www.cyberciti.biz/faq/linux-ip-command-examples-usage-syntax/#3)
|
|
||||||
what IP address the server got assigned<br>
|
|
||||||
lets say you got `192.168.1.8`,
|
|
||||||
nope I am not explaining IP addresses
|
nope I am not explaining IP addresses
|
||||||
* done
|
|
||||||
|
|
||||||
*arrow up key in terminal will cycle through old comamnds in history*
|
To [check status](https://i.imgur.com/frlyy6P.png) of ssh - `systemctl status sshd`
|
||||||
|
|
||||||
# Remote connect to the server
|
# Remote connect to the server
|
||||||
|
|
||||||
|
@ -60,39 +61,47 @@ You know little and want to start somewhere, FAST!
|
||||||
|
|
||||||
* **install** [mobaXterm](https://mobaxterm.mobatek.net/) on your windows machine
|
* **install** [mobaXterm](https://mobaxterm.mobatek.net/) on your windows machine
|
||||||
* use it to **connect** to the server using its ip address and username
|
* use it to **connect** to the server using its ip address and username
|
||||||
* [have a pic](https://i.imgur.com/lhRGt1p.png)<br>
|
* [have a pic](https://i.imgur.com/lhRGt1p.png)
|
||||||
* done
|
* [have a video](https://youtu.be/A7pHiPgW2u8&t=10s)
|
||||||
|
|
||||||
# Install docker
|
# Install docker
|
||||||
|
|
||||||
![docker_logo](https://i.imgur.com/6SS5lFj.png)
|
![docker_logo](https://i.imgur.com/6SS5lFj.png)
|
||||||
|
|
||||||
**Docker** - a thing that makes hosting super easy, people prepared *recipies*,
|
**Docker** - a thing that makes hosting super easy, people prepared *recipes*,
|
||||||
you copy paste them, maybe edit a bit, run them
|
you copy paste them, edit a bit, run them.
|
||||||
|
|
||||||
* **install docker-compose and ctop** - `sudo pacman -S docker-compose ctop`
|
* **install docker** - `sudo curl -fsSL https://get.docker.com | bash`<br>
|
||||||
* **enable docker service** - `sudo systemctl enable --now docker`
|
|
||||||
* add your user to docker group so you dont need to sudo all the time<br>
|
* add your user to docker group so you dont need to sudo all the time<br>
|
||||||
`sudo gpasswd -a noob docker`
|
`sudo gpasswd -a noob docker`
|
||||||
* log out, log back in
|
* log out - `exit`, log back in
|
||||||
* done
|
* intall [**ctop**](https://github.com/bcicen/ctop) to get some monitoring and management.<br>
|
||||||
|
Unfortunately ctop is not in debians repositories, so longer uglier two commands to install it:
|
||||||
|
* `sudo curl -Lo /usr/local/bin/ctop https://github.com/bcicen/ctop/releases/download/v0.7.7/ctop-0.7.7-darwin-amd64`
|
||||||
|
* `sudo chmod +x /usr/local/bin/ctop`
|
||||||
|
|
||||||
# Using docker
|
# First docker compose
|
||||||
|
|
||||||
Well, its time to learn how to create and edit files and copy paste shit
|
![nging_welcome](https://i.imgur.com/Iv0B6bN.png)
|
||||||
|
|
||||||
|
Well, its time to learn how to create and **edit files** and copy paste shit
|
||||||
in to them, IN LINUX!<br>
|
in to them, IN LINUX!<br>
|
||||||
Honestly could be annoying as fuck at first, but mobaXterm should make it easier
|
Honestly could be annoying as fuck at first, but mobaXterm should make it easier
|
||||||
with that left directory pane and right/middle mouse click for paste.<br>
|
with that left directory pane that lets you move around,
|
||||||
Nano text editor is relatively simple and everywhere so that will be used.
|
and the right/middle mouse click for paste.<br>
|
||||||
|
But now will be listed general commands in linux to move around and
|
||||||
|
`nano` editor will be used as it is relatively simple and everywhere.
|
||||||
|
|
||||||
* be in your home directory, the command `cd` will always get you there
|
*extra info:* `arrow-up key` in terminal will cycle through old comamnds in history
|
||||||
* create directory `mkdir docker`
|
|
||||||
* go in to it `cd docker`
|
* Be in your home directory, the command `cd` will always get you there.
|
||||||
* create directory `mkdir nginx`
|
* Create directory `mkdir docker`
|
||||||
* go in to it `cd nginx`
|
* Go in to it `cd docker`
|
||||||
|
* Create directory `mkdir nginx`
|
||||||
|
* Go in to it `cd nginx`
|
||||||
* Oh look at you being all hacker in terminal, following simple directions
|
* Oh look at you being all hacker in terminal, following simple directions
|
||||||
* create empty docker-compose.yml file `nano docker-compose.yml`
|
* Create empty docker-compose.yml file `nano docker-compose.yml`
|
||||||
* paste in to it this *recipe*, spacing matters
|
* Paste in to it this *recipe*, spacing matters
|
||||||
```
|
```
|
||||||
services:
|
services:
|
||||||
|
|
||||||
|
@ -103,17 +112,56 @@ Nano text editor is relatively simple and everywhere so that will be used.
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
```
|
```
|
||||||
* save using `ctrl+s`; exit `ctrl+x`
|
* Save using `ctrl+s`; exit `ctrl+x`
|
||||||
* run command `sudo docker compose up -d`<br>
|
* Run command `sudo docker compose up -d`<br>
|
||||||
will say the container started
|
[This is what it should look like](https://imgur.com/a/vtHYNr9)
|
||||||
* you can now run command `ctop`<br> a small [utility](https://github.com/bcicen/ctop)
|
* You can run `ctop` to see container status, resource use, logs,
|
||||||
for managing containers<br>
|
details, or to exec in to the container. [Like so.](https://imgur.com/a/ChGjk7i)
|
||||||
see their status, see their resource use, see their logs (arrow left),
|
|
||||||
see detailed info(arrow right)
|
|
||||||
* on your windows machine go to your browser<br>
|
* on your windows machine go to your browser<br>
|
||||||
in address bar put the ip of your server `192.168.1.8` bam<br>
|
in address bar put the ip of your server `192.168.1.8` bam<br>
|
||||||
|
You should see the pic above - **Welcome to nginx!**
|
||||||
|
|
||||||
![nging_welcome](https://i.imgur.com/Iv0B6bN.png)
|
*extra info:* it should actually be`192.168.1.8:80`,
|
||||||
|
with the port 80 we see in the compose being used in the url too.
|
||||||
|
But since port 80 is the default http port, it is what browser tries by default.
|
||||||
|
|
||||||
|
# Moving beyond terminal
|
||||||
|
|
||||||
|
![dockge_pic](https://i.imgur.com/Vh0JN5F.png)
|
||||||
|
|
||||||
|
Beginners hate terminal.
|
||||||
|
[Dockge](https://github.com/louislam/dockge) comes to rescue with its web interface.
|
||||||
|
|
||||||
|
Same as nginx example was deployed, we deploy dockge
|
||||||
|
using slightly edited compose file from their
|
||||||
|
[github page.](https://github.com/louislam/dockge/blob/master/compose.yaml)
|
||||||
|
|
||||||
|
* Create new directory dockge `mkdir ~/docker/dockge`
|
||||||
|
* Go in to the docker directory `cd ~/docker/dockge`
|
||||||
|
* Create empty docker-compose.yml file `nano docker-compose.yml`
|
||||||
|
* Paste in to it this *recipe*, spacing matters
|
||||||
|
```
|
||||||
|
services:
|
||||||
|
dockge:
|
||||||
|
image: louislam/dockge:1
|
||||||
|
container_name: dockge
|
||||||
|
hostname: dockge
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "5001:5001"
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
- ./data:/app/data
|
||||||
|
- /opt/stacks:/opt/stacks
|
||||||
|
environment:
|
||||||
|
- DOCKGE_STACKS_DIR=/opt/stacks
|
||||||
|
```
|
||||||
|
* Save using `ctrl+s`; exit `ctrl+x`
|
||||||
|
* Run command `sudo docker compose up -d`<br>
|
||||||
|
* on your windows machine go to your browser<br>
|
||||||
|
in address bar put the ip of your server `192.168.1.8:5001` bam<br>
|
||||||
|
|
||||||
|
Now you can setup new stuff from webgui, pasting compose and .env files.
|
||||||
|
|
||||||
# understanding what you just did
|
# understanding what you just did
|
||||||
|
|
||||||
|
@ -123,9 +171,6 @@ Nano text editor is relatively simple and everywhere so that will be used.
|
||||||
* if this part is done that means that shit like hosting own netflix(jellyfin),
|
* if this part is done that means that shit like hosting own netflix(jellyfin),
|
||||||
or google drive/calendar/photos(nextcloud), or own password manager(vaultwarden)
|
or google drive/calendar/photos(nextcloud), or own password manager(vaultwarden)
|
||||||
or own minecraft server(minecraft server) is just one `docker-compose.yml` away.
|
or own minecraft server(minecraft server) is just one `docker-compose.yml` away.
|
||||||
* you could almost abandon terminal at this point, just start googling portainer
|
|
||||||
and you can be doing this shit through a webpage. I dont use it,
|
|
||||||
but I heard it got good, though bit bothersome since its pushing subscriptions.
|
|
||||||
|
|
||||||
# understanding what you did not get done
|
# understanding what you did not get done
|
||||||
|
|
||||||
|
|
|
@ -28,9 +28,13 @@ This detection is cpu heavy and to ease the load,
|
||||||
[Google Coral TPU](https://docs.frigate.video/frigate/hardware#google-coral-tpu)
|
[Google Coral TPU](https://docs.frigate.video/frigate/hardware#google-coral-tpu)
|
||||||
is recommended if planning to run multiple cameras with detection.<br>
|
is recommended if planning to run multiple cameras with detection.<br>
|
||||||
Recently
|
Recently
|
||||||
[OpenVINO](https://docs.frigate.video/configuration/detectors/#openvino-detector)
|
[OpenVINO](https://docs.frigate.video/configuration/object_detectors#openvino-detector)
|
||||||
has been integrated, which should allow use of igpu of intel 6th+ gen cpus
|
has been integrated, which should allow use of igpu of intel 6th+ gen cpus
|
||||||
as a detector.
|
as a detector.
|
||||||
|
|
||||||
|
Though my testing with intel igpu OpenVINO going by official docs results in
|
||||||
|
miniPC that runs frigate freezing once a day.
|
||||||
|
In comments there seems to be solution by switching to
|
||||||
|
|
||||||
Open source, written in Python and JavaScript.
|
Open source, written in Python and JavaScript.
|
||||||
|
|
||||||
|
@ -228,25 +232,59 @@ cameras:
|
||||||
|
|
||||||
### Current full config
|
### Current full config
|
||||||
|
|
||||||
Got a tplink camara C440 and some rando aliexpress ptz camera
|
<details>
|
||||||
|
<summary>with intel igpu openvino mqtt ntfy</summary>
|
||||||
|
|
||||||
|
Previously when I tried openvino igpu hw acceleration I had the server daily freeze.
|
||||||
|
Now I setup this config expecting freezes and getting ready to try
|
||||||
|
[yolo model](https://github.com/blakeblackshear/frigate/issues/8470#issuecomment-1823556062)
|
||||||
|
from github comments, but no freeze yet for few days..
|
||||||
|
|
||||||
```
|
```
|
||||||
mqtt:
|
mqtt:
|
||||||
enabled: false
|
enabled: true
|
||||||
|
host: 10.0.19.40
|
||||||
|
port: 1883
|
||||||
|
user: frigate
|
||||||
|
password: ${FRIGATE_RTSP_PASSWORD}
|
||||||
|
|
||||||
detectors:
|
detectors:
|
||||||
default_detector_for_all:
|
ov:
|
||||||
type: cpu
|
type: openvino
|
||||||
|
device: AUTO
|
||||||
|
model:
|
||||||
|
path: /openvino-model/ssdlite_mobilenet_v2.xml
|
||||||
|
|
||||||
|
model:
|
||||||
|
width: 300
|
||||||
|
height: 300
|
||||||
|
input_tensor: nhwc
|
||||||
|
input_pixel_format: bgr
|
||||||
|
labelmap_path: /openvino-model/coco_91cl_bkgr.txt
|
||||||
|
|
||||||
objects:
|
objects:
|
||||||
track:
|
track:
|
||||||
- person
|
- person
|
||||||
- cat
|
- cat
|
||||||
- dog
|
- dog
|
||||||
filters:
|
filters:
|
||||||
|
person:
|
||||||
|
min_area: 1000
|
||||||
|
threshold: 0.70
|
||||||
cat:
|
cat:
|
||||||
min_area: 200
|
min_area: 200
|
||||||
threshold: 0.5
|
threshold: 0.5
|
||||||
|
|
||||||
|
ffmpeg:
|
||||||
|
hwaccel_args: preset-vaapi
|
||||||
|
|
||||||
|
detect:
|
||||||
|
max_disappeared: 2500
|
||||||
|
|
||||||
cameras:
|
cameras:
|
||||||
K1-Brana:
|
K1-Brana:
|
||||||
|
birdseye:
|
||||||
|
order: 1
|
||||||
ffmpeg:
|
ffmpeg:
|
||||||
inputs:
|
inputs:
|
||||||
- path: rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@10.0.19.41:554/stream1
|
- path: rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@10.0.19.41:554/stream1
|
||||||
|
@ -268,15 +306,43 @@ cameras:
|
||||||
days: 1
|
days: 1
|
||||||
motion:
|
motion:
|
||||||
mask:
|
mask:
|
||||||
- 0,480,186,480,174,226,173,0,0,0
|
- 640,480,640,0,0,0,0,480,316,480,308,439,179,422,162,121,302,114,497,480
|
||||||
|
|
||||||
K2-Pergola:
|
K2-Pergola:
|
||||||
|
birdseye:
|
||||||
|
order: 2
|
||||||
ffmpeg:
|
ffmpeg:
|
||||||
inputs:
|
inputs:
|
||||||
- path: rtsp://10.0.19.42:554/0/av1
|
- path: rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@10.0.19.42:554/stream1
|
||||||
roles:
|
roles:
|
||||||
- record
|
- record
|
||||||
- path: rtsp://10.0.19.42:554/0/av1
|
- path: rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@10.0.19.42:554/stream2
|
||||||
|
roles:
|
||||||
|
- detect
|
||||||
|
detect:
|
||||||
|
width: 640
|
||||||
|
height: 480
|
||||||
|
fps: 5
|
||||||
|
snapshots:
|
||||||
|
enabled: True
|
||||||
|
bounding_box: True
|
||||||
|
record:
|
||||||
|
enabled: True
|
||||||
|
retain:
|
||||||
|
days: 1
|
||||||
|
motion:
|
||||||
|
mask:
|
||||||
|
- 640,78,640,0,0,0,0,480,316,480,452,171
|
||||||
|
|
||||||
|
K3-Dvor:
|
||||||
|
birdseye:
|
||||||
|
order: 3
|
||||||
|
ffmpeg:
|
||||||
|
inputs:
|
||||||
|
- path: rtsp://10.0.19.43:554/0/av1
|
||||||
|
roles:
|
||||||
|
- record
|
||||||
|
- path: rtsp://10.0.19.43:554/0/av1
|
||||||
roles:
|
roles:
|
||||||
- detect
|
- detect
|
||||||
detect:
|
detect:
|
||||||
|
@ -289,14 +355,22 @@ cameras:
|
||||||
record:
|
record:
|
||||||
enabled: True
|
enabled: True
|
||||||
retain:
|
retain:
|
||||||
days: 1
|
days: 21
|
||||||
|
motion:
|
||||||
|
mask:
|
||||||
|
- 0,37,198,38,174,0,0,0
|
||||||
|
- 640,90,640,352,210,352
|
||||||
# Include all cameras by default in Birdseye view
|
# Include all cameras by default in Birdseye view
|
||||||
birdseye:
|
birdseye:
|
||||||
enabled: True
|
enabled: True
|
||||||
mode: continuous
|
mode: continuous
|
||||||
|
|
||||||
|
ui:
|
||||||
|
time_format: 24hour
|
||||||
```
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
# First run
|
# First run
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue