+
This commit is contained in:
84
Dahy_install.md
Normal file
84
Dahy_install.md
Normal file
@ -0,0 +1,84 @@
|
||||
Подключаюсь к нужной машине
|
||||
|
||||
## 2. Подключаемся
|
||||
```sh
|
||||
ssh igor@192.168.200.84 -p 22
|
||||
```
|
||||
|
||||
## 3. Создаём директории
|
||||
```sh
|
||||
sudo mkdir -p /opt/dashy &&
|
||||
sudo mkdir -p /opt/dashy/data &&
|
||||
sudo chmod -R 777 /opt/dashy &&
|
||||
sudo chown -R $USER:$USER /opt/dashy &&
|
||||
```
|
||||
|
||||
Создаём файл конфигурации
|
||||
```sh
|
||||
cd /opt/dashy/data &&
|
||||
cat > conf.yml <<EOF
|
||||
pageInfo:
|
||||
title: Home Lab
|
||||
sections: # An array of sections
|
||||
- name: Example Section
|
||||
icon: far fa-rocket
|
||||
items:
|
||||
- title: GitHub
|
||||
description: Dashy source code and docs
|
||||
icon: fab fa-github
|
||||
url: https://github.com/Lissy93/dashy
|
||||
- title: Issues
|
||||
description: View open issues, or raise a new one
|
||||
icon: fas fa-bug
|
||||
url: https://github.com/Lissy93/dashy/issues
|
||||
- name: Local Services
|
||||
items:
|
||||
- title: Grafana
|
||||
icon: https://static-00.iconduck.com/assets.00/grafana-icon-942x1024-18c9p0yp.png
|
||||
url: http://192.168.200.84:3000
|
||||
- title: Uptime-kuma
|
||||
icon: https://raw.githubusercontent.com/louislam/uptime-kuma/b45dc6787db6530e8dda1388a37e8a80683da5a8/public/icon.svg
|
||||
url: http://192.168.200.84:3001
|
||||
EOF
|
||||
```
|
||||
|
||||
```sh
|
||||
sudo chmod 666 /opt/dashy/data/conf.yml
|
||||
```
|
||||
|
||||
## 3. Создаём файл и записываем настройки:
|
||||
|
||||
```sh
|
||||
cd /opt/dashy &&
|
||||
cat > docker-compose.yml <<EOF
|
||||
services:
|
||||
dashy:
|
||||
image: lissy93/dashy:latest
|
||||
container_name: my-dashboard
|
||||
ports:
|
||||
- "3002:8080"
|
||||
volumes:
|
||||
- /opt/dashy/data/conf.yml:/app/user-data/conf.yml
|
||||
restart: always
|
||||
EOF
|
||||
```
|
||||
|
||||
|
||||
## 4. Запуск контейнера
|
||||
```sh
|
||||
cd /opt/dashy &&
|
||||
sudo docker-compose up -d
|
||||
```
|
||||
```sh
|
||||
cd /opt/dashy &&
|
||||
sudo docker-compose down
|
||||
```
|
||||
|
||||
|
||||
|
||||
```sh
|
||||
exit
|
||||
```
|
||||
```sh
|
||||
start http://192.168.200.84:3002
|
||||
```
|
||||
138
Gotify_install.md
Normal file
138
Gotify_install.md
Normal file
@ -0,0 +1,138 @@
|
||||
# 📌 Установка Gotify в Docker на Ubuntu 24.04
|
||||
|
||||
## 1. Установка Docker и Docker Compose
|
||||
Если Docker не установлен, установим его:
|
||||
```sh
|
||||
sudo apt update && sudo apt upgrade -y
|
||||
sudo apt install -y docker.io docker-compose
|
||||
sudo systemctl enable --now docker
|
||||
```
|
||||
Проверим версию:
|
||||
```sh
|
||||
docker --version
|
||||
docker-compose --version
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 2. Создание директории для Gotify
|
||||
Лучшее место для сторонних сервисов — `/opt`:
|
||||
```sh
|
||||
sudo mkdir -p /opt/gotify
|
||||
cd /opt/gotify
|
||||
```
|
||||
|
||||
## 3. Создаём самоподписанный сертификат
|
||||
```sh
|
||||
sudo mkdir -p /opt/gotify/certs && cd /opt/gotify/certs
|
||||
openssl req -x509 -newkey rsa:4096 -keyout gotify.key -out gotify.crt -days 365 -nodes -subj "/CN=your.domain.com"
|
||||
```
|
||||
---
|
||||
|
||||
## 3. Создание `docker-compose.yml`
|
||||
Создадим конфигурацию:
|
||||
```sh
|
||||
sudo mcedit /opt/gotify/docker-compose.yml
|
||||
```
|
||||
Добавляем:
|
||||
```yaml
|
||||
services:
|
||||
gotify:
|
||||
image: gotify/server
|
||||
container_name: gotify
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- "./certs:/certs"
|
||||
- "./data:/app/data"
|
||||
ports:
|
||||
- "8080:443" # HTTPS
|
||||
environment:
|
||||
- GOTIFY_DEFAULTUSER_NAME=admin
|
||||
- GOTIFY_DEFAULTUSER_PASS=s23uBXreliGIAVOohXhW
|
||||
- TZ=Asia/Almaty
|
||||
- GOTIFY_SERVER_SSL_ENABLED=true
|
||||
- GOTIFY_SERVER_SSL_CERTFILE=/certs/gotify.crt
|
||||
- GOTIFY_SERVER_SSL_CERTKEY=/certs/gotify.key
|
||||
networks:
|
||||
- gotify-net
|
||||
|
||||
networks:
|
||||
gotify-net:
|
||||
driver: bridge
|
||||
```
|
||||
💡 **Что здесь важно?**
|
||||
- **`security_opt: - no-new-privileges:true`** → запрещает повышать привилегии в контейнере.
|
||||
- **`volumes: ./data:/app/data`** → сохраняет данные вне контейнера.
|
||||
- **`restart: unless-stopped`** → перезапускает Gotify, если он внезапно упадёт.
|
||||
- **`ports: - "8080:80"`** → Gotify будет доступен на порту `8080`.
|
||||
|
||||
🔑 **Замените пароль** (`supersecretpassword`) на свой!
|
||||
|
||||
---
|
||||
|
||||
## 4. Запуск Gotify
|
||||
Запускаем контейнер:
|
||||
```sh
|
||||
cd /opt/gotify
|
||||
sudo docker compose down
|
||||
sudo docker-compose up -d
|
||||
```
|
||||
Проверяем статус:
|
||||
```sh
|
||||
sudo docker ps
|
||||
```
|
||||
Вы должны увидеть работающий контейнер `gotify`.
|
||||
|
||||
---
|
||||
|
||||
## 5. Проверка работы
|
||||
Открываем браузер и переходим:
|
||||
👉 **https://192.168.200.84:8080**
|
||||
👉 **https://gotify.locust.kz:8443**
|
||||
|
||||
Логинимся:
|
||||
- **Имя**: `admin`
|
||||
- **Пароль**: тот, что указан в `GOTIFY_DEFAULTUSER_PASS`
|
||||
|
||||
---
|
||||
|
||||
## 6. Автоматический запуск при загрузке
|
||||
Docker уже настроен на автозапуск, но проверим:
|
||||
```sh
|
||||
sudo systemctl enable --now docker
|
||||
```
|
||||
Чтобы Gotify запускался автоматически:
|
||||
```sh
|
||||
cd /opt/gotify
|
||||
sudo docker-compose restart
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 7. Логи и управление
|
||||
Просмотр логов:
|
||||
```sh
|
||||
sudo docker-compose logs -f
|
||||
```
|
||||
Перезапуск контейнера:
|
||||
```sh
|
||||
sudo docker-compose restart
|
||||
```
|
||||
Остановка:
|
||||
```sh
|
||||
sudo docker-compose down
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 8. Удаление Gotify (если потребуется)
|
||||
```sh
|
||||
cd /opt/gotify
|
||||
sudo docker-compose down
|
||||
sudo rm -rf /opt/gotify
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## ✅ Готово!
|
||||
Теперь Gotify работает на порту `80` с безопасными настройками (`no-new-privileges:true`). 🚀
|
||||
218
HAProxy_install.md
Normal file
218
HAProxy_install.md
Normal file
@ -0,0 +1,218 @@
|
||||
# 📌 Установка HAProxy на Ubuntu 20.04
|
||||
****************************************************************************************************
|
||||
На основе инструкции из https://itsecforu.ru/2019/07/15/⏳-настройка-балансировщика-нагрузки-h/
|
||||
```sh
|
||||
sudo apt-get update && sudo apt-get install haproxy -y
|
||||
````
|
||||
Создаём резервную копию файла:
|
||||
```sh
|
||||
sudo cp /etc/haproxy/haproxy.cfg{,.bak}
|
||||
````
|
||||
Редактируем конфигурацию (Описание конфигурационного файла HAProxy https://habr.com/ru/sandbox/34354/)
|
||||
```sh
|
||||
mcedit /etc/haproxy/haproxy.cfg
|
||||
````
|
||||
В конец файла добавляем пока только для перенаправления (для балансироки больше IP адресов):
|
||||
```
|
||||
frontend frontend-http
|
||||
bind *:80
|
||||
mode http
|
||||
|
||||
# ACL для определения запросов на проверку Let's Encrypt
|
||||
acl is_certbot path_beg /.well-known/acme-challenge/
|
||||
|
||||
# Если это не запрос Let's Encrypt, перенаправляем на HTTPS
|
||||
http-request redirect scheme https code 301 unless is_certbot
|
||||
|
||||
# Отправляем запросы Let's Encrypt на backend-certbot
|
||||
use_backend backend-certbot if is_certbot
|
||||
|
||||
frontend LOADBALANCER-01
|
||||
bind *:80
|
||||
bind *:443 ssl crt /etc/haproxy/ssl/mqtt.kz.pem crt /etc/ssl/certs/bigfoottrade_kz.pem
|
||||
mode http #режим работы HAProxy, в http режиме происходит анализ Layer 7 трафика
|
||||
option httpclose #Закрывает пассивные соединения
|
||||
|
||||
http-request set-header x-Forwarded-for %[src]
|
||||
http-request set-header x-Forwarded-uri %[url]
|
||||
|
||||
acl v_geoserver2 hdr(host) -i geoserver2.ccalm.org
|
||||
use_backend geoserver2_ccalm_org if v_geoserver2
|
||||
|
||||
#Если различные нестандартные порты то так
|
||||
acl v_locust_kz hdr_reg(host) -i ^locust\.kz(:.*)?$
|
||||
use_backend b_locust_kz if v_locust_kz
|
||||
|
||||
#Перенаправление одной страницы по адресу http://geoserver2.ccalm.org/data/ на другой backend
|
||||
acl v_geo_data hdr(host) -i geoserver2.ccalm.org/data
|
||||
use_backend WEBSERVERS-01 if v_geo_data
|
||||
|
||||
|
||||
default_backend WEBSERVERS-01
|
||||
|
||||
backend WEBSERVERS-01
|
||||
balance roundrobin
|
||||
server web10 127.0.0.1:8081 check inter 5s ssl verify none
|
||||
option httpchk
|
||||
|
||||
backend geoserver2_ccalm_org
|
||||
balance roundrobin
|
||||
server web1 192.168.0.90:80 check
|
||||
option httpchk
|
||||
|
||||
listen stats
|
||||
bind *:8989
|
||||
stats enable
|
||||
stats uri /
|
||||
stats realm Haproxy\ Statistics
|
||||
stats auth igor:i123456
|
||||
|
||||
frontend f-RabbitMQ
|
||||
mode tcp
|
||||
bind 10.1.7.73:21000
|
||||
default_backend b-RabbitMQ
|
||||
|
||||
backend b-RabbitMQ
|
||||
mode tcp
|
||||
server srv1 10.10.16.21:20000
|
||||
```
|
||||
Для перенаправления незащищённого HTTP трафика можно: xxxxxxxxxxxxxxx
|
||||
|
||||
Для использования SSL и перенаправляние по обычному сокету для начала нужно настроить pem файл объеденив crt и key (и незабыть изменить порт Apache с 433)
|
||||
cat /etc/ssl/certs/bigfoottrade_kz.crt /etc/ssl/certs/bigfoottrade_kz_ca.crt /etc/ssl/private/bigfoottrade_kz.key > /etc/haproxy/ssl/bigfoottrade_kz.pem
|
||||
cat AAA_Certificate_Services.crt GoGetSSL_RSA_DV_CA.crt istransit_kz.crt istransit_kz.key > istransit_kz.pem
|
||||
|
||||
SSLCertificateFile
|
||||
SSLCertificateKeyFile
|
||||
|
||||
Для включения WEB статистики на 9000 порту добавить в конец конфигурации:
|
||||
listen stats
|
||||
bind *:8989
|
||||
stats enable
|
||||
stats uri /stats
|
||||
stats realm Haproxy\ Statistics
|
||||
stats auth igor:i123456
|
||||
Тестирую файл конфигурации:
|
||||
```sh
|
||||
haproxy -f /etc/haproxy/haproxy.cfg -c
|
||||
````
|
||||
Также можно в журнале посмотреть что написал HAProxy:
|
||||
```sh
|
||||
sudo journalctl -u haproxy --no-pager | tail -n 50
|
||||
````
|
||||
Перезагружаем:
|
||||
sudo systemctl restart haproxy
|
||||
И теперь должно открываться но адресу: http://data.ccalm.org:8989/
|
||||
Обязательно проверить как установился SSL чекером: https://www.leaderssl.ru/tools/ssl_checker
|
||||
|
||||
|
||||
# 📌 Бесплатный SSL сертификат Let’s Encrypt для HAPROXY
|
||||
****************************************************************************************************
|
||||
Бесплатный SSL сертификат Let’s Encrypt для HAPROXY https://serversforhackers.com/c/letsencrypt-with-haproxy
|
||||
```sh
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y certbot
|
||||
````
|
||||
Для удаления PPA нужно выполнить:
|
||||
```sh
|
||||
sudo apt-get remove certbot
|
||||
sudo add-apt-repository --remove ppa:certbot/certbot
|
||||
apt-get install -f
|
||||
apt autoremove
|
||||
```
|
||||
Если включён файрволл то разрешаем порт:
|
||||
```sh
|
||||
sudo ufw allow 9080/tcp
|
||||
```
|
||||
Проверяем что автообновление в certbot работает для этого выполняем команду:
|
||||
```sh
|
||||
sudo systemctl status certbot.timer
|
||||
```
|
||||
Затем пытаемся выполнить пробный прогон при помощи команды:
|
||||
```sh
|
||||
sudo certbot renew --dry-run
|
||||
```
|
||||
|
||||
Согласно инструкции модифицируем конфигурационный файл haproxy добавив во frontend это:
|
||||
```
|
||||
# ACL for detecting Let's Encrypt validtion requests
|
||||
acl is_certbot path_beg /.well-known/acme-challenge/
|
||||
use_backend backend-certbot if is_certbot
|
||||
```
|
||||
А также ещё один backend:
|
||||
```
|
||||
# Certbot backend
|
||||
# Contains certbot stand-alone webserver
|
||||
backend backend-certbot
|
||||
mode http
|
||||
server certbot 127.0.0.1:9080
|
||||
```
|
||||
Перезагрузить и выполнить команду:
|
||||
|
||||
```sh
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d locust.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d gotify.locust.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d git.ccalm.org --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d ru.ccalm.org --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d rug.ccalm.org --email irigm@mail.ru --agree-tos --non-interactive
|
||||
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d kz.ccalm.org --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d kzg.ccalm.org --email irigm@mail.ru --agree-tos --non-interactive
|
||||
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d locust.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d test.ccalm.org --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d data.ccalm.org --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d geoserver2.ccalm.org --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d geoserver.ccalm.org --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d stations.istt.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d uspdmanager.istt.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d tourist.istt.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d monitoring.infracos.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d aistransit.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d istransit.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d test.istransit.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d main.istransit.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d transit.istt.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d geovizor.com --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d mqtt.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d observer.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d rigor.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d pal.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d elektronnaya-ochered.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d mcp.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
```
|
||||
|
||||
После генерации файлы будут в:
|
||||
/etc/letsencrypt/live/geoserver2.ccalm.org/fullchain.pem
|
||||
/etc/letsencrypt/live/geoserver2.ccalm.org/privkey.pem
|
||||
|
||||
Для обновления создаём файл /etc/letsencrypt/renew.sh (по моему этот скрипт не нужен так как рабтает сервис certbot.timer):
|
||||
#!/bin/bash
|
||||
certbot renew --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 --post-hook "/etc/haproxy/prepare.sh" --quiet
|
||||
|
||||
Но для HAProxy нужно чтобы 2 файла были объединены поэтому добавляю спец скрипт /etc/haproxy/prepare.sh:
|
||||
#!/bin/bash
|
||||
|
||||
# Loop through all Let's Encrypt certificates
|
||||
for CERTIFICATE in `find /etc/letsencrypt/live/* -type d`; do
|
||||
|
||||
CERTIFICATE=`basename $CERTIFICATE`
|
||||
|
||||
# Combine certificate and private key to single file
|
||||
cat /etc/letsencrypt/live/$CERTIFICATE/fullchain.pem /etc/letsencrypt/live/$CERTIFICATE/privkey.pem > /etc/haproxy/ssl/$CERTIFICATE.pem
|
||||
|
||||
done
|
||||
systemctl reload haproxy.service
|
||||
|
||||
Обновляем конфигурацию HAProxy добавив в frontend:
|
||||
bind *:443 ssl crt /etc/haproxy/ssl/mqtt.kz.pem
|
||||
|
||||
Устанавливаем права
|
||||
chmod +x /etc/haproxy/renew.sh
|
||||
chmod +x /etc/haproxy/prepare.sh
|
||||
И добавляем задание в cron "crontab -e" ниже текст это раз в 24 часа в 00:00:00 ночи:
|
||||
0 0 * * * /bin/sh /etc/letsencrypt/renew.sh
|
||||
73
HTTPTunnel.md
Normal file
73
HTTPTunnel.md
Normal file
@ -0,0 +1,73 @@
|
||||
# 📌 Туннелирование SSH через HTTP
|
||||
****************************************************************************************************
|
||||
Исходники тут: https://github.com/larsbrinkhoff/httptunnel:
|
||||
```sh
|
||||
sudo apt-get install httptunnel
|
||||
````
|
||||
Настроил HAProxy примерно так, чтобы проверялся параметр "mybiglogfile" для редиректа:
|
||||
```
|
||||
frontend frontend-http
|
||||
bind *:80
|
||||
mode http
|
||||
|
||||
acl v_tunnel url_param(mybiglogfile) -m found
|
||||
use_backend httptunnel_backend if v_tunnel
|
||||
|
||||
http-request redirect scheme https code 301 unless { ssl_fc } || v_tunnel
|
||||
```
|
||||
|
||||
Проверить нет ли редирект можно так:
|
||||
curl -I http://192.168.200.81/index.html?mybiglogfile=all
|
||||
curl -I http://locust.kz/index.html?mybiglogfile=all
|
||||
|
||||
На сервере запустил прослушку на 9999 и перенаправление на 22:
|
||||
```sh
|
||||
sudo hts -F 127.0.0.1:22 9999
|
||||
````
|
||||
Для остановки
|
||||
```sh
|
||||
ps aux | grep hts
|
||||
sudo kill 1854
|
||||
```
|
||||
Можно запустить как сервис так sudo mcedit /etc/systemd/system/httptunnel.service:
|
||||
```
|
||||
[Unit]
|
||||
Description=HTTP Tunnel Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=hts -F 127.0.0.1:22 9999
|
||||
Restart=always
|
||||
User=root
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
Потом:
|
||||
```sh
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable httptunnel
|
||||
sudo systemctl stop httptunnel
|
||||
sudo systemctl start httptunnel
|
||||
sudo systemctl status httptunnel
|
||||
tail -f /var/log/syslog | grep --line-buffered "htc"
|
||||
```
|
||||
|
||||
На клиенте запускаем локальный порт также указал 9999 а ключь
|
||||
```sh
|
||||
htc -F 9999 --base-uri /index.html?mybiglogfile=all 192.168.200.81:80
|
||||
htc -F 9999 --base-uri /index.html?mybiglogfile=all locust.kz:80
|
||||
```
|
||||
|
||||
Для остановки
|
||||
```sh
|
||||
ps aux | grep htc
|
||||
Потом
|
||||
sudo kill 783
|
||||
```
|
||||
|
||||
Пробую подключиться после настройки тунеля:
|
||||
```sh
|
||||
ssh igor@127.0.0.1 -p 9999
|
||||
```
|
||||
71
Portainer_io_install.md
Normal file
71
Portainer_io_install.md
Normal file
@ -0,0 +1,71 @@
|
||||
# Установка Portainer.io в Docker на Ubuntu 24.04
|
||||
|
||||
Пробую установить в ProxMox в контейнер созданный на основе Ubuntu, незабыть убрать галочку: Unprivileged container
|
||||
|
||||
Подключаюсь к нужной машине
|
||||
```sh
|
||||
ssh igor@192.168.200.84 -p 22
|
||||
```
|
||||
|
||||
## Шаг 1: Обновление системы и установка Docker
|
||||
Перед установкой Portainer убедитесь, что Docker установлен и запущен.
|
||||
|
||||
```bash
|
||||
sudo apt update && sudo apt upgrade -y
|
||||
sudo apt-get install python3-venv python3-pip
|
||||
sudo apt install docker.io -y
|
||||
sudo systemctl enable --now docker
|
||||
sudo systemctl start docker
|
||||
sudo systemctl status docker
|
||||
sudo apt install -y docker-compose
|
||||
docker-compose --version
|
||||
```
|
||||
|
||||
Добавляем текущего пользователя в группу докера
|
||||
```sh
|
||||
sudo usermod -aG docker $USER
|
||||
````
|
||||
|
||||
## Шаг 2: Создание директории для Portainer
|
||||
Создадим папку для хранения данных Portainer в `/opt`:
|
||||
|
||||
```bash
|
||||
sudo mkdir -p /opt/portainer/data
|
||||
sudo chmod -R 777 /opt/portainer
|
||||
```
|
||||
|
||||
## Шаг 3: Создание docker-compose.yml
|
||||
|
||||
```sh
|
||||
cd /opt/portainer
|
||||
sudo mcedit docker-compose.yml
|
||||
```
|
||||
|
||||
```yaml
|
||||
services:
|
||||
portainer:
|
||||
image: portainer/portainer-ce:latest
|
||||
container_name: portainer
|
||||
restart: always
|
||||
ports:
|
||||
- "8000:8000"
|
||||
- "9443:9443"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./data:/data
|
||||
```
|
||||
|
||||
## Шаг 4: Запуск контейнера Portainer
|
||||
|
||||
```sh
|
||||
sudo docker-compose up -d
|
||||
```
|
||||
|
||||
```sh
|
||||
start https://192.168.200.84:9443
|
||||
```
|
||||
|
||||
## Шаг 5: Начальная настройка
|
||||
1. Создайте учетную запись администратора.
|
||||
2. Подключите локальный Docker-движок.
|
||||
3. Начните управлять контейнерами через Portainer!
|
||||
257
Ubuntu.md
257
Ubuntu.md
@ -2350,190 +2350,6 @@ print
|
||||
?
|
||||
1.
|
||||
sudo update-rc.d autostart.script remove
|
||||
****************************************************************************************************
|
||||
Установка HAProxy на Ubuntu 20.04 по https://itsecforu.ru/2019/07/15/⏳-настройка-балансировщика-нагрузки-h/
|
||||
sudo apt-get update && sudo apt-get install haproxy -y
|
||||
Создаём резервную копию файла:
|
||||
sudo cp /etc/haproxy/haproxy.cfg{,.bak}
|
||||
Редактируем конфигурацию (Описание конфигурационного файла HAProxy https://habr.com/ru/sandbox/34354/)
|
||||
mcedit /etc/haproxy/haproxy.cfg
|
||||
В конец файла добавляем пока только для перенаправления (для балансироки больше IP адресов):
|
||||
|
||||
frontend frontend-http
|
||||
bind *:80
|
||||
mode http
|
||||
|
||||
# ACL для определения запросов на проверку Let's Encrypt
|
||||
acl is_certbot path_beg /.well-known/acme-challenge/
|
||||
|
||||
# Если это не запрос Let's Encrypt, перенаправляем на HTTPS
|
||||
http-request redirect scheme https code 301 unless is_certbot
|
||||
|
||||
# Отправляем запросы Let's Encrypt на backend-certbot
|
||||
use_backend backend-certbot if is_certbot
|
||||
|
||||
|
||||
frontend LOADBALANCER-01
|
||||
bind *:80
|
||||
bind *:443 ssl crt /etc/haproxy/ssl/mqtt.kz.pem crt /etc/ssl/certs/bigfoottrade_kz.pem
|
||||
mode http #режим работы HAProxy, в http режиме происходит анализ Layer 7 трафика
|
||||
option httpclose #Закрывает пассивные соединения
|
||||
|
||||
acl v_geoserver2 hdr(host) -i geoserver2.ccalm.org
|
||||
use_backend geoserver2_ccalm_org if v_geoserver2
|
||||
|
||||
#Перенаправление одной страницы по адресу http://geoserver2.ccalm.org/data/ на другой backend
|
||||
acl v_geo_data hdr(host) -i geoserver2.ccalm.org/data
|
||||
use_backend WEBSERVERS-01 if v_geo_data
|
||||
|
||||
|
||||
default_backend WEBSERVERS-01
|
||||
|
||||
backend WEBSERVERS-01
|
||||
balance roundrobin
|
||||
server web10 127.0.0.1:8081 check inter 5s ssl verify none
|
||||
option httpchk
|
||||
|
||||
backend geoserver2_ccalm_org
|
||||
balance roundrobin
|
||||
server web1 192.168.0.90:80 check
|
||||
option httpchk
|
||||
|
||||
listen stats
|
||||
bind *:8989
|
||||
stats enable
|
||||
stats uri /
|
||||
stats realm Haproxy\ Statistics
|
||||
stats auth igor:i123456
|
||||
|
||||
frontend f-RabbitMQ
|
||||
mode tcp
|
||||
bind 10.1.7.73:21000
|
||||
default_backend b-RabbitMQ
|
||||
|
||||
backend b-RabbitMQ
|
||||
mode tcp
|
||||
server srv1 10.10.16.21:20000
|
||||
|
||||
Для перенаправления незащищённого HTTP трафика можно: xxxxxxxxxxxxxxx
|
||||
|
||||
Для использования SSL и перенаправляние по обычному сокету для начала нужно настроить pem файл объеденив crt и key (и незабыть изменить порт Apache с 433)
|
||||
cat /etc/ssl/certs/bigfoottrade_kz.crt /etc/ssl/certs/bigfoottrade_kz_ca.crt /etc/ssl/private/bigfoottrade_kz.key > /etc/haproxy/ssl/bigfoottrade_kz.pem
|
||||
cat AAA_Certificate_Services.crt GoGetSSL_RSA_DV_CA.crt istransit_kz.crt istransit_kz.key > istransit_kz.pem
|
||||
|
||||
SSLCertificateFile
|
||||
SSLCertificateKeyFile
|
||||
|
||||
Для включения WEB статистики на 9000 порту добавить в конец конфигурации:
|
||||
listen stats
|
||||
bind *:8989
|
||||
stats enable
|
||||
stats uri /stats
|
||||
stats realm Haproxy\ Statistics
|
||||
stats auth igor:i123456
|
||||
Тестирую файл конфигурации:
|
||||
haproxy -f /etc/haproxy/haproxy.cfg -c
|
||||
Перезагружаем:
|
||||
sudo systemctl restart haproxy
|
||||
И теперь должно открываться но адресу: http://data.ccalm.org:8989/
|
||||
Обязательно проверить как установился SSL чекером: https://www.leaderssl.ru/tools/ssl_checker
|
||||
|
||||
****************************************************************************************************
|
||||
Бесплатный SSL сертификат Let’s Encrypt для HAPROXY https://serversforhackers.com/c/letsencrypt-with-haproxy
|
||||
На новой убунте по моему уже не обязательно выполнять так как новая версия уже есть в репозитории: sudo add-apt-repository -y ppa:certbot/certbot
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y certbot
|
||||
|
||||
Для удаления PPA нужно выполнить:
|
||||
sudo apt-get remove certbot
|
||||
sudo add-apt-repository --remove ppa:certbot/certbot
|
||||
apt-get install -f
|
||||
apt autoremove
|
||||
|
||||
Если включён файрволл то разрешаем порт:
|
||||
sudo ufw allow 9080/tcp
|
||||
Проверяем что автообновление в certbot работает для этого выполняем команду:
|
||||
sudo systemctl status certbot.timer
|
||||
Затем пытаемся выполнить пробный прогон при помощи команды:
|
||||
sudo certbot renew --dry-run
|
||||
|
||||
Согласно инструкции модифицируем конфигурационный файл haproxy добавив во frontend это:
|
||||
# ACL for detecting Let's Encrypt validtion requests
|
||||
acl is_certbot path_beg /.well-known/acme-challenge/
|
||||
use_backend backend-certbot if is_certbot
|
||||
|
||||
А также ещё один backend:
|
||||
# Certbot backend
|
||||
# Contains certbot stand-alone webserver
|
||||
backend backend-certbot
|
||||
mode http
|
||||
server certbot 127.0.0.1:9080
|
||||
|
||||
Перезагрузить и выполнить команду:
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d git.ccalm.org --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d ru.ccalm.org --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d rug.ccalm.org --email irigm@mail.ru --agree-tos --non-interactive
|
||||
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d kz.ccalm.org --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d kzg.ccalm.org --email irigm@mail.ru --agree-tos --non-interactive
|
||||
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d locust.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d test.ccalm.org --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d data.ccalm.org --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d geoserver2.ccalm.org --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d geoserver.ccalm.org --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d stations.istt.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d uspdmanager.istt.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d tourist.istt.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d monitoring.infracos.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d aistransit.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d istransit.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d test.istransit.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d main.istransit.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d transit.istt.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d geovizor.com --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d mqtt.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d observer.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d rigor.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d pal.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d elektronnaya-ochered.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
certbot certonly --rsa-key-size 2048 --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 -d mcp.kz --email irigm@mail.ru --agree-tos --non-interactive
|
||||
|
||||
После генерации файлы будут в:
|
||||
/etc/letsencrypt/live/geoserver2.ccalm.org/fullchain.pem
|
||||
/etc/letsencrypt/live/geoserver2.ccalm.org/privkey.pem
|
||||
|
||||
Для обновления создаём файл /etc/letsencrypt/renew.sh (по моему этот скрипт не нужен так как рабтает сервис certbot.timer):
|
||||
#!/bin/bash
|
||||
certbot renew --standalone --preferred-challenges http --http-01-address 127.0.0.1 --http-01-port 9080 --post-hook "/etc/haproxy/prepare.sh" --quiet
|
||||
|
||||
Но для HAProxy нужно чтобы 2 файла были объединены поэтому добавляю спец скрипт /etc/haproxy/prepare.sh:
|
||||
#!/bin/bash
|
||||
|
||||
# Loop through all Let's Encrypt certificates
|
||||
for CERTIFICATE in `find /etc/letsencrypt/live/* -type d`; do
|
||||
|
||||
CERTIFICATE=`basename $CERTIFICATE`
|
||||
|
||||
# Combine certificate and private key to single file
|
||||
cat /etc/letsencrypt/live/$CERTIFICATE/fullchain.pem /etc/letsencrypt/live/$CERTIFICATE/privkey.pem > /etc/haproxy/ssl/$CERTIFICATE.pem
|
||||
|
||||
done
|
||||
systemctl reload haproxy.service
|
||||
|
||||
Обновляем конфигурацию HAProxy добавив в frontend:
|
||||
bind *:443 ssl crt /etc/haproxy/ssl/mqtt.kz.pem
|
||||
|
||||
Устанавливаем права
|
||||
chmod +x /etc/haproxy/renew.sh
|
||||
chmod +x /etc/haproxy/prepare.sh
|
||||
И добавляем задание в cron "crontab -e" ниже текст это раз в 24 часа в 00:00:00 ночи:
|
||||
0 0 * * * /bin/sh /etc/letsencrypt/renew.sh
|
||||
|
||||
****************************************************************************************************
|
||||
Подключение стронних SSL сертификатов, допустим с gogetssl.com
|
||||
После покупки сертификата в .pem файл нужно переписать такие ключи и сертификаты как:
|
||||
@ -4412,76 +4228,3 @@ server:
|
||||
sudo systemctl restart smbd
|
||||
sudo systemctl enable smbd
|
||||
|
||||
****************************************************************************************************
|
||||
Туннелирование SSH через HTTP при помощи https://github.com/larsbrinkhoff/httptunnel:
|
||||
sudo apt-get install httptunnel
|
||||
|
||||
Настроил haproxy примерно так, чтобы проверялся параметр "mybiglogfile" для редиректа:
|
||||
|
||||
frontend frontend-http
|
||||
bind *:80
|
||||
mode http
|
||||
|
||||
acl v_tunnel url_param(mybiglogfile) -m found
|
||||
use_backend httptunnel_backend if v_tunnel
|
||||
|
||||
http-request redirect scheme https code 301 unless { ssl_fc } || v_tunnel
|
||||
|
||||
Если есть проксирование через Nginx то добавляем в конфигурацю это:
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Connection "";
|
||||
proxy_pass_request_body on;
|
||||
|
||||
Проверить нет ли редиректо можно так:
|
||||
curl -I http://192.168.200.81/index.html?mybiglogfile=all
|
||||
curl -I http://locust.kz/index.html?mybiglogfile=all
|
||||
|
||||
На сервере запустил прослушку на 9999 и перенаправление на 22:
|
||||
sudo hts -F 127.0.0.1:22 9999
|
||||
Для остановки
|
||||
ps aux | grep hts
|
||||
sudo kill 1854
|
||||
|
||||
Можно запустить как сервис так sudo mcedit /etc/systemd/system/httptunnel.service:
|
||||
[Unit]
|
||||
Description=HTTP Tunnel Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=hts -F 127.0.0.1:22 9999
|
||||
Restart=always
|
||||
User=root
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
Потом:
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable httptunnel
|
||||
sudo systemctl start httptunnel
|
||||
sudo systemctl status httptunnel
|
||||
tail -f /var/log/syslog | grep --line-buffered "htc"
|
||||
|
||||
На клиенте запускаем локальный порт также указал 9999 а ключь
|
||||
htc -F 9999 --base-uri /index.html?mybiglogfile=all 192.168.200.81:80
|
||||
htc -F 9999 --base-uri /index.html?mybiglogfile=all locust.kz:80
|
||||
|
||||
Для остановки
|
||||
ps aux | grep htc
|
||||
Потом
|
||||
sudo kill 783
|
||||
|
||||
Пробую подключиться после настройки тунеля:
|
||||
ssh igor@127.0.0.1 -p 9999
|
||||
****************************************************************************************************
|
||||
Установка Gotify через докер контейнер
|
||||
sudo apt update && sudo apt install -y docker.io docker-compose
|
||||
sudo mkdir -p /opt/gotify
|
||||
cd /opt/gotify
|
||||
Создадим конфигурацию:
|
||||
sudo nano /opt/gotify/docker-compose.yml
|
||||
|
||||
|
||||
|
||||
66
Uptime_Kuma_install.md
Normal file
66
Uptime_Kuma_install.md
Normal file
@ -0,0 +1,66 @@
|
||||
# Установка Uptime Kuma в Ubuntu 24.04 с помощью Docker Compose
|
||||
|
||||
## 1. Установка необходимых пакетов
|
||||
Обновите систему и установите Docker и Docker Compose:
|
||||
|
||||
```sh
|
||||
sudo apt update && sudo apt upgrade -y
|
||||
sudo apt install -y docker.io docker-compose
|
||||
```
|
||||
|
||||
## 2. Создание директории для Uptime Kuma
|
||||
```sh
|
||||
sudo mkdir -p /opt/uptime-kuma
|
||||
cd /opt/uptime-kuma
|
||||
```
|
||||
|
||||
## 3. Создание `docker-compose.yml`
|
||||
Создайте файл `docker-compose.yml`:
|
||||
|
||||
```sh
|
||||
sudo mcedit /opt/uptime-kuma/docker-compose.yml
|
||||
```
|
||||
|
||||
Вставьте следующий конфигурационный файл:
|
||||
|
||||
```yaml
|
||||
services:
|
||||
uptime-kuma:
|
||||
image: louislam/uptime-kuma:latest
|
||||
container_name: uptime-kuma
|
||||
restart: always
|
||||
ports:
|
||||
- "3001:3001"
|
||||
volumes:
|
||||
- ./data:/app/data
|
||||
```
|
||||
|
||||
## 4. Запуск контейнера
|
||||
```sh
|
||||
sudo docker-compose up -d
|
||||
```
|
||||
|
||||
## 5. Проверка работы Uptime Kuma
|
||||
Откройте браузер и перейдите по адресу:
|
||||
|
||||
```sh
|
||||
start http://192.168.200.84:3001
|
||||
```
|
||||
|
||||
## 6. Управление контейнером
|
||||
- **Остановить Uptime Kuma:**
|
||||
```sh
|
||||
sudo docker-compose down
|
||||
```
|
||||
- **Перезапустить контейнер:**
|
||||
```sh
|
||||
sudo docker-compose restart
|
||||
```
|
||||
- **Просмотреть логи:**
|
||||
|
||||
```sh
|
||||
sudo docker-compose logs -f
|
||||
```
|
||||
|
||||
Готово! Uptime Kuma установлен и запущен в Docker на Ubuntu 24.04. 🚀
|
||||
|
||||
Reference in New Issue
Block a user