[{"content":"Overview If you\u0026rsquo;re used to setting up Nginx, IIS can be quite unintuitive. Starting form GUI management, ending with modules being downloaded manually opposed to package repositories in Linux.\nPrequisites For Reverse proxy you need to install following components from server manager or Microsoft website:\nApplication Request Routing 3.0 (ARR) Module URL Rewrite Module 2 Internet Information Services (IIS) installed from server manager For example purpose, I have windows non-standart application - nodejs, started separately on port 3000 Checking installed modules If you have ARR and URL Rewrite module installed, you will see them both in IIS menu\nConfiguring reverse proxy Create IIS site by right clicking in left menu entry In the site, create URL rewrite Rule Check the domain and you have an app with ssl and 443 port 1 2 3 4 5 6 7 8 9 curl -v https://nodejs.gray.ge * Connected to nodejs.gray.ge (192.168.90.134) port 443 \u0026gt; GET / HTTP/2 \u0026gt; Host: nodejs.gray.ge \u0026gt; Accept: */* \u0026lt; HTTP/2 200 \u0026lt; x-powered-by: ARR/3.0 * Connection #0 to host nodejs.gray.ge left intact Hello World! For single-endpoint reverse proxy, ARR and URL Rewrite module are enough, if we have more than one server, then we should use Server Farms module.\n","date":"2026-03-23T00:00:00Z","image":"/p/windows-iis-reverse-proxy/cover.png","permalink":"/p/windows-iis-reverse-proxy/","title":"Windows (IIS) Reverse Proxy"},{"content":"With proxmox you can create custom Linux templates with packages or files preconfigured by you, and then customize IP, user/password management with cloud-init.\nTo start, we need generic cloud image which is basically a VM disk file with preinstalled system, qemu-guest-agent and cloud-init\n📝 Note Be aware that cloud images are pretty barebones, therefore issues with packages might arise. you can use regular server .ISO for template\nLet\u0026rsquo;s make AlmaLinux 9 template for example. Generic cloud images can be found here - repo.almalinux.org\nTemplate VM Creation Download disk image In proxmox, open datastore, e.g local-lvm or local Open Import Choose Download from URL and paste link of desired .qcow2 file Prepare VM Now we need place where this qcow2 disk image can be mounted to as main disk. Create Virtual machine with following speicfications:\nNo disk and CD attached 2vCPU 2048MiB RAM (less is not recommended) General OS System Disk ID: 800x Do not use any media [x] Enable guest agent Delete default disk Attach disk In VM settings, go to Hardware tab:\nAdd Disk Import hard disk Choose .qcow2 which you have downloaded Navigate to Options\nClick on boot order Enable imported disk and place on 1st place Cloud-init Configuration Now we need to add cloud-init drive for OS to automatically configure Network, Users, SSH Keys and etc.\nNavigate to Hardware\nAdd disk Add cloud-init drive Navigate to Cloud-Init and configure accordingly\nConvert VM Start VM and install all nescescarry packages and make configurations which will then be present on VM\u0026rsquo;s created from this template\nAfter you\u0026rsquo;re done, run following command\n1 2 # Clean machine id for cloud-init to work on new VM\u0026#39;s cloud-init clean And then convert server to template\n","date":"2025-12-19T00:00:00Z","image":"/p/proxmox-template-creation-gui/cover.png","permalink":"/p/proxmox-template-creation-gui/","title":"Proxmox Template Creation (GUI)"},{"content":"I have switched from Obsidian to Affine, and during tinkering with settings, I have used invalid config of r2 storage, which caused my application to go to crash loop.\nIt is fixable with following steps:\nWe will temporarily open ports to DB by going to docker-compose.yml and add ports section to database container. 1 2 3 4 5 6 7 8 postgres: image: pgvector/pgvector:pg16 container_name: affine_postgres volumes: - ${DB_DATA_LOCATION}:/var/lib/postgresql/data ports: - 5432:5432 ... Restart with docker compose up -d --force-recreate n local PC, download any SQL client, I will use Beekeeper Studio . Affine uses Postgres, so we will Connect to DB with variables in .env and db type of postgreSQL Find app_configs table, and edit the table which causes error. ","date":"2025-07-14T00:00:00Z","image":"/p/affine-incorrect-config/cover.png","permalink":"/p/affine-incorrect-config/","title":"Affine Incorrect config"},{"content":"Если вы предпочитаете self-hosted решения для хранения фотографий, то этот гайд поможет вам перенести снимки с Яндекс.Диска в Immich.\n🔧 Подготовка Одна из распространённых проблем при переносе фотографий — потеря метаданных, особенно дат и времени съёмки. Чтобы этого избежать, перед загрузкой в Immich мы воспользуемся ExifTool, который восстановит правильные метаданные на основе названий файлов.\nДля работы понадобится компьютер с установленными:\nExifTool – для корректировки дат и времени фотографий. immich-go – утилита для загрузки изображений в Immich. Команды в этом руководстве рассчитаны на Debian-based системы.\n📤 Выгрузка фотографий с Яндекс.Диска Есть два способа выгрузки фотографий:\nЧерез Rclone – требует настройки, но на момент написания статьи не работает из-за бага. Через официальное приложение Yandex.Disk – более надёжный вариант, но требует Windows. 📥 Выгрузка через приложение Яндекс.Диска Скачайте официальное приложение с сайта Яндекса. Войдите в свою учётную запись. Синхронизируйте файлы с локальным компьютером. 🛠 Корректировка метаданных с помощью ExifTool Фотографии с Яндекс.Диска часто имеют названия вроде IMG_20250217_170803.jpg. Однако Immich и другие галереи не смогут определить реальную дату, так как ориентируются на метаданные снимков.\nС помощью ExifTool мы используем дату из имени файла и записываем её в метаданные.\nУстановка ExifTool Устанавливаем ExifTool\n1 sudo apt install exiftool 📜 Создание скрипта для коррекции дат Создадим скрипт exifscript.sh, который исправит метаданные на основе имени файла:\n1 nano exifscript.sh Добавляем в него следующее содержимое:\n1 exiftool -overwrite_original \\ -ext png -ext jpg \\ \u0026#39;-AllDates\u0026lt;${filename; s/(\\d{4})-(\\d{2})-(\\d{2}) (\\d{2})-(\\d{2})-(\\d{2}).*/$1:$2:$3 $4:$5:$6/}\u0026#39; \\ /path/to/y.disk/photos/ 📌 Разбор скрипта:\n(\\d{4})-(\\d{2})-(\\d{2}) (\\d{2})-(\\d{2})-(\\d{2}) – регулярное выражение, которое извлекает год, месяц, день, часы, минуты и секунды из имени файла. $1:$2:$3 $4:$5:$6 – приводит дату к формату YYYY:MM:DD HH:MM:SS, который понимает Exif. Заменяем /path/to/y.disk/photos/ на реальный путь к фотографиям.\nПроверить записались ли данные, можно через ту же утилиту:\n1 2 3 root@debian# `exiftool \u0026#39;2017-04-09 10-22-48.PNG\u0026#39;` Date/Time Original : 2017:04:09 10:22:48 Create Date : 2017:04:09 10:22:48 🚀 Настройка и загрузка в Immich 🔑 Создание API-ключа в Immich Открываем веб-интерфейс Immich. Заходим в Настройки профиля → API. Создаём новый API-ключ и копируем его. 📦 Установка immich-go Создаём папку и переходим в неё: 1 mkdir immich-go \u0026amp;\u0026amp; cd immich-go Скачиваем последнюю версию с GitHub: 1 wget https://github.com/simulot/immich-go/releases/download/v0.24.5/immich-go_Linux_x86_64.tar.gz Распаковываем архив: 1 tar -xvzf immich-go_Linux_x86_64.tar.gz 📤 Импорт фотографий в Immich Теперь загружаем обработанные снимки в Immich:\n1 2 3 immich-go upload from-folder /path/to/y.disk/photos/ \\ --server https://immich.domain.ltd \\ --api-key ВАШ_API_КЛЮЧ Итог Теперь фотографии успешно перенесены с Яндекс.Диска в Immich с правильными датами!\n","date":"2025-03-04T00:00:00Z","image":"/p/yandex.disk-to-immich/cover.jpg","permalink":"/p/yandex.disk-to-immich/","title":"Yandex.Disk to Immich"},{"content":"Borgmatic is simple, configuration-driven backup software for servers and workstations. It supports incremental backups and deduplication which allow you to save a lot of space.\nBorgmatic Configuration Installation and configuration of borgmatic on Debian\napt install borgmatic\nCopy borgmatic config\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 location: # List of source directories to backup source_directories: - / # Repository with port specification in the URL repositories: - ssh://user@remote:22/./backups/ # Patterns to exclude from backup exclude_patterns: - /dev - /proc - /sys - /var/run - /run - /mnt - /tmp storage: archive_name_format: \u0026#39;{hostname}-{now}\u0026#39; unknown_unencrypted_repo_access_is_ok: true # encryption_passphrase: \u0026#34;yourpasss\u0026#34; encryption: none retention: # Retention policy for backups keep_daily: 7 keep_weekly: 4 keep_monthly: 6 keep_yearly: 1 consistency: checks: - repository - archives Check if Borgmatic config is OK 1 2 3 4 5 6 7 # Initialize borg repo borgmatic init --encryption=none # Check if borg fetch is successfull borgmatic list # Execute test backup (prefferably screen or tmux) borgmatic On successfull backup, add as a daily backup service Edit /etc/systemd/system/borgmatic.service\n1 2 3 4 5 6 7 8 9 10 11 12 [Unit] Description=Borgmatic system backup Requires=network.target After=network.target [Service] Type=oneshot Nice=10 IOSchedulingClass=best-effort IOSchedulingPriority=6 ProtectSystem=full ExecStart=/usr/bin/borgmatic --verbosity -1 --syslog-verbosity 1 Edit /etc/systemd/system/borgmatic.timer\nService will start backup at random time, after 24 hours since last execution\n1 2 3 4 5 6 7 8 9 10 [Unit] Description=Daily backup timer [Timer] OnCalendar=Daily RandomizedDelaySec=24h Persistent=true [Install] WantedBy=timers.target Activate the service systemctl enable borgmatic.timer\n","date":"2025-02-05T15:16:49+04:00","image":"/p/borgmatic-configuration/scp-404.jpg","permalink":"/p/borgmatic-configuration/","title":"Borgmatic Configuration"},{"content":"Linux Password reset guide in case if you lost access to machine. Good for RHCSA Exam\nCorrect method to reset Password with/without SELinux Mash F8 command while booting up the machine, to open \u0026ldquo;grum menu\u0026rdquo;; In the Grub, press \u0026ldquo;e\u0026rdquo; to edit the boot entry options; At the end of the \u0026ldquo;linux\u0026rdquo; line, add init=/bin/bash; mount -o remount,rw / - remounts system directory to rw; /sbin/getenforce - Because our $PATH variable is not loaded, we must check SELinux status by providing absolute path to the binary. ls -Z /etc/shadow - Print SELinux parameters for shadow file (note it down); passwd root - change password; After password change you can see /etc/shadow with ls -Z /etc/shadow and it will have ? mark where policies should be. System won\u0026rsquo;t boot if SELinux is enabled chcon system_u:object_r:shadow_t:s0 /etc/shadow - restore policies for the file exec /sbin/init - will replace current bash process with PID 1 with the actual systemd init process, which will boot system normally without the need of reboot Password reset can be also achieved with rd.break parameter in the boot entry options, but in some RHEL versions it was not a working solution.\nAdditionally restoring SELinux policies with .autorelabel is possible, but it will need two reboots:\nOne for systemd init to see this .autorelabel Second to start whole system relabeling process for only one important file ","date":"2024-12-10T00:00:00Z","image":"/p/rhel-root-password-reset/cover.jpg","permalink":"/p/rhel-root-password-reset/","title":"RHEL Root Password Reset"}]