streamflow/DOCKER_INSTALLATION.md

5.2 KiB

StreamFlow - Easy Docker Installation

StreamFlow is a powerful IPTV streaming platform with VPN support, recording capabilities, and more.

🚀 Quick Start (3 Steps)

1. Download the Docker Compose file

wget https://raw.githubusercontent.com/aiulian25/streamflow/main/docker-compose.yml

Or manually create a file named docker-compose.yml with the content from here.

2. (Optional) Create environment file

Generate secure secrets:

cat > .env <<EOF
JWT_SECRET=$(openssl rand -base64 32)
SESSION_SECRET=$(openssl rand -base64 32)
ENABLE_GPU=false
EOF

3. Start the application

docker compose up -d

That's it! 🎉

📍 Access the Application

Default Credentials

On first run, create an admin account through the web interface.

🔧 Configuration Options

Environment Variables

Edit the .env file or set in docker-compose.yml:

Variable Default Description
PORT 12345 Main application port
JWT_SECRET (required) JWT token secret
SESSION_SECRET (required) Session encryption secret
DISABLE_SIGNUPS true Disable new user registration
ENABLE_GPU false Enable GPU hardware acceleration
MAX_RECORDING_SIZE 100GB Maximum recording storage

Enable GPU Acceleration

For Intel Quick Sync (already configured in compose file):

devices:
  - /dev/dri:/dev/dri

For NVIDIA GPU, uncomment the deploy section in docker-compose.yml:

deploy:
  resources:
    reservations:
      devices:
        - driver: nvidia
          count: 1
          capabilities: [gpu, video]

📊 Management Commands

View Logs

docker compose logs -f streamflow

Stop the Application

docker compose down

Update to Latest Version

docker compose pull
docker compose up -d

Restart the Application

docker compose restart

Backup Data

docker compose down
tar -czf streamflow-backup-$(date +%Y%m%d).tar.gz \
  $(docker volume inspect streamflow_streamflow-data -f '{{.Mountpoint}}')
docker compose up -d

Restore from Backup

docker compose down
tar -xzf streamflow-backup-YYYYMMDD.tar.gz -C /var/lib/docker/volumes/streamflow_streamflow-data/_data/
docker compose up -d

🔒 Security Recommendations

  1. Change Default Secrets: Always set unique JWT_SECRET and SESSION_SECRET
  2. Firewall: Configure firewall to restrict access if exposed to internet
  3. HTTPS: Use reverse proxy (nginx, traefik) with SSL for production
  4. Backups: Regularly backup the streamflow-data volume

Example Nginx Reverse Proxy

server {
    listen 80;
    server_name streamflow.yourdomain.com;
    return 301 https://$server_name$request_uri;
}

server {
    listen 443 ssl http2;
    server_name streamflow.yourdomain.com;
    
    ssl_certificate /etc/letsencrypt/live/streamflow.yourdomain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/streamflow.yourdomain.com/privkey.pem;
    
    location / {
        proxy_pass http://localhost:12345;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

🐛 Troubleshooting

Container won't start

# Check logs
docker compose logs streamflow

# Check if ports are already in use
sudo netstat -tulpn | grep -E '12345|9000'

Permission issues

# Fix volume permissions
docker compose down
docker volume rm streamflow_streamflow-data
docker compose up -d

GPU not working

# Verify device access
ls -la /dev/dri/

# Check if user has access to render group
groups $(whoami)

# Add user to render group if needed
sudo usermod -a -G render $(whoami)

VPN not working

  • Ensure the container runs with privileged: true (already set)
  • Check VPN configuration files are properly uploaded through the web interface
  • Verify sysctls are properly set in docker-compose.yml

📦 System Requirements

Minimum

  • 2 CPU cores
  • 2GB RAM
  • 10GB disk space
  • Docker 20.10+ and Docker Compose V2
  • 4+ CPU cores
  • 4GB+ RAM
  • 50GB+ disk space (for recordings)
  • GPU for hardware acceleration (Intel Quick Sync, NVIDIA)

🌐 Supported Platforms

  • Linux (x86_64, arm64)
  • Windows (via Docker Desktop)
  • macOS (via Docker Desktop)

📚 More Information

📄 License

See the LICENSE file for details.


Need Help? Open an issue on GitHub