Author Archives: admin

Install Docker on a Raspberry Pi 4

Add your new user to the sudo group

sudo usermod -aG sudo g1

Update the apt package index & Upgrade all current program package

sudo apt-get update
sudo apt-get upgrate

Install packages to allow apt to use a repository over HTTPS:

sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common

Add Docker’s official GPG key:

curl -fsSL | sudo apt-key add -

look up the name of your linux distribution

lsb_release -cs

Setup the Docker Repo.

sudo su
echo "deb [arch=armhf] buster stable" > /etc/apt/sources.list.d/docker.list

Update the apt package index.

sudo apt-get update

Install the latest version of Docker Engine – Community and containerd without AUFS

sudo apt-get install --no-install-recommends docker-ce docker-ce-cli

Show Docker Version

sudo docker version

Verify that Docker Engine – Community is installed correctly by running the hello-world image.

sudo docker run hello-world

Give the ‘g1’ user the ability to run Docker.

sudo usermod -aG docker g1

How To Install Prometheus on Raspberry PI or Orange PI

Prometheus is a leading open-source monitoring solution with alerting functional. By default, Prometetheus export only itself metrics and need aditioanl module for accept more information. You can finde more information on:

Safety First

We need one new user for prometeus service without home directory and shell access.

sudo useradd --no-create-home --shell /bin/false prometheus 

according linux best practise create two directorise, one for configuration and other for data.

sudo mkdir /etc/prometheus 
sudo mkdir /var/lib/prometheus

and set new user and group ownership

sudo chown prometheus:prometheus /etc/prometheus 
sudo chown prometheus:prometheus /var/lib/prometheus

Download and Unpack prometheus

Before download, find the latest stable verion on Prometeus download page. At this time it’s: prometheus-2.12.0.linux-armv7.tar.gz

download file and compere checksum:

cd ~
sha256sum prometheus-2.12.0.linux-armv7.tar.gz

if checksume match than unpack archive:

tar xvf  prometheus-2.12.0.linux-armv7.tar.gz 

copy files and directories

sudo cp  prometheus-2.12.0.linux-armv7/prometheus /usr/local/bin/ 
sudo cp prometheus-2.12.0.linux-armv7/promtool /usr/local/bin/
sudo cp -r prometheus-2.12.0.linux-armv7/consoles /etc/prometheus
sudo cp -r prometheus-2.12.0.linux-armv7/console_libraries /etc/prometheus

and set the user and group ownership

sudo chown prometheus:prometheus /usr/local/bin/prometheus 
sudo chown prometheus:prometheus /usr/local/bin/promtool
sudo chown -R prometheus:prometheus /etc/prometheus/consoles
sudo chown -R prometheus:prometheus /etc/prometheus/console_libraries

finally, delete files and directory from your home

rm -rf prometheus-2.12.0.linux-armv7.tar.gz prometheus-2.12.0.linux-armv7

Configuring prometeus to monitor itself

Create configuration in a file with named prometheus.yml:

sudo nano /etc/prometheus/prometheus.yml 

Prometheus config file /etc/prometheus/prometheus.yml

Important: Prometheus configuration file uses the YAML format, don’t user tabs!

  scrape_interval: 15s

  - job_name: 'prometheus'
    scrape_interval: 5s
      - targets: ['localhost:9090']

set the user and group ownership

sudo chown prometheus:prometheus /etc/prometheus/prometheus.yml

Let’s running Prometheus

create a new systemd service file.

sudo nano /etc/systemd/system/prometheus.service 

add following data into the file: /etc/systemd/system/prometheus.service


ExecStart=/usr/local/bin/prometheus \
    --config.file /etc/prometheus/prometheus.yml \
    --storage.tsdb.path /var/lib/prometheus/ \
    --web.console.templates=/etc/prometheus/consoles \


then reload systemd,

sudo systemctl daemon-reload 

start service,

sudo systemctl start prometheus 

check status,

sudo systemctl status prometheus 

and after successful running enable the service to start on boot

sudo systemctl enable prometheus

find out your IP address


open link in browser

ESP8266: ThingBoard платформа для сбора и обработки данных




Цифровой датчик света и ультрафиолета на Si1145

UV Sensor


OpenWeatherMap пример работы




Thingspeak пример работы




web server css



Web Weather Station



ESP8266 Web Server