Skip to content

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
└── .dockerignore

Creating the Dockerfile

Create a Dockerfile in the root of your repository:

FROM datarhei/restreamer:latest
# Set environment variables
ENV RS_USERNAME=${RS_USERNAME:-admin}
ENV RS_PASSWORD=${RS_PASSWORD}
ENV RS_API_AUTH_ENABLE=true
# Create data directory
RUN mkdir -p /core/data
# Expose ports
# 8080 - HTTP/API
# 8181 - HTTPS (if configured)
# 1935 - RTMP
# 1936 - RTMPS
# 6000 - SRT
EXPOSE 8080
# The base image includes the default entrypoint

Environment Variables Reference

VariableRequiredDescription
RS_USERNAMENoAdmin username (default: admin)
RS_PASSWORDYesAdmin password
RS_API_AUTH_ENABLENoEnable API authentication (default: true)

Deploying Restreamer on Klutch.sh

    Generate a Secure Password

    Create a strong password for admin access:

    Terminal window
    openssl rand -base64 24

    Push 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:

    • Select HTTP as the traffic type
    • Set the internal port to 8080

    Set Environment Variables

    Add the following environment variables:

    VariableValue
    RS_USERNAMEadmin
    RS_PASSWORDYour generated password
    RS_API_AUTH_ENABLEtrue

    Attach Persistent Volumes

    Add the following volume:

    Mount PathRecommended SizePurpose
    /core/data50 GBConfiguration 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

  1. Navigate to your Restreamer URL
  2. Log in with your admin credentials
  3. Complete the initial setup wizard

Adding a Video Source

  1. Click Add Input in the main interface
  2. Select your input type (RTMP, RTSP, HLS, etc.)
  3. Configure the source URL or stream key
  4. Test the connection

Setting Up Stream Outputs

  1. Click on your input stream
  2. Add output destinations (YouTube, Twitch, custom RTMP)
  3. Enter stream keys and URLs for each platform
  4. Enable simultaneous streaming

Embedding the Player

  1. Access the player embed code from the interface
  2. Copy the HTML/JavaScript snippet
  3. Paste into your website to display the live stream

Streaming Workflow

Using OBS with Restreamer

  1. In OBS, go to Settings > Stream
  2. Set Service to Custom
  3. Enter your Restreamer RTMP URL
  4. Use the stream key from Restreamer
  5. 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.