Deploying Restreamer
Introduction
Restreamer is a powerful open-source video streaming server that enables you to stream live video content to multiple platforms simultaneously. Built on FFmpeg, Restreamer provides a user-friendly web interface for managing streams without deep technical knowledge of video encoding.
Key highlights of Restreamer:
- Multi-Platform Streaming: Simultaneously stream to YouTube, Twitch, Facebook, and custom RTMP destinations
- Multiple Input Sources: Accept RTMP, RTSP, HLS, and other video sources
- Web-Based Interface: Easy-to-use GUI for stream management
- HLS Output: Built-in HLS server for web player embedding
- RTMP Server: Integrated RTMP server for receiving streams
- Snapshot API: Generate thumbnails and snapshots from streams
- Player Widget: Embeddable video player for websites
- No Coding Required: Configure everything through the web interface
- Docker Native: Designed for containerized deployment
- Open Source: MIT-licensed with active development
This guide walks through deploying Restreamer on Klutch.sh using Docker and configuring your streaming workflow.
Why Deploy Restreamer on Klutch.sh
Deploying Restreamer on Klutch.sh provides several advantages:
Simplified Deployment: Klutch.sh automatically builds and deploys Restreamer without complex media server configuration.
Persistent Storage: Attach persistent volumes for recordings and configuration that survive container restarts.
HTTPS by Default: Klutch.sh provides automatic SSL certificates for secure stream management.
Always-On Availability: Your streaming server remains available 24/7 for continuous broadcasting.
Scalable Resources: Allocate CPU and memory based on your encoding needs.
Prerequisites
Before deploying Restreamer on Klutch.sh, ensure you have:
- A Klutch.sh account
- A GitHub account with a repository for your Restreamer configuration
- A video source (camera, OBS, or other streaming software)
- (Optional) Streaming platform accounts (YouTube, Twitch, etc.)
Preparing Your Repository
Create a GitHub repository containing your Dockerfile for Restreamer deployment.
Repository Structure
restreamer-deploy/├── Dockerfile└── .dockerignoreCreating the Dockerfile
Create a Dockerfile in the root of your repository:
FROM datarhei/restreamer:latest
# Set environment variablesENV RS_USERNAME=${RS_USERNAME:-admin}ENV RS_PASSWORD=${RS_PASSWORD}ENV RS_API_AUTH_ENABLE=true
# Create data directoryRUN mkdir -p /core/data
# Expose ports# 8080 - HTTP/API# 8181 - HTTPS (if configured)# 1935 - RTMP# 1936 - RTMPS# 6000 - SRTEXPOSE 8080
# The base image includes the default entrypointEnvironment Variables Reference
| Variable | Required | Description |
|---|---|---|
RS_USERNAME | No | Admin username (default: admin) |
RS_PASSWORD | Yes | Admin password |
RS_API_AUTH_ENABLE | No | Enable API authentication (default: true) |
Deploying Restreamer on Klutch.sh
- Select HTTP as the traffic type
- Set the internal port to 8080
Generate a Secure Password
Create a strong password for admin access:
openssl rand -base64 24Push Your Repository to GitHub
Commit and push your Dockerfile 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 “restreamer” or “streaming”.
Create a New App
Within your project, create a new app. Connect your GitHub account and select the repository containing your Restreamer Dockerfile.
Configure HTTP Traffic
In the deployment settings:
Set Environment Variables
Add the following environment variables:
| Variable | Value |
|---|---|
RS_USERNAME | admin |
RS_PASSWORD | Your generated password |
RS_API_AUTH_ENABLE | true |
Attach Persistent Volumes
Add the following volume:
| Mount Path | Recommended Size | Purpose |
|---|---|---|
/core/data | 50 GB | Configuration and recordings |
Deploy Your Application
Click Deploy to start the build process.
Access Restreamer
Once deployment completes, access Restreamer at your app URL and log in with your credentials.
Initial Configuration
Accessing the Interface
- Navigate to your Restreamer URL
- Log in with your admin credentials
- Complete the initial setup wizard
Adding a Video Source
- Click Add Input in the main interface
- Select your input type (RTMP, RTSP, HLS, etc.)
- Configure the source URL or stream key
- Test the connection
Setting Up Stream Outputs
- Click on your input stream
- Add output destinations (YouTube, Twitch, custom RTMP)
- Enter stream keys and URLs for each platform
- Enable simultaneous streaming
Embedding the Player
- Access the player embed code from the interface
- Copy the HTML/JavaScript snippet
- Paste into your website to display the live stream
Streaming Workflow
Using OBS with Restreamer
- In OBS, go to Settings > Stream
- Set Service to Custom
- Enter your Restreamer RTMP URL
- Use the stream key from Restreamer
- Start streaming
Monitoring Streams
- View real-time statistics in the web interface
- Monitor bitrate, frames, and connection status
- Check output health for each destination
Additional Resources
Conclusion
Deploying Restreamer on Klutch.sh gives you a powerful self-hosted streaming server with multi-platform broadcasting capabilities. Whether you’re streaming events, running a 24/7 broadcast, or need a reliable restreaming solution, Restreamer on Klutch.sh provides the infrastructure without the complexity of traditional media server setup.