A curated collection of production-ready automation scripts for homelab infrastructure management. These scripts handle security, backup, monitoring, and system administration tasks in a home server environment.
This repository contains battle-tested scripts developed through real-world homelab operations, focusing on:
- Security-first design - Multi-layered protection and validation
- Automation - Reduce manual intervention and human error
- Monitoring - Real-time visibility into system health
- Reliability - Comprehensive error handling and logging
- Documentation - Clear setup guides and usage examples
Perfect for homelabbers, self-hosters, and IT professionals building personal infrastructure.
homelab-scripts/
├── security/
│ └── malware-detection/ # Multi-layered download protection
├── backup/
│ └── proxmox/ # System configuration backups
├── monitoring/
│ └── swiftbar/ # macOS menu bar plugins
└── docs/ # Additional documentation
A comprehensive three-layer security system for safely handling downloaded files.
Architecture:
Download → ClamAV Scan → File Type Validation → Manual Approval → Media Library
↓ ↓ ↓
Quarantine Quarantine Final Storage
Features:
- ✅ ClamAV antivirus integration with automatic quarantine
- ✅ MIME type and extension validation
- ✅ macOS GUI for manual file approval
- ✅ Real-time monitoring via SwiftBar menu bar
- ✅ Comprehensive logging and audit trail
Scripts:
scan-torrents.sh- ClamAV malware scanning with auto-quarantineverify-filetypes.sh- File type validation and suspicious file detectionapprove-and-move.sh- macOS GUI for manual approval and destination selectionapprove-downloads.30s.sh- SwiftBar plugin for status monitoring
Use Case: Safe media downloads in homelab with qBittorrent, Plex, or similar services.
Automated backup of critical Proxmox VE host configuration files with rotation.
Features:
- ✅ Backs up network, storage, and Proxmox configurations
- ✅ Includes SSH keys, cron jobs, and custom scripts
- ✅ Compressed archives with date stamps
- ✅ Automatic rotation (keeps last 4 backups)
- ✅ Package list for easy system restoration
Scripts:
backup-proxmox-host.sh- Complete host configuration backup
Backed Up:
- Network configuration (
/etc/network/interfaces,/etc/hosts) - Storage mounts (
/etc/fstab) - Proxmox settings (
/etc/pve/*) - User data (
/etc/passwd,/etc/shadow,/etc/group) - Automation (
cron.d, custom scripts) - Package selections (for reinstallation)
Use Case: Disaster recovery and system migration for Proxmox hosts.
macOS menu bar integrations for real-time homelab monitoring.
Features:
- ✅ Real-time file count and security status
- ✅ Visual indicators (🟢 OK, 🟡 Pending, 🔴 Alert)
- ✅ Quick actions from menu bar
- ✅ Auto-refresh every 30 seconds
- ✅ Direct links to web interfaces
Scripts:
approve-downloads.30s.sh- Download approval status and quick actions
Use Case: Monitor remote server status directly from macOS menu bar.
Server Side (Linux):
- Debian/Ubuntu-based system
- SSH server with key authentication
- ClamAV (for security scripts)
- Standard Unix utilities (
file,tar,rsync)
Client Side (macOS):
- SSH key configured for passwordless access
- SwiftBar (for monitoring plugins)
- Network/VPN access to server
# Clone repository
git clone https://github.com/ZalPika/homelab-scripts.git
cd homelab-scripts
# Choose a category
cd security/malware-detection
# Read category-specific README
cat README.md
# Follow installation instructions for your use caseEach script category has detailed setup instructions in its own README.
- Bash/zsh - Core scripting language
- SSH - Remote automation and management
- Git - Version control
- ClamAV - Antivirus scanning
- MIME detection - File type validation
- Quarantine system - Isolated suspicious files
- Proxmox VE - Virtualization platform
- LXC containers - Lightweight virtualization
- Linux - Server operating system
- macOS - Client-side GUI and monitoring
- SwiftBar - Menu bar plugins
- AppleScript - macOS automation
qBittorrent → Security Scripts → Plex/Jellyfin
↓
Malware Protection
Safe downloading with automated malware scanning and manual approval.
Daily Cron → Backup Scripts → External Storage
↓
Configuration Safety Net
Automated backups for disaster recovery and system migration.
Server Status → SwiftBar Plugin → macOS Menu Bar
↓
Real-time Visibility
Monitor homelab health from your Mac without opening terminal.
This repository demonstrates:
- Automated security workflows
- Backup strategies and rotation
- Log management and monitoring
- Service integration
- Defense-in-depth architecture
- Malware detection and quarantine
- File validation techniques
- Audit trails and logging
- Bash/zsh automation
- Error handling and validation
- Cross-platform integration (Linux + macOS)
- Modular script design
- Infrastructure as code
- Automation pipelines
- Monitoring and alerting
- Configuration management
Perfect for demonstrating practical IT skills to potential employers.
Each script category includes:
- README.md - Overview and quick start
- Installation guide - Step-by-step setup
- Configuration examples - Sample configs
- Troubleshooting - Common issues and solutions
- Usage examples - Real-world workflows
- ✅ No hardcoded credentials (use SSH keys)
- ✅ Principle of least privilege
- ✅ Comprehensive logging for audit trails
- ✅ Quarantine before execution
- ✅ Manual approval for critical operations
- ❌ Replace professional security solutions
- ❌ Guarantee 100% malware detection
- ❌ Handle all edge cases automatically
- ❌ Provide warranty or liability coverage
Use at your own risk. Always:
- Test in non-production first
- Keep software updated
- Review logs regularly
- Maintain additional security layers (firewall, VPN, network segmentation)
This is a personal homelab repository, but feedback and suggestions are welcome!
- Open an issue for bugs or feature requests
- Share your own script variations
- Suggest improvements to documentation
- Report security vulnerabilities privately
- Follow existing code style
- Include documentation for new scripts
- Test thoroughly before submitting
- Explain the problem your script solves
- Network automation scripts (VLAN management, firewall rules)
- Container management (LXC automation, Docker cleanup)
- Monitoring extensions (Telegram/Discord notifications)
- Backup enhancements (LXC container backups, verification)
- Documentation improvements (video tutorials, diagrams)
network/- Network configuration and automationcontainers/- LXC and Docker managementnotifications/- Alert systems and integrationsutilities/- General-purpose homelab tools
| Category | Scripts | Lines of Code | Documentation |
|---|---|---|---|
| Security | 4 | ~280 | Comprehensive |
| Backup | 1 | ~50 | Complete |
| Monitoring | 1 | ~65 | Complete |
| Total | 6 | ~395 | ~850 lines |
This repository showcases real-world IT skills relevant to:
Job Roles:
- System Administrator
- DevOps Engineer
- Security Operations
- IT Infrastructure
- Automation Engineer
- Site Reliability Engineer (SRE)
Key Competencies Demonstrated:
- Shell scripting and automation
- Security-first thinking
- Cross-platform integration
- Documentation and knowledge sharing
- Problem-solving with practical solutions
- Infrastructure management
Perfect for linking in your CV, LinkedIn, or job applications.
MIT License - See LICENSE file for details.
Free to use, modify, and distribute with attribution.
These scripts were developed through practical homelab experience, combining:
- Real-world security requirements
- Community best practices
- Trial-and-error learning
- Professional IT standards
Inspired by the homelab community and the need for reliable, documented automation.
- GitHub Issues: For bugs and feature requests
- Discussions: For questions and sharing experiences
- Security Issues: Report privately via GitHub security advisories
If you find these scripts useful, consider:
- ⭐ Starring the repository
- 🔗 Sharing with other homelabbers
- 💬 Opening discussions about your use cases
- 🤝 Contributing your own improvements
Built with ❤️ for the homelab community
Making home infrastructure secure, automated, and maintainable.