IPTV Hosting

Nginx Configuration for IPTV Streaming Servers

Nginx is the backbone of most IPTV streaming setups — lightweight, fast, and capable of handling thousands of concurrent connections. This guide provides production-ready Nginx configurations for IPTV streaming, including HLS delivery, RTMP ingest, VOD serving, and load balancing.

Need this done for your project?

We implement, you ship. Async, documented, done in days.

Start a Brief

Nginx RTMP Module for IPTV

The Nginx RTMP module enables your server to receive and distribute live streams:

# /etc/nginx/nginx.conf — RTMP configuration
rtmp {
    server {
        listen 1935;
        chunk_size 4096;
        
        application live {
            live on;
            record off;
            
            # HLS output
            hls on;
            hls_path /tmp/hls;
            hls_fragment 3;
            hls_playlist_length 60;
            
            # Only allow publishing from trusted IPs
            allow publish 10.0.0.0/8;
            deny publish all;
        }
    }
}

Install with: apt install nginx libnginx-mod-rtmp

HLS Delivery Configuration

Serve HLS streams to IPTV viewers with optimized Nginx HTTP settings:

server {
    listen 80;
    server_name stream.yourdomain.com;
    
    location /hls {
        types {
            application/vnd.apple.mpegurl m3u8;
            video/mp2t ts;
        }
        root /tmp;
        add_header Cache-Control no-cache;
        add_header Access-Control-Allow-Origin *;
        
        # Performance tuning
        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
    }
    
    # VOD content
    location /vod {
        alias /var/www/vod;
        sendfile on;
        tcp_nopush on;
        directio 512;
        aio on;
    }
}

Performance Tuning for IPTV

Optimize Nginx for handling thousands of concurrent IPTV streams:

# /etc/nginx/nginx.conf — worker settings
worker_processes auto;
worker_rlimit_nofile 65535;

events {
    worker_connections 65535;
    use epoll;
    multi_accept on;
}

http {
    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 65;
    keepalive_requests 1000;
    
    # Buffer tuning for streaming
    client_body_buffer_size 128k;
    proxy_buffer_size 128k;
    proxy_buffers 4 256k;
    output_buffers 1 256k;
}

Combined with kernel sysctl tuning, this configuration handles 5,000+ concurrent HLS viewers on a single server.

Deploy Your Nginx IPTV Server

Run your Nginx IPTV streaming server on AnubizHost's offshore infrastructure in Iceland, Romania, and Finland. 10Gbps bandwidth, full root access for custom Nginx builds, DDoS protection, and DMCA-ignored hosting.

Pay with Bitcoin, Monero, Ethereum, or card — no KYC required. Plans from $17.90/month. Pre-installed Nginx with RTMP module available on request.

Why Anubiz Labs

100% async — no calls, no meetings
Delivered in days, not weeks
Full documentation included
Production-grade from day one
Security-first approach
Post-delivery support included

Ready to get started?

Skip the research. Tell us what you need, and we'll scope it, implement it, and hand it back — fully documented and production-ready.

Support Chat

Online