# How to create your own HTTP streaming server

With your own streaming server, you have complete control over how your content is delivered. Using a web server, this is easy to achieve thanks to the HTTP Live Streaming (HLS) protocol and HTTP streaming.

### Key Takeaways

- HTTP Live Streaming (HLS) splits a stream into small chunks that are delivered over HTTP, so the stream can be embedded in a website.
- Small projects need little hardware; a fast connection in a professional data centre matters most.
- For very low latency, Low-Latency HLS or WebRTC are alternatives.
- The tutorial sets up NGINX with the RTMP module on a Windows server, configures RTMP and HTTP, and opens ports 1935 and 80.
- You send the stream with OBS or FFmpeg and play it on your website with Video.js.

## How does HTTP streaming work?

Originally developed by Apple for its own devices, HTTP Live Streaming (HLS) is now one of the most widely used protocols for streaming audiovisual media on the internet. Because **transmission takes place over HTTP**, one of the core technologies of the internet, HLS works across many devices and platforms. In modern browsers, playback often relies on JavaScript-based players, while some systems, including Apple devices, support HLS natively.

With HLS streaming, the continuous data stream is divided into **small chunks**. The end device downloads these chunks quickly and puts them back together during playback. This enables fast transmission and, in the best case, viewers do not notice that the stream has been split into separate parts. To make sure the video is assembled correctly, HLS also uses an index file. This file tells the end device the order in which the chunks should be played.

This segmentation has another key advantage, which is that the **video quality can be adjusted during playback** without reloading the entire stream. The next chunk is simply loaded in a higher or lower quality, depending on the available connection.

