How to Set Up an OBS RTMP Server in 2025: The Complete Guide

A comprehensive guide for developers on deploying a private OBS RTMP server in 2025. Covers setup, configuration, plugins, security, and troubleshooting.

Introduction to OBS RTMP Server

Live streaming

has become an essential part of content creation and digital events in 2025. OBS Studio stands out as one of the most popular open-source solutions for streaming and recording. But while many streamers use public platforms, there are significant advantages to running your own OBS RTMP server. An RTMP server acts as a hub for ingesting, managing, and distributing your live streams. With a private RTMP server, you gain full control, enhanced privacy, and the flexibility to stream to multiple platforms simultaneously. In this guide, we'll walk you through everything you need to know about setting up and optimizing an OBS RTMP server for your streaming needs.

Understanding RTMP and Its Role in OBS Studio

What is RTMP?

The Real-Time Messaging Protocol (RTMP) is a streaming protocol originally developed by Macromedia (now Adobe) for high-performance transmission of video, audio, and data between a server and client. OBS Studio leverages RTMP to deliver live video feeds to streaming platforms or your own private RTMP server. If you're looking to build more interactive experiences, integrating a

Live Streaming API SDK

can further enhance your streaming capabilities.

How OBS Studio Uses RTMP for Streaming

When you start a stream in OBS Studio, the software encodes your video/audio and pushes it to an RTMP server endpoint. This is typically a public service (like YouTube Live or Twitch) or, for more control, your own private OBS RTMP server. The server then distributes the live feed to viewers or other platforms. For those interested in adding real-time communication features, you might consider leveraging a

Video Calling API

alongside your streaming setup.

RTMP vs Other Streaming Protocols (HLS, RTSP)

  • RTMP: Low latency, suitable for real-time streaming, but not natively supported in browsers without plugins.
  • HLS: Higher latency, but widely supported in browsers and devices. Good for large audiences.
  • RTSP: Common in IP cameras, not widely used for large-scale streaming to the public.
If you're developing for mobile, exploring

webrtc android

can help you enable real-time streaming and communication on Android devices.

RTMP Workflow Diagram

Diagram

Benefits of Setting Up Your Own OBS RTMP Server

  • Full Control: You dictate stream quality, access, and distribution. No third-party platform restrictions.
  • Multi-Streaming: Simultaneously relay your live stream to multiple destinations (YouTube, Twitch, Facebook, etc.) using a single OBS RTMP server.
  • Security & Privacy: Keep your streams private or restrict access as needed. Avoid leaking stream keys or data to public services.
  • Efficiency: Reduce bandwidth by uploading your stream once to your server, which then redistributes it to multiple platforms.
  • Customization: Integrate open source streaming tools and tailor your workflow for unique projects (e.g., remote contribution, custom overlays). For those building cross-platform apps,

    flutter webrtc

    is a great option to add real-time video streaming to your workflow.

Server Requirements and Preparation

Hardware and Bandwidth Needs

  • CPU: Modern dual-core or better (for simple relay); quad-core+ for transcoding or multi-streaming.
  • RAM: Minimum 2GB (4GB+ recommended for heavy use).
  • Bandwidth: Upload speed must be at least the sum of all outgoing streams (e.g., streaming 1080p @ 6 Mbps to 3 platforms requires 18 Mbps upload).
If you are seeking a

jitsi alternative

for more scalable and customizable video conferencing or streaming, setting up your own RTMP server is a flexible solution.

Choosing a Server

  • VPS/Cloud (recommended): Scalable, reliable, accessible from anywhere.
  • Raspberry Pi: Suitable for lightweight, local streaming or experimentation.
  • Local Machine: Good for closed networks or testing.
For developers working with React, integrating a

react video call

solution can complement your RTMP server for interactive live events.
Ubuntu is widely supported, stable, and has extensive documentation for media streaming and nginx-rtmp-module setup.

Environment Setup Diagram

Diagram

Step-by-Step: Setting Up an OBS RTMP Server with Nginx

1. Install Nginx with the RTMP Module

