Docker: Scheduled Automatic Shutdown

For home servers and test environments, resource saving is important: containers can be stopped and system powered off during nights or off-hours. This guide describes a safe method with state preservation and automatic recovery. 💡 Method suits OrangePI, Raspberry Pi, old PCs, and any systems where power efficiency matters. 📦 Container shutdown script Create script # File: /usr/local/bin/stop_containers_and_shutdown.sh cat > /usr/local/bin/stop_containers_and_shutdown.sh << 'EOF' #!/bin/bash # # Script saves running container IDs, # stops them, and initiates system shutdown. # CONTAINERS_FILE="/etc/active_containers.txt" echo "=== $(date '+%Y-%m-%d %H:%M:%S') ===" echo "Starting container shutdown and system power-off script" # Get list of running containers (by ID) RUNNING_CONTAINERS=$(docker ps -q) if [ -n "${RUNNING_CONTAINERS}" ]; then echo "Saving running containers to ${CONTAINERS_FILE}" echo "${RUNNING_CONTAINERS}" > "${CONTAINERS_FILE}" docker stop ${RUNNING_CONTAINERS} echo "Containers stopped." else echo "No running containers." [ -f "${CONTAINERS_FILE}" ] && rm -f "${CONTAINERS_FILE}" fi sleep 10 echo "Shutting down system." /sbin/shutdown -h now EOF Make executable chmod +x /usr/local/bin/stop_containers_and_shutdown.sh How it works Step Description docker ps -q Gets IDs of all running containers > /etc/active_containers.txt Saves list for recovery docker stop Gracefully stops containers (SIGTERM) sleep 10 Allows time for operations to complete shutdown -h now Powers off the system Why this way: ...

17 Mar 2026 · 4 min · 848 words · Potato Energy Team, ponfertato

Docker Volumes: Backup & Migration

Docker Volumes store data independently from containers but require separate approach for backup. This guide describes universal methods for working with volumes using popular services as examples. 💡 Replace volume names with your own. Methods work with any containers. 📦 Backup volumes Via docker-volume-backup (recommended) docker run --rm \ -v portainer_data:/backup/portainer_data \ -v postgres_data:/backup/postgres_data \ -v redis_data:/backup/redis_data \ -v /opt/docker/backup:/archive \ --entrypoint backup \ offen/docker-volume-backup:v2 Parameters: Parameter Description -v <volume>:/backup/<name> Map volume to backup directory -v /opt/docker/backup:/archive Where to save archive on host --entrypoint backup Run backup mode --rm Remove container after completion Why this method: ...

16 Mar 2026 · 4 min · 665 words · Potato Energy Team, ponfertato

OpenWRT: Advanced Router Configuration

This guide covers advanced OpenWRT configuration for power users. We’ll set up DNS-level traffic filtering, secure remote access via WireGuard, metrics monitoring, and automated notifications. 💡 All sensitive values are replaced with <...>. Substitute your own. 📦 Package installation opkg update # Monitoring: prometheus exporter + modules opkg install \ prometheus-node-exporter-lua \ prometheus-node-exporter-lua-nat_traffic \ prometheus-node-exporter-lua-netstat \ prometheus-node-exporter-lua-openwrt \ prometheus-node-exporter-lua-wifi \ prometheus-node-exporter-lua-wifi_stations # WireGuard: kernel module + tools + LuCI opkg install \ kmod-wireguard \ wireguard-tools \ luci-proto-wireguard # DNS over HTTPS opkg install https-dns-proxy # Debug utilities opkg install curl jq tmux htop Why these packages: ...

16 Mar 2026 · 7 min · 1348 words · Potato Energy Team, ponfertato

OrangePI: Data Recovery & Migration

OrangePI and other ARM single-board computers often use eMMC or SD cards with limited write endurance. Over time, storage fills up, degrades, or fails. This guide describes a method for data recovery and migration to external storage (USB SSD/HDD) via a chroot environment. 💡 Method is universal: works for OrangePI, Raspberry Pi, NanoPi, and other ARM systems. 📦 Preparation Requirements Component Requirements USB drive SSD/HDD, capacity ≥ eMMC data Live image Any Linux with ARM support (optional) Access root or sudo, physical access to board Network Ethernet or WiFi (for remote access) Check connected storage # Show all MMC devices (eMMC, SD card) ls /dev/mmc* # Show all block devices lsblk # Show partitions and mount points df -h Expected output: ...

16 Mar 2026 · 4 min · 812 words · Potato Energy Team, ponfertato