mirror of
https://github.com/acedanger/docker.git
synced 2025-12-05 20:30:12 -08:00
added jellyfin
This commit is contained in:
112
jellyfin/README.md
Normal file
112
jellyfin/README.md
Normal file
@@ -0,0 +1,112 @@
|
||||
# Jellyfin Docker Migration Guide
|
||||
|
||||
## ✅ Current Status
|
||||
Your Jellyfin Docker container is now running successfully at http://localhost:8096
|
||||
|
||||
## 🎯 What's Working
|
||||
- ✅ Docker Compose setup with named volumes
|
||||
- ✅ Media libraries properly mapped:
|
||||
- TV: `/mnt/share/media/tv` → `/data/tv`
|
||||
- Anime: `/mnt/share/media/anime` → `/data/anime`
|
||||
- Movies: `/mnt/share/media/movies` → `/data/movies`
|
||||
- Kids Movies: `/mnt/share/media/movies_kids` → `/data/movies_kids`
|
||||
- Babies: `/mnt/share/media/babies` → `/data/babies`
|
||||
- ✅ Network ports configured (8096, 8920, 7359, 1900)
|
||||
- ✅ Container health checks passing
|
||||
|
||||
## 🔧 Next Steps
|
||||
|
||||
### 1. Initial Setup
|
||||
1. Open http://localhost:8096 in your browser
|
||||
2. Complete the initial setup wizard
|
||||
3. Create your admin user account
|
||||
4. Add your media libraries using the paths above
|
||||
|
||||
### 2. Migrate Your Old Configuration (Optional)
|
||||
If you want to copy specific settings from your bare metal installation:
|
||||
|
||||
```bash
|
||||
# Stop the container
|
||||
docker compose down
|
||||
|
||||
# Copy specific config files (be selective to avoid database issues)
|
||||
sudo docker cp /etc/jellyfin/branding.xml jellyfin_volume:/config/config/
|
||||
sudo docker cp /etc/jellyfin/encoding.xml jellyfin_volume:/config/config/
|
||||
sudo docker cp /etc/jellyfin/network.xml jellyfin_volume:/config/config/
|
||||
|
||||
# Restart the container
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
### 3. Plugin Migration
|
||||
Your old plugins were detected but may need to be reinstalled:
|
||||
- Chapter Segments Provider
|
||||
- Open Subtitles
|
||||
- Playback Reporting
|
||||
- Reports
|
||||
- Session Cleaner
|
||||
- Webhook
|
||||
|
||||
### 4. GPU Transcoding (When Ready)
|
||||
Once you fix your NVIDIA drivers, uncomment these lines in `docker-compose.yml`:
|
||||
```yaml
|
||||
# NVIDIA GPU settings (uncomment when drivers are working)
|
||||
# environment:
|
||||
# - NVIDIA_VISIBLE_DEVICES=all
|
||||
# - NVIDIA_DRIVER_CAPABILITIES=compute,video,utility
|
||||
# runtime: nvidia
|
||||
```
|
||||
|
||||
## 🛠️ NVIDIA Driver Fix
|
||||
To enable GPU transcoding, you'll need to fix your NVIDIA drivers:
|
||||
```bash
|
||||
# Check what driver you need
|
||||
ubuntu-drivers devices
|
||||
|
||||
# Install recommended driver
|
||||
sudo ubuntu-drivers autoinstall
|
||||
|
||||
# Or install specific driver
|
||||
sudo apt install nvidia-driver-470 # (or whatever version is recommended)
|
||||
|
||||
# Reboot
|
||||
sudo reboot
|
||||
```
|
||||
|
||||
## 📋 File Locations
|
||||
- **Docker Compose**: `/home/acedanger/docker/jellyfin/docker-compose.yml`
|
||||
- **Migration Script**: `/home/acedanger/docker/jellyfin/migrate.sh`
|
||||
- **Config Volume**: `jellyfin_jellyfin_config`
|
||||
- **Cache Volume**: `jellyfin_jellyfin_cache`
|
||||
|
||||
## 🔄 Management Commands
|
||||
```bash
|
||||
# Start Jellyfin
|
||||
docker compose up -d
|
||||
|
||||
# Stop Jellyfin
|
||||
docker compose down
|
||||
|
||||
# View logs
|
||||
docker compose logs -f jellyfin
|
||||
|
||||
# Restart Jellyfin
|
||||
docker compose restart
|
||||
|
||||
# Update Jellyfin
|
||||
docker compose pull && docker compose up -d
|
||||
```
|
||||
|
||||
## 🚫 Old Bare Metal Service
|
||||
To prevent conflicts, disable the old systemd service:
|
||||
```bash
|
||||
sudo systemctl stop jellyfin
|
||||
sudo systemctl disable jellyfin
|
||||
```
|
||||
|
||||
## 🎬 Access Points
|
||||
- **Web Interface**: http://localhost:8096
|
||||
- **HTTPS** (if configured): https://localhost:8920
|
||||
- **Server IP**: Your container is accessible at `10.0.12.2:8096` from the network
|
||||
|
||||
Your Jellyfin migration is complete! The container will automatically restart if your system reboots.
|
||||
46
jellyfin/docker-compose.yml
Normal file
46
jellyfin/docker-compose.yml
Normal file
@@ -0,0 +1,46 @@
|
||||
services:
|
||||
jellyfin:
|
||||
#image: jellyfin/jellyfin:latest
|
||||
image: lscr.io/linuxserver/jellyfin:latest
|
||||
container_name: jellyfin
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8096:8096" # HTTP web UI
|
||||
- "8920:8920" # HTTPS web UI (optional)
|
||||
- "7359:7359/udp" # Discovery (optional)
|
||||
- "1900:1900/udp" # DLNA (optional)
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=America/New_York
|
||||
- JELLYFIN_PublishedServerUrl=http://192.168.68.67:8096
|
||||
- JELLYFIN_LOG_LEVEL=Warning
|
||||
# NVIDIA GPU settings (commented out due to driver issues)
|
||||
# - NVIDIA_VISIBLE_DEVICES=all
|
||||
# - NVIDIA_DRIVER_CAPABILITIES=compute,video,utility
|
||||
volumes:
|
||||
- jellyfin_config:/config
|
||||
- jellyfin_cache:/cache
|
||||
# Media directories
|
||||
- /mnt/share/media/anime:/data/anime
|
||||
- /mnt/share/media/tv:/data/tv
|
||||
- /mnt/share/media/babies:/data/babies
|
||||
- /mnt/share/media/movies:/data/movies
|
||||
- /mnt/share/media/movies_kids:/data/movies_kids
|
||||
labels:
|
||||
- diun.enable=true
|
||||
# Hardware acceleration devices (commented out - no GPU drivers available)
|
||||
# devices:
|
||||
# - /dev/dri:/dev/dri # For Intel/AMD GPU
|
||||
|
||||
# Runtime for NVIDIA GPU support (commented out due to driver issues)
|
||||
# runtime: nvidia
|
||||
volumes:
|
||||
jellyfin_config:
|
||||
driver: local
|
||||
jellyfin_cache:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: jellyfin_network
|
||||
101
jellyfin/migrate.sh
Executable file
101
jellyfin/migrate.sh
Executable file
@@ -0,0 +1,101 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Jellyfin Docker Migrationif ! docker compose version &> /dev/null; then
|
||||
echo "❌ Docker Compose not found. Please install Docker Compose first."
|
||||
exit 1
|
||||
fi
|
||||
echo "✅ Docker and Docker Compose are available"pt
|
||||
# This script helps migrate your bare metal Jellyfin installation to Docker
|
||||
|
||||
echo "=== Jellyfin Docker Migration Assistant ==="
|
||||
echo
|
||||
|
||||
# Check if Jellyfin service is running
|
||||
if systemctl is-active --quiet jellyfin; then
|
||||
echo "⚠️ Jellyfin service is currently running. Please stop it before migration:"
|
||||
echo " sudo systemctl stop jellyfin"
|
||||
echo " sudo systemctl disable jellyfin"
|
||||
echo
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check for NVIDIA drivers and container toolkit
|
||||
echo "🔍 Checking NVIDIA GPU support..."
|
||||
if command -v nvidia-smi &> /dev/null; then
|
||||
echo "✅ NVIDIA drivers detected"
|
||||
if command -v nvidia-container-runtime &> /dev/null; then
|
||||
echo "✅ NVIDIA Container Toolkit detected"
|
||||
echo " You can uncomment the NVIDIA GPU sections in docker compose.yml"
|
||||
else
|
||||
echo "⚠️ NVIDIA Container Toolkit not found. Install it for GPU transcoding:"
|
||||
echo " https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html"
|
||||
fi
|
||||
else
|
||||
echo "ℹ️ NVIDIA drivers not detected. GPU transcoding will not be available."
|
||||
fi
|
||||
echo
|
||||
|
||||
# Check Docker and Docker Compose
|
||||
echo "🔍 Checking Docker installation..."
|
||||
if ! command -v docker &> /dev/null; then
|
||||
echo "❌ Docker not found. Please install Docker first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v docker compose &> /dev/null && ! docker compose version &> /dev/null; then
|
||||
echo "❌ Docker Compose not found. Please install Docker Compose first."
|
||||
exit 1
|
||||
fi
|
||||
echo "✅ Docker and Docker Compose are available"
|
||||
echo
|
||||
|
||||
# Migration steps
|
||||
echo "📋 Migration Steps:"
|
||||
echo "1. Copy your existing Jellyfin data to Docker volumes"
|
||||
echo "2. Update media paths in docker compose.yml"
|
||||
echo "3. Configure GPU transcoding (if applicable)"
|
||||
echo "4. Start the container"
|
||||
echo
|
||||
|
||||
# Offer to copy existing data
|
||||
read -p "Do you want to copy existing Jellyfin data? (y/n): " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "🔄 Creating Docker volumes and copying data..."
|
||||
|
||||
# Create the container to create volumes
|
||||
docker compose up --no-start
|
||||
|
||||
# Copy configuration data
|
||||
if [ -d "/var/lib/jellyfin" ]; then
|
||||
echo "📁 Copying Jellyfin data directory..."
|
||||
sudo docker cp /var/lib/jellyfin/. jellyfin:/config/
|
||||
fi
|
||||
|
||||
# Copy cache if it exists
|
||||
if [ -d "/var/cache/jellyfin" ]; then
|
||||
echo "📁 Copying Jellyfin cache directory..."
|
||||
sudo docker cp /var/cache/jellyfin/. jellyfin:/cache/
|
||||
fi
|
||||
|
||||
echo "✅ Data migration completed"
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "🎬 Next steps:"
|
||||
echo "1. Edit docker compose.yml and update the media volume paths:"
|
||||
echo " - Replace '/path/to/your/movies' with your actual movie directory"
|
||||
echo " - Replace '/path/to/your/tv' with your actual TV shows directory"
|
||||
echo " - Replace '/path/to/your/music' with your actual music directory"
|
||||
echo
|
||||
echo "2. If you have NVIDIA GPU and drivers installed:"
|
||||
echo " - Uncomment the NVIDIA GPU sections in docker compose.yml"
|
||||
echo
|
||||
echo "3. Start Jellyfin:"
|
||||
echo " docker compose up -d"
|
||||
echo
|
||||
echo "4. Access Jellyfin at: http://localhost:8096"
|
||||
echo
|
||||
echo "5. Optional: Stop and disable the systemd service:"
|
||||
echo " sudo systemctl stop jellyfin"
|
||||
echo " sudo systemctl disable jellyfin"
|
||||
Reference in New Issue
Block a user