Deploying Rygel
Introduction
Rygel is a home media solution that allows you to stream your media to various UPnP (Universal Plug and Play) and DLNA (Digital Living Network Alliance) compatible devices. Part of the GNOME project, Rygel acts as both a MediaServer (sharing content) and MediaRenderer (receiving content) in your network.
Key highlights of Rygel:
- UPnP/DLNA Support: Compatible with a wide range of devices
- MediaServer: Share music, videos, and photos to network devices
- MediaRenderer: Receive and play content from other sources
- Transcoding: On-the-fly format conversion for device compatibility
- Plugin Architecture: Extensible with various media sources
- GStreamer Backend: Powerful media processing
- Tracker Integration: Index and search your media library
- Low Resource Usage: Lightweight daemon suitable for embedded devices
- GNOME Integration: Works seamlessly with GNOME desktop
- Open Source: LGPL licensed
This guide walks through deploying Rygel on Klutch.sh using Docker for media streaming.
Why Deploy Rygel on Klutch.sh
Deploying Rygel on Klutch.sh provides several advantages:
Simplified Deployment: Klutch.sh automatically builds and deploys Rygel without complex UPnP configuration.
Persistent Storage: Attach persistent volumes for your media library that survives container restarts.
Always-On Availability: Your media server remains available 24/7.
Centralized Media: Accessible media server for your network devices.
Prerequisites
Before deploying Rygel on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your Rygel configuration
- Media files to serve (music, videos, photos)
- DLNA-compatible devices on your network
- Basic familiarity with Docker
Preparing Your Repository
Create a GitHub repository containing your Dockerfile for Rygel deployment.
Repository Structure
rygel-deploy/├── Dockerfile├── rygel.conf└── .dockerignoreCreating the Dockerfile
Create a Dockerfile in the root of your repository:
FROM debian:bookworm-slim
# Install Rygel and dependenciesRUN apt-get update && apt-get install -y \ rygel \ rygel-playbin \ rygel-tracker \ gstreamer1.0-plugins-good \ gstreamer1.0-plugins-bad \ gstreamer1.0-plugins-ugly \ gstreamer1.0-libav \ && rm -rf /var/lib/apt/lists/*
# Create media directoryRUN mkdir -p /media
# Copy configurationCOPY rygel.conf /etc/rygel.conf
# Expose UPnP portsEXPOSE 8200
# Start RygelCMD ["rygel", "--config=/etc/rygel.conf"]Creating rygel.conf
Create a rygel.conf configuration file:
[General]upnp-enabled=trueport=8200interface=*log-level=*:4
[MediaExport]enabled=trueuris=/mediaextract-metadata=truemonitor-changes=true
[Playbin]enabled=true
[Tracker]enabled=falseEnvironment Variables Reference
| Variable | Required | Description |
|---|---|---|
RYGEL_PORT | No | UPnP port (default: 8200) |
Deploying Rygel on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 8200
Push Your Repository to GitHub
Commit and push your Dockerfile and configuration to GitHub.
Create a New Project on Klutch.sh
Navigate to the Klutch.sh dashboard and create a new project with a descriptive name like “rygel” or “media-server”.
Create a New App
Within your project, create a new app. Connect your GitHub account and select the repository containing your Rygel Dockerfile.
Configure HTTP Traffic
In the deployment settings:
Attach Persistent Volumes
Add the following volume:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/media | 100+ GB | Your media library |
Deploy Your Application
Click Deploy to start the build process.
Upload Media
Once deployed, upload your media files to the /media volume.
Configuration
Media Organization
Organize your media in the /media directory:
/media/├── Music/│ ├── Artist1/│ │ └── Album1/│ │ └── track.mp3├── Videos/│ └── Movie.mp4└── Photos/ └── vacation.jpgEnabling Plugins
Edit rygel.conf to enable/disable plugins:
- MediaExport: Serve local files (recommended)
- Playbin: Render received media
- Tracker: Use GNOME Tracker for indexing
Transcoding Settings
Configure transcoding for device compatibility:
[MediaExport]include-filter=*.mp3;*.mp4;*.mkv;*.jpg;*.pngConnecting Devices
Smart TVs
- Ensure TV and Rygel are on the same network
- Open TV’s media browser or DLNA app
- Look for Rygel in the list of media servers
- Browse and play your content
Media Players
Compatible players include:
- VLC (via UPnP)
- Kodi
- Windows Media Player
- Various mobile apps
Streaming
- Select content from the Rygel server
- Play on the device
- Rygel handles transcoding if needed
Limitations
- UPnP discovery requires network broadcast access
- Some cloud deployments may have limited UPnP functionality
- Consider VPN for remote access scenarios
Additional Resources
Conclusion
Deploying Rygel on Klutch.sh gives you a UPnP/DLNA media server with automatic builds and persistent storage for your media library. While UPnP works best on local networks, Rygel on Klutch.sh provides a centralized media server that can stream to compatible devices with proper network configuration.