Another major benefit of HLS streaming is that you can **integrate the stream into your own website**. With [HTML5](https://www.ionos.ca/digitalguide/websites/web-development/what-is-html5/), you can embed a suitable player and display the stream directly on your site.

Note In addition to HLS streaming, there is also the [Real Time Messaging Protocol (RTMP)](https://www.ionos.ca/digitalguide/websites/web-development/rtmp/). Although RTMP has become less important in recent years due to the discontinuation of Adobe Flash, it is still relevant for custom streaming setups. You also need the protocol when setting up an HLS server. If you do not want to embed your stream on a website, creating only an [RTMP server](https://www.ionos.ca/digitalguide/server/configuration/create-rtmp-server/) may be a suitable alternative.

## What do you need your own streaming server for?

Streaming is becoming increasingly popular, and not only because of movie and TV platforms like Netflix or Amazon. Private individuals and small businesses are also recognizing the potential of live streaming. For companies, broadcasts can be particularly useful for **product launches**, for example. [Webinars](https://www.ionos.ca/digitalguide/online-marketing/online-sales/webinars-advantages-features-and-possible-uses/) and workshops can also be held via streaming.

Note HTTP Live Streaming was originally developed for broad compatibility, but it usually comes with a comparatively high delay of around 6 to 30 seconds between the live event and playback. This is due to the segment-based transmission used in HTTP streaming. **Low-Latency HLS (LL-HLS)** has since been developed to significantly reduce latency in live streaming, typically to around 2 to 3 seconds, while preserving the broad device and player support associated with HLS.

## What hardware do you need for HLS streaming?

To set up a suitable server solution, you first need to understand the hardware requirements for reliable HLS streaming over HTTP.

### Processor performance (CPU)

If the streaming server is used only to distribute the data stream, you do not need much processing power. For small projects, two cores with around 2 GHz each are usually sufficient. To handle higher demand as your project grows, **4 CPU cores** are recommended.

### Memory (RAM)

RAM is primarily used for caching during streaming. For simple tests or very small projects, 2 GB of RAM and a few CPU cores may be enough. In practice, however, you should plan for significantly higher resources, especially if you expect multiple simultaneous viewers or need transcoding.

### Storage (HDD/SSD)

You need very little storage space for the server files themselves, as a web server is generally lightweight. **10 GB** may already be sufficient. However, fast [SSD storage](https://www.ionos.ca/digitalguide/server/know-how/what-is-ssd/) is recommended to avoid creating a bottleneck. Most storage requirements come from the video files you want to keep on the server. If you record your stream on the server’s hard drive, you will therefore need significantly more storage space.

### Bandwidth

A fast connection is the most important requirement for streaming. To prevent poor image quality or long loading times, the available bandwidth must always be sufficient. The amount of data the server infrastructure needs to transmit depends on the video quality and the number of viewers. A home internet connection is usually not enough, so for reliable HTTP streaming and HLS streaming, you should run your streaming server in a professional data centre.

Note For scenarios where the delay between the live event and playback needs to be especially low, such as video conferences, multiplayer gaming, or interactive streams, WebRTC is often used as an alternative. WebRTC is a **real-time transmission protocol that enables sub-second latencies** but comes with different infrastructure requirements and scaling strategies compared with classic HTTP streaming and HLS streaming.

## How to host an HLS streaming server with IONOS

IONOS offers various server solutions:

- [Dedicated server](https://www.ionos.ca/servers/dedicated-servers "Dedicated server – affordable rental with Windows or Linux – IONOS"): dedicated hardware with AMD or Intel processors and per-minute billing
- [vServer](https://www.ionos.ca/servers/vps "Rent a vServer at a low cost – Windows or Linux – IONOS"): high-performance virtualization for independence and security

The servers differ not only in their specifications, but also in their **billing model**. A vServer comes with fixed monthly costs, while dedicated servers are billed by the minute, so you can decommission them when you no longer need them and stop incurring costs.

## How to set up a streaming server step by step

You can set up your own HTTP Live Streaming server in just a few steps. The required software is freely available on the internet. In this example, we use a Windows server with [NGINX](https://www.ionos.ca/digitalguide/server/configuration/nginx-basics-installation-and-set-up/) software.

Note Modern streaming setups often rely on specialized streaming servers, such as SRS or MediaMTX, or on CDN solutions. The NGINX RTMP setup shown here is mainly suitable for testing, small projects, or learning the basics of HTTP streaming and HLS streaming.

### Step 1: Establish a server connection

To work on your server, you first need to connect to it. With IONOS, log in to your user account and open the Cloud Panel, which you can find in the “Server &amp; Cloud” section. Under “Remote Desktop connection”, you’ll find a download link for the connection file.

On Windows, double-click the downloaded file to open the “Remote Desktop Connection” program. Then enter the **password**, which is also available in the Cloud Panel. A window will open and display the server’s desktop.

[![Image: IONOS Cloud Panel with information about the remote desktop connection](https://www.ionos.ca/digitalguide/fileadmin/_processed_/4/2/csm_ionos-cloud-panel-with-remove-desktop-connection-information_4cad05672d.webp "IONOS Cloud Panel with information about the remote desktop connection")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2022/ionos-cloud-panel-with-remove-desktop-connection-information.png) In the IONOS Cloud Panel, you’ll find information on how to establish a connection to your future streaming server.  Note Even if you don’t use a Windows PC, you can of course establish a connection to the server. However, you may need additional [remote desktop software](https://www.ionos.ca/digitalguide/server/know-how/remote-desktop-software/). On Linux systems such as [Ubuntu 24.04, you can also establish an SSH connection](https://www.ionos.ca/digitalguide/server/configuration/ubuntu-2404-ssh/).

### Step 2: Install NGINX

For HTTP streaming, you use a standard web server based on NGINX. Since the default version of NGINX does not include the [RTMP module](https://docs.nginx.com/nginx/admin-guide/dynamic-modules/rtmp/ "RTMP module in the NGINX docs") required for streaming, you either need a specially preconfigured NGINX version with an integrated RTMP module or you must compile the module yourself. Alternatively, you can use ready-made Windows builds that already include RTMP.

Unpack the software package to a location of your choice. Then open the Windows **Command Prompt** or [Windows PowerShell](https://www.ionos.ca/digitalguide/server/know-how/windows-powershell/) and navigate to the newly created NGINX folder. Start the web server with the following command:

```batch
start nginx
```

You won’t notice any changes at first. To check whether the server is running, **open your own IP address in a browser**. You should then see a message from the web server. At this stage, only the web server itself is active. The streaming functionality is only enabled by the configuration in the next step.

### Step 3: Adjust the configuration

In the next step, adjust the web server configuration. In the corresponding folder, you should find the `nginx.conf` file. Add the following **RTMP section** at the end of the file:

```nginx
rtmp {
server {
listen 1935;
chunk_size 4000;
application show {
live on;
hls on;
hls_path C:/nginx/hls/;
hls_fragment 3;
hls_playlist_length 60;
deny play all;
}
}
}
```

Note On Windows, make sure the specified path actually exists and can be written to. As shown in the example above, use forward slashes (/) instead of backslashes (\) and adjust the path to match your installation directory.

You can choose the path for your HLS stream yourself. The name of the application (here show) is also entirely up to you. The only important thing is that you continue to use this configuration consistently in other places.

You also need to extend the existing **HTTP settings** in the already present `http {}` block of the configuration file:

```nginx
http {
include       mime.types;
default_type  application/octet-stream;
sendfile        off;
server_names_hash_bucket_size 128;
## Start: Timeouts ##
client_body_timeout   10;
client_header_timeout 10;
keepalive_timeout     30;
send_timeout          10;
keepalive_requests    10;
## End: Timeouts ##
server {
listen       80;
server_name  localhost;
location /hls {
add_header Cache-Control no-cache;
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain; charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
root /nginx/;
}
}
}
```

Note Make sure you do not create a second http {} block. NGINX configuration files usually include this section by default. You only need to add or adjust the settings shown above within the existing block.

Save the file and **restart the web server**. The easiest way to do this is to stop the NGINX process or processes in Task Manager and then start the server again using the command.

### Step 4: Open the port

To make your stream accessible, you need to open the required ports. With IONOS, you can do this in the Cloud Panel. In the firewall settings under “Network”, create a new entry and **open TCP port 1935**. For HTTP streaming, you should also open port 80 if it is not already open on your server. These are the same two ports you previously entered in the NGINX configuration file.

[![Image: Open port in the IONOS Cloud Panel](https://www.ionos.ca/digitalguide/fileadmin/_processed_/1/1/csm_port-sharing-in-ionos-cloud-panel_656bfaa47a.webp "Open port in the IONOS Cloud Panel")](https://www.ionos.ca/digitalguide/fileadmin/DigitalGuide/Screenshots_2022/port-sharing-in-ionos-cloud-panel.png) Open the corresponding ports so that the transmission can work. ### Step 5: Start HTTP Live Streaming

For a live stream, you also need suitable software. A popular choice among streamers is [Open Broadcaster Software (OBS)](https://obsproject.com "OBS website"). There, you enter the server address and a **stream key**:

```text
Server:
rtmp://<IP address>/show

Stream key:
test
```

At this point, enter the server’s IP address. IONOS customers can find it in the Cloud Panel, for example. For testing, you can also enter localhost instead of the IP address. The stream key you choose also determines the name of the generated HLS streaming files. In this example, the stream is available at /hls/test.m3u8.

Note In many streaming tools, the server address is entered separately from the stream key. Make sure you configure both correctly.

In addition to tools like OBS, you can also send your stream directly to the server with FFmpeg. FFmpeg handles both the encoding and the transmission of the video stream. This is especially useful if you:

- want to create automated streams
- want to process your own video sources
- want to generate multiple quality levels

A simple example:

```bash
ffmpeg -re -i input.mp4 -c:v libx264 -c:a aac -f flv rtmp://<IP address>/show/test
```

The input video is converted into a format suitable for streaming and then sent to the RTMP server.

### Step 6: Embed the stream on your website

You can now access your stream with a media player such as [VLC](https://www.videolan.org/vlc/index.en_GB.html "VLC website"). However, HLS streaming also lets you **make the stream available through a website**. To do this, adapt an existing website or create a new HTML document. The NGINX web server already includes an HTML document called `index.html`. Add the following source code there:

```html

<html>
<head>
<meta charset="utf-8">
<title>HLS</title>
<link href="js/video-js.css" rel="stylesheet">
<script src="js/video.min.js"></script>
</head>
<body>
<div style="text-align: center;">
<video-js id="live_stream" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="auto" autoplay width="1280" height="720" poster="/poster.jpg">
<source src="/hls/test.m3u8" type="application/x-mpegURL">
<p class="vjs-no-js">
To view this video please enable JavaScript, and consider upgrading to a web browser that
<a href="https://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
</p>
</video-js>

<script>
var player = videojs('live_stream');
player.play();
</script>
</div>

</body>
</html>
```

This basic website only displays the [Video.js](https://videojs.com/ "Video.js project website") player with your stream. If you want to make the stream available to other users, you should add more content and improve the design, for example with CSS. Alternatively, you can integrate this section into an existing, well-designed website. The important point is that the path to the video files is correct, for example: &lt;source src="/hls/test.m3u8" type="application/x-mpegURL"&gt;. If you rename folders or files, you also need to update the path here.

For the player to work, you also need **the Video.js files `video.min.js` and `video-js.css`**. You can find them in the release package of [Video.js 8](https://github.com/videojs/video.js/releases/tag/v8.24.0 "Video.js 8 release on GitHub") (the code shown here is for Video.js 8, not for the newer Video.js 10). Place them in a subfolder named `js` in the same directory as the HTML document. The website will then display a video player with your stream.


This is a markdown version of: [https://www.ionos.ca/digitalguide/server/know-how/create-http-live-streaming-server/](https://www.ionos.ca/digitalguide/server/know-how/create-http-live-streaming-server/) for AI/LLM consumption.