Skip to content

Image of HomelabARR CE

Join HomelabARR CE on Discord Total Releases Downloaded from GitHub Latest Official Release on GitHub MIT License

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

  1. Navigate to the HomelabARR CE directory
  2. Make scripts executable: chmod +x script-name.sh
  3. 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!

  1. Fork the repository
  2. Create your script in the appropriate /scripts/ subdirectory
  3. Follow our coding standards and add documentation
  4. 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!

  • Join our Discord: https://discord.gg/Pc7mXX786x for Support