Back to articles
Technology Insight

Turn Your VPS into a Professional Real-Time Audio Streaming & Transcoding Server for Online Radio with OwnCast

May 26, 2026

Introduction: The Shift to Independent Audio Broadcasting

In the digital broadcasting landscape, relying solely on third-party streaming platforms presents significant challenges. Content creators, online radio stations, and businesses frequently face monetization restrictions, sudden algorithmic shifts, and escalating subscription fees. For professionals seeking absolute control over their audio distribution, infrastructure, and audience data, self-hosting is no longer just an alternative—it is a strategic necessity.

By deploying OwnCast on a Virtual Private Server (VPS), you can transform standard cloud infrastructure into a high-performance, real-time audio streaming and transcoding server. This guide provides a comprehensive, production-ready roadmap to setting up your own independent broadcasting station, ensuring low latency, automated transcoding, and a seamless listener experience.

Here is an architectural overview of how audio flows through your self-hosted setup:

---

Why OwnCast is the Ideal Solution for Online Radio

While OwnCast is widely recognized for video streaming, its underlying architecture—built on top of FFmpeg and utilizing HLS (HTTP Live Streaming)—makes it an exceptionally robust engine for high-fidelity audio broadcasting. Here is why it stands out for enterprise and professional radio deployment:

  • Full Ownership and Data Privacy: You retain complete ownership of your content, listener analytics, and user data, fully compliant with modern data protection standards.
  • Real-Time Dynamic Transcoding: OwnCast can ingest a single high-quality audio stream and automatically transcode it into multiple bitrates simultaneously, catering to users on low-bandwidth mobile networks as well as high-fidelity home setups.
  • Modern Web Interface: It provides a built-in, customizable web player alongside an integrated real-time chat feature to foster community engagement directly on your domain.
  • Extensive API Support: Seamlessly integrate your stream with external mobile applications, web directories, and automated scheduling systems.
---

Prerequisites and System Architecture

Before initiating the installation process, ensure your infrastructure meets the following baseline technical specifications to guarantee stable, uninterrupted uptime:

1. Hardware Requirements

  • CPU: Minimum 2 vCPUs (Compute-optimized instances are preferred, as audio transcoding is highly CPU-bound).
  • RAM: 2GB minimum (4GB or higher recommended if you plan to enable multiple output bitrates or handle high concurrent traffic).
  • Storage: 20GB of SSD/NVMe storage (HLS relies on generating small audio segments that are continuously written and deleted).
  • Network: 1 Gbps port with unmetered bandwidth or a high data cap (e.g., 2TB+ monthly transfer).

2. Software Environment

  • Operating System: Ubuntu 22.04 LTS or Ubuntu 24.04 LTS.
  • Domain Name: A registered domain (e.g., radio.yourdomain.com) with A/AAAA records pointed to your VPS IP address.
  • SSL Certificate: Let's Encrypt TLS certificate for secure, encrypted HTTPS streaming.
---

Step-by-Step Deployment Guide

Step 1: System Preparation and FFmpeg Installation

First, access your VPS via SSH and update the system packages to their latest versions. Next, install ffmpeg, which serves as the core processing engine for media handling.

sudo apt update && sudo apt upgrade -y
sudo apt install ffmpeg curl ufw -y

Verify the installation of FFmpeg by checking its version:

ffmpeg -version

Step 2: Installing OwnCast

The most efficient way to install OwnCast on a production server is using the official automated installation script, which securely downloads and configures the latest stable binary.

