Files
Homelab/README.md

204 lines
5.2 KiB
Markdown
Executable File

# Docker Media & Utility Stack
A comprehensive Docker Compose setup for media management, document processing, and various utility services.
## 🚀 Quick Start
```bash
# Clone the repository
git clone <your-repo-url>
cd <repo-name>
# Start all services
docker compose up -d
# Or start specific service groups
docker compose --profile media up -d
```
## 📋 Services Overview
### 🎬 Media Stack (`media` profile)
- **Sonarr** (8989) - TV series management
- **Radarr** (7878) - Movie management
- **Lidarr** (8686) - Music management
- **Bazarr** (6767) - Subtitle management
- **Prowlarr** (9696) - Indexer management
- **FlareSolverr** (8191) - Cloudflare bypass
- **Jellyfin** (8096) - Media streaming server
- **Jellyseerr** (5055) - Media request management
- **qBittorrent** (7070) - Download client
- **Multi-Scrobbler** (9078) - Music scrobbling
- **Maloja** (42010) - Music statistics
### 🛠️ Utilities (`utilities` profile)
- **Homepage** (7575) - Service dashboard
- **FileBrowser** (6633) - Web file manager
- **Syncthing** (8384) - File synchronization
- **Obsidian Remote** (8181) - Note-taking
- **Stirling PDF** (8090) - PDF processing
- **RustDesk** - Remote desktop server
- **Gramps** (5511) - Genealogy management
- **Newt** - Notification service
- **RackNerd API Converter** (5000) - VPS monitoring API
### 📄 Documents (`documents` profile)
- **Paperless NGX** (8100) - Document management
- **Paperless AI** (3040) - AI document enhancement
- **Gotenberg** - Document conversion
- **Tika** - Content extraction
### 📊 Monitoring (`monitoring` profile)
- **Speedtest Tracker** (8180) - Network monitoring
- **Watchtower** - Container updates
## 🏗️ Architecture
The stack is organized into logical service groups:
```
├── docker-compose.yml # Main orchestration
├── compose/
│ ├── media-stack.yml # *arr services & Jellyfin
│ ├── utilities.yml # General utilities
│ ├── document-management.yml # Paperless stack
│ └── monitoring.yml # Monitoring services
├── .env # Environment variables
└── .env.template # Template for new deployments
```
## 🔧 Configuration
### Environment Variables
Key configuration is handled through `.env`:
- `DOMAIN` - Your domain name
- `TZ` - Timezone (Pacific/Auckland)
- `DATA_ROOT` - Media storage path (/data)
- Database credentials for各服务
### Service Profiles
Control which services start:
```bash
# Start only media services
export COMPOSE_PROFILES=media
docker compose up -d
# Start multiple profiles
export COMPOSE_PROFILES=media,utilities
docker compose up -d
# Start everything
export COMPOSE_PROFILES=all
docker compose up -d
```
## 📁 Directory Structure
Ensure these directories exist:
```
/data/ # Media storage
├── movies/
├── tv/
├── music/
└── torrents/
../docker-local/ # Container configs
├── Arrs/
│ ├── Sonarr/config/
│ ├── Radarr/config/
│ └── ...
└── [service-name]/config/
```
## 🔒 Security Features
- **No hardcoded secrets** - All sensitive data in `.env`
- **Least privilege** - `no-new-privileges` security options
- **Network isolation** - Separate networks for different stacks
- **Health checks** - Automatic service monitoring
- **Read-only mounts** - Docker socket proxy with restricted access
## 🌐 Network Configuration
- **arr_network** (172.20.0.0/16) - Media services
- **database_network** (172.21.0.0/16) - Database services
Static IPs assigned for reliable service discovery.
## 📝 Service URLs
Once running, access services at:
- **Homepage**: http://localhost:7575
- **Jellyfin**: http://localhost:8096
- **Sonarr**: http://localhost:8989
- **Radarr**: http://localhost:7878
- **qBittorrent**: http://localhost:7070
- **Paperless**: http://localhost:8100
- **FileBrowser**: http://localhost:6633
- **RackNerd API**: http://localhost:5000
## 🔄 Management Commands
```bash
# View running services
docker compose ps
# View logs
docker compose logs [service-name]
# Update a service
docker compose pull [service-name]
docker compose up -d [service-name]
# Stop all services
docker compose down
# Stop and remove volumes (⚠️ DATA LOSS)
docker compose down -v
```
## 🚨 Troubleshooting
### Common Issues
1. **Port conflicts**: Check if ports are already in use
2. **Permission issues**: Ensure PUID/PGID match your user
3. **Volume mounts**: Verify directory paths exist
4. **Network issues**: Check firewall settings
### Health Checks
Most services include health checks. View status:
```bash
docker compose ps
# Shows health status for each service
```
## 🔐 Security Notes
- `.env` contains sensitive data - keep it secure
- Consider using Docker secrets for production
- Regular updates via Watchtower
- Monitor access logs
## 🤝 Contributing
1. Follow the existing structure when adding services
2. Add health checks to new services
3. Use environment variables for configuration
4. Update documentation for new services
## 📄 License
[Add your license here]
---
**⚠️ Important**: This setup includes production credentials. Ensure `.env` is never committed to version control.