6.7 KiB
6.7 KiB
StreamFlow IPTV - Setup Guide
System Requirements
- Operating System: Linux, macOS, or Windows with WSL2
- Docker: Version 20.10 or higher
- Docker Compose: Version 2.0 or higher
- RAM: Minimum 2GB (4GB recommended)
- Storage: Minimum 10GB free space
- Ports: Port 12345 must be available
Installation Steps
1. Prerequisites Installation
Install Docker on Linux (Ubuntu/Debian)
# Update package index
sudo apt-get update
# Install required packages
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg lsb-release
# Add Docker's official GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
# Set up stable repository
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# Install Docker Engine
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
# Add your user to docker group
sudo usermod -aG docker $USER
# Log out and back in for group changes to take effect
2. Clone or Navigate to Project
cd /home/iulian/projects/tv
3. Configure Environment Variables
# Copy the example environment file
cp .env.example .env
# Edit the .env file with your preferred text editor
nano .env # or vim, code, etc.
Important: Change these values in production:
JWT_SECRET: Use a strong, random string (at least 32 characters)SESSION_SECRET: Use a different strong, random string
Generate secure secrets:
# Generate random secrets
openssl rand -base64 32
4. Build and Start the Application
Option A: Using the provided script (Recommended)
chmod +x start.sh
./start.sh
Option B: Using Docker Compose directly
docker-compose build
docker-compose up -d
Option C: Using npm scripts
npm run docker:build
npm run docker:up
5. Verify Installation
Check if containers are running:
docker-compose ps
Expected output:
NAME IMAGE STATUS PORTS
streamflow-app streamflow:latest Up X minutes 0.0.0.0:12345->12345/tcp
Check application health:
curl http://localhost:12345/api/health
Expected response:
{"status":"ok","timestamp":"2024-XX-XXTXX:XX:XX.XXXZ"}
6. Access the Application
Open your web browser and navigate to:
http://localhost:12345
Or if accessing remotely:
http://YOUR_SERVER_IP:12345
7. Create Your First User Account
- Click on "Sign Up" or "Register"
- Fill in your details:
- Username (alphanumeric, 3-50 characters)
- Email (valid email address)
- Password (minimum 8 characters)
- Click "Sign Up"
- You'll be automatically logged in
Post-Installation Configuration
Adding IPTV Playlists
- Log in to the application
- Navigate to Settings or use the sidebar
- Choose one of these methods:
- Upload M3U File: Click "Upload M3U" and select your file
- Add URL: Click "Add Playlist URL" and enter the M3U URL
- With Authentication: Include username and password if required
Supported Playlist Formats
- M3U files (
.m3u) - M3U8 files (
.m3u8) - HTTP/HTTPS URLs pointing to M3U playlists
- Authentication-protected playlists
Example M3U Format
#EXTM3U
#EXTINF:-1 tvg-id="bbc1" tvg-name="BBC One" tvg-logo="http://example.com/logo.png" group-title="News",BBC One
http://example.com/stream/bbc1
#EXTINF:-1 tvg-id="cnn" tvg-name="CNN" tvg-logo="http://example.com/cnn.png" group-title="News",CNN
http://example.com/stream/cnn
Managing the Application
View Logs
# All logs
docker-compose logs -f
# Specific service logs
docker-compose logs -f streamflow
Stop the Application
./stop.sh
# or
docker-compose down
Restart the Application
docker-compose restart
Update the Application
# Pull latest changes
git pull
# Rebuild and restart
docker-compose down
docker-compose build
docker-compose up -d
Backup and Restore
Backup Data
# Backup database and uploaded files
docker run --rm \
-v streamflow-data:/data \
-v $(pwd)/backup:/backup \
alpine tar czf /backup/streamflow-backup-$(date +%Y%m%d).tar.gz /data
Restore Data
# Restore from backup
docker run --rm \
-v streamflow-data:/data \
-v $(pwd)/backup:/backup \
alpine tar xzf /backup/streamflow-backup-YYYYMMDD.tar.gz -C /
Troubleshooting
Port Already in Use
If port 12345 is already in use:
- Edit
docker-compose.yml - Change the port mapping:
ports: - "8080:12345" # Change 8080 to any available port - Restart the application
Container Won't Start
Check logs:
docker-compose logs
Common issues:
- Permissions: Ensure Docker has proper permissions
- Port conflicts: Check if port 12345 is already in use
- Disk space: Ensure sufficient disk space
Cannot Connect to Application
- Verify container is running:
docker-compose ps - Check firewall settings
- Verify port 12345 is open:
sudo ufw allow 12345/tcp # Ubuntu/Debian
Database Issues
Reset database (WARNING: This deletes all data):
docker-compose down -v
docker-compose up -d
Security Recommendations
- Change Default Secrets: Update JWT_SECRET and SESSION_SECRET in
.env - Use HTTPS: Deploy behind a reverse proxy (nginx, Caddy) with SSL
- Firewall: Restrict access to port 12345 to trusted IPs
- Regular Updates: Keep Docker and the application updated
- Strong Passwords: Use strong passwords for user accounts
- Backup Regularly: Implement regular backup schedule
Performance Tuning
Increase Recording Storage
Edit .env:
MAX_RECORDING_SIZE=50GB
Adjust EPG Update Interval
Edit .env:
EPG_UPDATE_INTERVAL=7200000 # 2 hours in milliseconds
Docker Resource Limits
Edit docker-compose.yml:
services:
streamflow:
deploy:
resources:
limits:
cpus: '2'
memory: 2G
reservations:
memory: 512M
Support
For issues and questions:
- Check the logs:
docker-compose logs -f - Review this documentation
- Check GitHub issues (if applicable)
- Contact the development team
Next Steps
After successful installation:
- ✅ Add your IPTV playlists
- ✅ Configure EPG sources
- ✅ Set up user profiles
- ✅ Customize theme and language preferences
- ✅ Explore features like recording, favorites, and groups
Enjoy streaming with StreamFlow! 🎬