curl -s [https://owncast.online/install.sh](https://owncast.online/install.sh) | bash

Once installed, create a dedicated system user to run the service securely, minimizing security risks associated with running applications as the root user.

sudo useradd -m -r -s /bin/false owncast
sudo mv owncast /opt/owncast
sudo chown -R owncast:owncast /opt/owncast

Step 3: Configuring the Systemd Service

To ensure OwnCast runs continuously in the background and automatically restarts upon server reboots, configure a systemd service file.

sudo nano /etc/systemd/system/owncast.service

Paste the following production configuration into the file:

[Unit]
Description=OwnCast Streaming Server
After=network.target

[Service]
Type=simple
User=owncast
Group=owncast
WorkingDirectory=/opt/owncast
ExecStart=/opt/owncast/owncast
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

Save and close the file, then enable and start the service:

sudo systemctl daemon-reload
sudo systemctl enable owncast
sudo systemctl start owncast
---

Optimizing OwnCast Specifically for Professional Audio

By default, OwnCast is pre-configured for video streaming. To optimize it strictly for high-fidelity audio broadcasting, navigate to the admin dashboard at http://your_vps_ip:8080/admin (default credentials can be found in the logs) and apply the following modifications under the Video Settings tab:

1. Stream Latency and Segment Configuration

Because audio files consume significantly less bandwidth than video, we can optimize for ultra-low latency without risking stream buffering:

  • Segment Length: Set to 1 or 2 seconds (Default is 4). This guarantees rapid playback start times and near-instantaneous real-time chat synchronization.
  • Buffer Length: Set to 3 to 5 segments to maintain a balance between stability and minimal delay.

2. Multi-Bitrate Audio Transcoding Matrix

Configure your streaming profiles to accommodate different listener environments. Disable video processing entirely by setting the video bitrate to 0 or choosing an audio-only output profile, then configure the following audio variants:

Profile NameAudio BitrateSample RateTarget Audience / Use Case
High-Fidelity (Hi-Fi)320 kbps48 kHzStudio quality, desktop users, high-speed Wi-Fi
Standard Radio128 kbps44.1 kHzStandard mobile streaming, balanced data usage
Low Data / Mobile64 kbps44.1 kHzPoor connectivity, commuters, minimal bandwidth usage
---

Securing the Server with Nginx and SSL

Running a professional station requires exposing your stream over standard port 80 (HTTP) and port 443 (HTTPS) to bypass restrictive corporate firewalls and ensure browser compatibility.

1. Configure Nginx Reverse Proxy

Install Nginx to act as a reverse proxy in front of the OwnCast service:

sudo apt install nginx -y
sudo nano /etc/nginx/sites-available/owncast

Insert the configuration block below, replacing radio.yourdomain.com with your actual domain name:

server {
    listen 80;
    server_name radio.yourdomain.com;

    location / {
        proxy_pass [http://127.0.0.1:8080](http://127.0.0.1:8080);
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

Enable the site configuration and restart Nginx:

sudo ln -s /etc/nginx/sites-available/owncast /etc/nginx/sites-enabled/
sudo systemctl restart nginx

2. Obtain an SSL Certificate

Secure the stream using Certbot to automatically fetch and manage Let's Encrypt TLS certificates:

sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d radio.yourdomain.com
---

Connecting Your Broadcasting Software (OBS / Butt / Mixxx)

With your VPS fully configured, you can now push your live audio feed to the server. OwnCast accepts inbound streams via the standard RTMP protocol.

  1. Retrieve your Stream Key from the OwnCast Admin Dashboard under Stream Settings.
  2. Open your preferred broadcasting software (such as OBS Studio, Butt (Broadcast Using This Tool), or Mixxx).
  3. Set the Stream Type to Custom Streaming Server.
  4. Enter your Server URL: rtmp://[radio.yourdomain.com/live](https://radio.yourdomain.com/live) (or use the VPS IP if DNS hasn't propagated).
  5. Input your unique Stream Key and initiate the broadcast.

OwnCast will instantly ingest the RTMP stream, run it through the FFmpeg transcoding matrix you defined, and distribute the audio segments globally via HTTPS HLS to your listeners.

---

Conclusion and Performance Monitoring

You have successfully established a self-hosted, professional-grade Real-Time Audio Streaming & Transcoding Server on your VPS using OwnCast. This infrastructure gives you complete autonomy over your brand, layout, and data, without ongoing licensing or platform fees.

To maintain peak performance, monitor your CPU utilization regularly during peak listening hours using tools like htop. If your listener base expands significantly or you add more transcoding qualities, consider utilizing an external Object Storage solution (like Amazon S3 or DigitalOcean Spaces) to offload the HLS audio segments, thereby reducing local disk I/O and freeing up your VPS entirely for processing power.

Turn Your VPS into a Professional Real-Time Audio Streaming & Transcoding Server for Online Radio with OwnCast | DPTCloud