First, update your Ubuntu server and install dependencies:
1sudo apt update && sudo apt upgrade -y
2sudo apt install build-essential libpcre3 libpcre3-dev libssl-dev zlib1g-dev -y
3
Download and compile Nginx with the nginx-rtmp-module:
1wget http://nginx.org/download/nginx-1.25.3.tar.gz
2wget https://github.com/arut/nginx-rtmp-module/archive/refs/heads/master.zip
3unzip master.zip
4 tar zxvf nginx-1.25.3.tar.gz
5cd nginx-1.25.3
6./configure --with-http_ssl_module --add-module=../nginx-rtmp-module-master
7make
8sudo make install
9

2. Configure nginx.conf for RTMP

Edit /usr/local/nginx/conf/nginx.conf and add an RTMP block:
1rtmp {
2  server {
3    listen 1935;
4    chunk_size 4096;
5    application live {
6      live on;
7      record off;
8      allow publish all;
9      allow play all;
10    }
11  }
12}
13
Restart Nginx:
1sudo /usr/local/nginx/sbin/nginx -s stop
2sudo /usr/local/nginx/sbin/nginx
3

3. Firewall and Network Settings

Allow TCP port 1935 (RTMP) on your server:
1sudo ufw allow 1935/tcp
2

4. Testing Your RTMP Server

Test the RTMP endpoint with ffmpeg or OBS Studio. Example using ffmpeg:
1ffmpeg -re -i sample.mp4 -c copy -f flv rtmp://your-server-ip/live/streamkey
2
Monitor logs for issues:
1tail -f /usr/local/nginx/logs/error.log
2
If you want to quickly add video calling to your web app, you can

embed video calling sdk

solutions for seamless integration.

5. Common Pitfalls and Troubleshooting

  • Check firewall and NAT settings if you cannot connect
  • Ensure nginx is running and listening on port 1935
  • Use correct stream keys and application names
  • For transcoding or heavy multi-streaming, monitor CPU/RAM usage

Configuring OBS Studio to Stream to Your RTMP Server

  1. Go to Settings > Stream in OBS Studio.
  2. Set Service: Choose "Custom..."
  3. Server URL: rtmp://your-server-ip/live
  4. Stream Key: Any string (e.g., streamkey).
Recommended OBS Output Settings:
  • Video Bitrate: 3500-6000 Kbps (1080p)
  • Encoder: Hardware (NVENC/AMD) if available
  • Keyframe Interval: 2 seconds
  • Audio Bitrate: 128-192 Kbps
If you want to add interactive features like real-time video chat, consider integrating a

Video Calling API

for a more engaging broadcast experience.
Multi-RTMP Streaming:

Advanced Use Cases and Plugins

  • Multi-RTMP Plugin: obs-multi-rtmp lets you stream to several platforms at once from one OBS instance. Configure multiple destinations with unique stream keys and URLs.
  • obs-rtspserver Plugin: Allows OBS to act as an RTSP server, enabling low-latency streaming for LAN or remote contribution workflows.
  • Use Cases:
    • Multi-camera productions (each camera streams to the RTMP server)
    • Remote contributors sending feeds to a central OBS RTMP server
    • Restreaming: distribute one stream to many endpoints efficiently

Security Best Practices for Your OBS RTMP Server

  • Restrict Stream Keys: Only allow known keys to publish. Update nginx.conf with allow publish and deny publish rules.
  • Firewall: Only open necessary ports; limit access to known IPs if possible.
  • Monitoring: Regularly check logs and usage for unauthorized access or problems.
  • Encryption: Use SSL/TLS for control interfaces; consider stunnel for RTMP over SSL if needed.

Troubleshooting Common OBS RTMP Server Issues

  • Stream Disconnects: Often caused by network instability, insufficient bandwidth, or server overload.
  • Performance Issues: Check server CPU/RAM; lower bitrate/resolution if needed.
  • Authentication Errors: Ensure stream key and URL are correct; review nginx logs for clues.
  • Firewall Blocks: Confirm port 1935 is open and not filtered by upstream firewalls.

Conclusion: Is an OBS RTMP Server Right for You?

Building your own OBS RTMP server lets you take charge of your streaming workflow, privacy, and flexibility. Whether you're a developer, educator, or content creator, a private RTMP server can be a powerful tool for multi-platform streaming and custom workflows. If you value control, scalability, and security, deploying an OBS RTMP server in 2025 is a smart investment in your streaming infrastructure. Ready to get started?

Try it for free

and explore the possibilities for your next live event.

Get 10,000 Free Minutes Every Months

No credit card required to start.

Want to level-up your learning? Subscribe now

Subscribe to our newsletter for more tech based insights

FAQ