Production-ready monitoring, backups, curation, and remote access for Immich
This project provides a complete, production-ready ecosystem around Immich, the self-hosted photo and video management solution. It adds essential features for running Immich in a family environment with 6+ users.
- Disk Health Monitoring - SMART data collection every 5 minutes
- Automated Backups - Daily PostgreSQL dumps with 30-day retention
- Update Management - Automated minor updates with rollback capability
- System Monitoring - CPU, RAM, disk I/O metrics with historical data
- Alert System - Email/webhook notifications for critical issues
- Web Dashboard - Real-time metrics and manual controls
- AI Quality Scoring - Automatic photo quality assessment (local, no API costs)
- Monthly Curation - Per-user reminders and curated albums
- Duplicate Detection - Find and manage similar photos
- Year-End Collaboration - Family photo book creation tools
- Cloudflare Tunnel - Secure access from anywhere, no port forwarding
- Automatic HTTPS - Built-in SSL certificates
- DDoS Protection - Cloudflare's edge network protection
- fail2ban - Automatic brute force protection
- UFW Firewall - Network access control
- 2FA Support - Two-factor authentication guidance
- Security Monitoring - Continuous security status tracking
Total: $10-15/year
- Domain name: $10-15/year
- Everything else: FREE (self-hosted)
- Ubuntu/Debian Linux
- Immich already installed and running
- Python 3.9+
- Docker and Docker Compose
- sudo access
# Clone the repository
git clone https://github.com/yourusername/immich-manager.git
cd immich-manager
# Run the installer
./install.shThe installer will:
- Check prerequisites
- Install Server Manager (~10 minutes)
- Install Photo Curator (~15 minutes)
- Setup Remote Access (~15 minutes, requires domain)
- Apply Security Hardening (~5 minutes)
- Run comprehensive tests
./scripts/00-check-prerequisites.shValidates:
- Operating system (Ubuntu/Debian)
- Python 3.9+
- Docker and Docker Compose
- Immich installation
- Disk space (10GB+ free)
- Required ports (8080, 8081)
./scripts/10-install-server-manager.shInstalls:
- Python virtual environment
- FastAPI application
- SQLite database
- systemd service
- Web dashboard
Access: http://localhost:8080
Configuration: /opt/immich-server-manager/config/config.yaml
./scripts/20-install-photo-curator.shInstalls:
- Photo curation engine
- OpenCV and AI models
- Web interface
- systemd service
Access: http://localhost:8081
Configuration: /opt/photo-curator/config/config.yaml
./scripts/30-install-remote-access.shRequirements:
- Domain name ($10-15/year from Porkbun, Namecheap, etc.)
- Free Cloudflare account
- Domain added to Cloudflare
- Nameservers updated
Sets up:
- Cloudflare Tunnel (cloudflared)
- DNS records
- Multi-service routing
- Automatic reconnection
Access:
https://yourdomain.comβ Immichhttps://yourdomain.com/monitor/β Server Managerhttps://yourdomain.com/curator/β Photo Curator
./scripts/40-security-hardening.shConfigures:
- fail2ban with Immich monitoring
- UFW firewall rules
- Security monitoring scripts
- Security checklist
./scripts/50-test-installation.shTests all components and generates comprehensive report.
Edit /opt/immich-server-manager/config/config.yaml:
immich:
api_key: "your-api-key" # Generate in Immich: Admin β API Keys
storage:
data_drives:
- "/dev/sda"
- "/dev/sdb"
backup:
enabled: true
local_path: "/mnt/backups/immich"
retention_days: 30
alerts:
email:
enabled: true
smtp_host: "smtp.gmail.com"
smtp_port: 587
smtp_user: "your-email@gmail.com"
smtp_password: "your-app-password"
to:
- "admin@yourdomain.com"Test email alerts:
curl -X POST http://localhost:8080/api/test-alertEdit /opt/photo-curator/config/config.yaml:
immich:
api_key: "your-api-key" # Same as Server Manager
curation:
monthly_target: 50 # Photos to curate per month
reminder_day: 1 # Day of month for reminders./scripts/health-check.shShows status of all services and recent backup.
-
Server Manager: http://localhost:8080
- System metrics
- Disk health
- Backup status
- Alert history
-
Photo Curator: http://localhost:8081
- Photo quality scores
- Curation progress
- User activity
# View logs
sudo journalctl -u immich-server-manager -f
sudo journalctl -u photo-curator -f
sudo journalctl -u cloudflared -f
# Restart services
sudo systemctl restart immich-server-manager
sudo systemctl restart photo-curator
sudo systemctl restart cloudflared
# Check status
sudo systemctl status immich-server-managercurl -X POST http://localhost:8080/api/backup/now/opt/immich-ecosystem/scripts/security-monitor.shShows:
- fail2ban bans
- Recent login attempts
- Firewall status
- Service health
-
Enable 2FA for all users (CRITICAL!)
- Login to Immich β Admin β Users
- Enable 2FA for each user
- Users must set up authenticator app on next login
-
Use strong passwords
- Minimum 16 characters
- Use a password manager
-
Regular updates
sudo apt update && sudo apt upgrade -
Monitor alerts
- Check email alerts regularly
- Review security logs weekly
-
Test backups
- Verify backups are running
- Test restore procedure quarterly
See /opt/immich-ecosystem/security-checklist.txt for complete checklist.
Backups run automatically at 2 AM daily (configurable).
Backup location: /mnt/backups/immich/
Manual backup:
curl -X POST http://localhost:8080/api/backup/now# List available backups
ls -lh /mnt/backups/immich/
# Restore database (example)
BACKUP_FILE="/mnt/backups/immich/immich_db_20240101_020000.sql.gz"
gunzip -c $BACKUP_FILE | docker exec -i immich_postgres psql -U postgres immich# Check logs
sudo journalctl -u immich-server-manager -n 50
# Verify configuration
cat /opt/immich-server-manager/config/config.yaml
# Test manually
cd /opt/immich-server-manager
source venv/bin/activate
python -m src.main# Check OpenCV installation
cd /opt/photo-curator
source venv/bin/activate
python -c "import cv2; print(cv2.__version__)"
# Reinstall if needed
pip install --force-reinstall opencv-python# Check tunnel status
sudo systemctl status cloudflared
# Check tunnel logs
sudo journalctl -u cloudflared -n 100
# Test DNS
dig yourdomain.com
# Verify local services are running
curl http://localhost:2283/api/server-info# Find what's using the port
sudo lsof -i :8080
# Change port in config
nano /opt/immich-server-manager/config/config.yaml
# Then restart: sudo systemctl restart immich-server-manager# Install smartmontools
sudo apt install smartmontools
# Test manually
sudo smartctl -a /dev/sda
# Check if drives are detected
lsblkimmich-manager/
βββ install.sh # Master installation script
βββ README.md # This file
β
βββ scripts/
β βββ lib/
β β βββ state-manager.sh # Installation state tracking
β βββ systemd/ # Service files
β βββ 00-check-prerequisites.sh
β βββ 10-install-server-manager.sh
β βββ 20-install-photo-curator.sh
β βββ 30-install-remote-access.sh
β βββ 40-security-hardening.sh
β βββ 50-test-installation.sh
β βββ health-check.sh
β
βββ server-manager/
β βββ src/ # Python application
β βββ config/ # Configuration templates
β βββ static/ # Web dashboard
β βββ requirements.txt
β
βββ photo-curator/
βββ src/ # Python application
βββ config/ # Configuration templates
βββ static/ # Web interface
βββ requirements.txt
Base URL: http://localhost:8080
GET /health- Health checkGET /api/status- System statusGET /api/disks- Disk healthGET /api/metrics?hours=24- System metricsGET /api/backups- Backup historyPOST /api/backup/now- Trigger backupGET /api/alerts- Get alertsPOST /api/test-alert- Send test alert
Base URL: http://localhost:8081
GET /health- Health checkGET /api/status- Curator statusGET /api/users- List usersGET /api/photos/{user_id}/monthly- Monthly photosPOST /api/curate/{user_id}- Curate photos
Full API docs: http://localhost:8080/docs and http://localhost:8081/docs
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - See LICENSE file for details
- Immich - The amazing self-hosted photo management solution
- Cloudflare - Free tunneling and DDoS protection
- FastAPI - Modern Python web framework
- Issues: Open an issue on GitHub
- Immich Discord: https://discord.immich.app
- Immich Docs: https://immich.app/docs
- Mobile app for Photo Curator
- Advanced AI features (face recognition, scene detection)
- Multi-site backup support (S3, Backblaze)
- Email digest reports
- Telegram/Discord bot integration
- Photo book export to Shutterfly/Mixbook
- Prometheus/Grafana integration
- Installation time: 30-60 minutes
- Disk space required: ~500MB (without photos)
- Memory usage: ~200MB (combined services)
- CPU usage: <5% idle, ~20% during backups
- Supported users: 6-20+ (tested with families)
Made with β€οΈ for the Immich community
Star β this repo if you find it useful!