Compare commits

...

6 Commits

Author SHA1 Message Date
DoTheEvo 7f036d84da update 2024-02-25 15:57:35 +01:00
DoTheEvo f273073937 update 2024-02-25 14:53:16 +01:00
DoTheEvo 3ecbf5f2c6 update 2024-02-25 14:48:46 +01:00
DoTheEvo f7f16be03b update 2024-02-25 12:24:56 +01:00
DoTheEvo 739fb531ec update 2024-02-25 11:59:29 +01:00
DoTheEvo 14ce06da5f update 2024-02-19 22:07:37 +01:00
2 changed files with 193 additions and 74 deletions

View File

@ -8,51 +8,52 @@ You know little and want to start somewhere, FAST!
# Requirements
* A **spare PC** that will be the server. Can be a **virtualmachine**.
* **Google**.<br>
If the guide says do X, and steps seem insuficient,
you google that shit and add the word **youtube**.
* **Google** and **chatGPT**.<br>
If the guide says do X, and steps seem insufficient,
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**. 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)
* *why that linux and not xxx linux?*
* Under the hood its Arch Linux.
* *why arch then?*
* fuck you, thats why, I am not writing a novel here.
* **make bootable usb** from the iso, recommend use [ventoy](https://www.ventoy.net/en/doc_start.html)
* download; run; select usb; click install; exit; copy iso on to it
* **boot from the usb**, maybe on newer machines need to disable secure boot in bios
* **click through the installation**
* pick online installer when offered
* during install, there can be step called `Desktop` - pick `No Desktop`<br>
or whatever, does not really matter
* when picking disk layout choose wipe everything
* username lets say you pick `noob`
* done
* **Download linux iso**. I picked [Debian\(650MB\)](https://www.debian.org/)
* *Why that linux and not xxx linux?*<br>
* Fuck you, thats why. I am not writing a novel here.
* Make a **bootable usb** from the iso, recommend using [ventoy](https://www.ventoy.net/en/doc_start.html)
* Download ventoy; run; select usb; click install; exit;
* Copy the iso on to the usb as you would any file.
* **Boot from the usb**, maybe on newer machines need to disable secure boot in bios
* **Click through the installation**
* [Theres plenty of youtube videos.](https://youtu.be/rf3EN7e-34g?t=419)
* Leave `root` password empty, so that sudo is installed automaticly
* this will disable root account, if you would want it, just set password for root<br>
`sudo passwd root`
* For username lets say `noob` with password `aaa`
* During software selection [uncheck everything](https://i.imgur.com/MKrPMx2.png)
except:
* SSH server
* standard system utilities<br>
* This means no graphical interface, just command line.
# Basic setup of the linux server
![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
from your comfy windows PC on the damn server
Now to **find IP address** of the machine so we can remotely connect to it.
* log in to the server and be in terminal
* ssh is installed by default, but disabled
* to check status - `systemctl status sshd`
* 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`,
* Log in `noob` / `aaa` and be in terminal.
* `ip r` - shows [at the end the IP](https://i.imgur.com/eGkYmKB.png) of the machine<br>
lets say you got `192.168.1.8`<br>
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
@ -60,39 +61,47 @@ You know little and want to start somewhere, FAST!
* **install** [mobaXterm](https://mobaxterm.mobatek.net/) on your windows machine
* use it to **connect** to the server using its ip address and username
* [have a pic](https://i.imgur.com/lhRGt1p.png)<br>
* done
* [have a pic](https://i.imgur.com/lhRGt1p.png)
* [have a video](https://youtu.be/A7pHiPgW2u8&t=10s)
# Install docker
![docker_logo](https://i.imgur.com/6SS5lFj.png)
**Docker** - a thing that makes hosting super easy, people prepared *recipies*,
you copy paste them, maybe edit a bit, run them
**Docker** - a thing that makes hosting super easy, people prepared *recipes*,
you copy paste them, edit a bit, run them.
* **install docker-compose and ctop** - `sudo pacman -S docker-compose ctop`
* **enable docker service** - `sudo systemctl enable --now docker`
* **install docker** - `sudo curl -fsSL https://get.docker.com | bash`<br>
* add your user to docker group so you dont need to sudo all the time<br>
`sudo gpasswd -a noob docker`
* log out, log back in
* done
* log out - `exit`, log back in
* 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>
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>
Nano text editor is relatively simple and everywhere so that will be used.
with that left directory pane that lets you move around,
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
* create directory `mkdir docker`
* go in to it `cd docker`
* create directory `mkdir nginx`
* go in to it `cd nginx`
*extra info:* `arrow-up key` in terminal will cycle through old comamnds in history
* Be in your home directory, the command `cd` will always get you there.
* Create directory `mkdir docker`
* 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
* create empty docker-compose.yml file `nano docker-compose.yml`
* paste in to it this *recipe*, spacing matters
* Create empty docker-compose.yml file `nano docker-compose.yml`
* Paste in to it this *recipe*, spacing matters
```
services:
@ -103,17 +112,56 @@ Nano text editor is relatively simple and everywhere so that will be used.
ports:
- "80:80"
```
* save using `ctrl+s`; exit `ctrl+x`
* run command `sudo docker compose up -d`<br>
will say the container started
* you can now run command `ctop`<br> a small [utility](https://github.com/bcicen/ctop)
for managing containers<br>
see their status, see their resource use, see their logs (arrow left),
see detailed info(arrow right)
* Save using `ctrl+s`; exit `ctrl+x`
* Run command `sudo docker compose up -d`<br>
[This is what it should look like](https://imgur.com/a/vtHYNr9)
* You can run `ctop` to see container status, resource use, logs,
details, or to exec in to the container. [Like so.](https://imgur.com/a/ChGjk7i)
* on your windows machine go to your browser<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
@ -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),
or google drive/calendar/photos(nextcloud), or own password manager(vaultwarden)
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

View File

@ -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)
is recommended if planning to run multiple cameras with detection.<br>
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
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.
@ -228,25 +232,59 @@ cameras:
### 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:
enabled: false
enabled: true
host: 10.0.19.40
port: 1883
user: frigate
password: ${FRIGATE_RTSP_PASSWORD}
detectors:
default_detector_for_all:
type: cpu
ov:
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:
track:
- person
- cat
- dog
filters:
person:
min_area: 1000
threshold: 0.70
cat:
min_area: 200
threshold: 0.5
ffmpeg:
hwaccel_args: preset-vaapi
detect:
max_disappeared: 2500
cameras:
K1-Brana:
birdseye:
order: 1
ffmpeg:
inputs:
- path: rtsp://{FRIGATE_RTSP_USER}:{FRIGATE_RTSP_PASSWORD}@10.0.19.41:554/stream1
@ -268,15 +306,43 @@ cameras:
days: 1
motion:
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:
birdseye:
order: 2
ffmpeg:
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:
- 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:
- detect
detect:
@ -289,14 +355,22 @@ cameras:
record:
enabled: True
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
birdseye:
enabled: True
mode: continuous
ui:
time_format: 24hour
```
</details>
# First run