
HomelabARR CE Scripts¶
HomelabARR CE includes a comprehensive collection of utility scripts for maintenance, automation, and system management. These scripts help keep your media server stack running smoothly and efficiently.
๐งน Maintenance Scripts¶
YAML Cleanup Script¶
Location: /clean-yaml-files.sh
Purpose: Standardizes and cleans up YAML installer files across the entire application library.
# Run YAML cleanup (from root directory)
sudo ./clean-yaml-files.sh
What it does: - Removes metadata junk (author comments, shebang lines) - Ensures all YAML files start with proper --- delimiter - Standardizes format for consistency and reliability - Processes 489+ YAML files across all application categories
Features: - โ
Safe processing with temporary file backup - ๐ Detailed progress reporting - ๐ Skips empty files automatically - ๐ Handles both services: and version: YAML formats
Docker Maintenance¶
Docker System Cleanup:
# Remove unused containers, networks, images
sudo ./scripts/docker/dockerprune.sh
Backup All Containers:
# Create backup of all container configurations
sudo ./backup.sh
Disk Cleanup:
# Clean up system disk space
sudo ./scripts/disk_cleanup.sh
๐ฌ Plex Specific Scripts¶
Plex Database Optimization¶
# Optimize Plex database for better performance
sudo ./scripts/plex/plex-optimize-db.sh
Plex Trash Management¶
# Empty Plex trash to free up disk space
sudo ./scripts/plex/plex-empty-trash.sh
๐ Security Scripts¶
IP Banning¶
# Ban malicious IPs from accessing your server
sudo ./scripts/security/badips.sh
# General IP banning utility
sudo ./scripts/security/bann.sh
# Traefik-specific IP banning
sudo ./scripts/security/traefik-bann.sh
๐ Monitoring Scripts¶
System Health Checks¶
# Check system resources and container status
sudo ./scripts/monitoring/health-check.sh
Log Management¶
# Rotate and manage container logs
sudo ./scripts/logging/log-rotation.sh
๐ Automation Scripts¶
Automatic Updates¶
# Update all containers to latest versions
sudo ./scripts/automation/update-containers.sh
Scheduled Maintenance¶
# Setup automated maintenance tasks
sudo ./scripts/automation/setup-cron.sh
๐ ๏ธ How to Use Scripts¶
Prerequisites¶
- Ubuntu/Debian system with Docker installed
- Root or sudo access
- HomelabARR CE installed
General Usage¶
- Navigate to the HomelabARR CE directory
- Make scripts executable:
chmod +x script-name.sh - Run with sudo:
sudo ./script-name.sh
Safety Tips¶
- โ ๏ธ Always backup your data before running maintenance scripts
- ๐ Review script contents before execution
- ๐บ Test in a non-production environment first
- ๐ Check logs after script execution
๐ Script Categories¶
| Category | Location | Purpose |
|---|---|---|
| Docker | /scripts/docker/ | Container management and cleanup |
| Plex | /scripts/plex/ | Plex server optimization |
| Security | /scripts/security/ | Security and access control |
| Monitoring | /scripts/monitoring/ | System health and performance |
| Automation | /scripts/automation/ | Automated maintenance tasks |
| Backup | /scripts/backup/ | Data backup and restore |
๐ Advanced Usage¶
Creating Custom Scripts¶
# Template for new scripts
#!/bin/bash
# Script Name: custom-script.sh
# Purpose: Describe what your script does
# Author: Your Name
echo "Starting custom maintenance task..."
# Your script logic here
echo "Custom maintenance task completed!"
Scheduling Scripts¶
# Add to crontab for automated execution
crontab -e
# Example: Run YAML cleanup weekly
0 2 * * 0 /path/to/homelabarr-ce/clean-yaml-files.sh
# Example: Run Docker cleanup daily
0 3 * * * /path/to/homelabarr-ce/scripts/docker/dockerprune.sh
Logging Script Output¶
# Redirect output to log file
sudo ./clean-yaml-files.sh >> /var/log/homelabarr-maintenance.log 2>&1
# View maintenance logs
tail -f /var/log/homelabarr-maintenance.log
๐ Script Highlights¶
Recent Additions¶
๐งน YAML Cleanup Script (Latest) - Standardized 489+ YAML files - Improved deployment reliability - Automated maintenance workflow - Consistent formatting across all applications
๐ Contributing Scripts¶
Want to contribute your own scripts? We welcome community contributions!
- Fork the repository
- Create your script in the appropriate
/scripts/subdirectory - Follow our coding standards and add documentation
- Submit a pull request
๐ Documentation¶
For more detailed information: - Maintenance Scripts - Deep dive into system maintenance - - Advanced security configurations - - Setting up automated workflows
Support¶
Kindly report any issues/broken-parts/bugs on github or discord
โ Support Development - Help keep HomelabARR CE scripts growing and improving!