How to install Niostreamer in Docker on CentOS
In this article we will describe how to get started with niostreamer. We will show how to run Niostreamer in Docker container in CentOS operation system.
Docker is the easiest way to try Niostreamer in action.
In this post we will show how to install Niostreamer server to use RTMP, RTSP or HLS streaming capabilities in Docker.
Setup you repository first. Install
yum-utils package and setup DOcker stable repository.
sudo yum install -y yum-utils
sudo yum-config-manager \
Install latest version of Docker engine amd containerd:
sudo yum install docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
Ensure Docker is installed correctly by running the example:
sudo docker run hello-world
Niostreamer has it's official Docker repository located here: https://hub.docker.com/r/niostreamer/niostreamer
Download niostreamer image:
sudo docker pull niostreamer/niostreamer
Prepare docker-compose file. Niostreamer is standalone application with static config file and dynamic cloud setting it got from admin panel. Config directories and logs should be mounted as external volumes.
Create configuration directories:
Create docker compose file
TCP port 8080 is local port provide HTTP API for internal needs. Using this API you can register streamer instance in control panel on https://niostreamer.com.
First pull the container
And run it:
Now niostreamer is up and running. Let's register it in admin panel.
Using control panel you are able to manage and monitor your instances using web browser or mobile.
First, register a new account to proceed: https://niostreamer.com/console/register
Sign into your account. You will see empty dashboard as there are no server instances registered yet: https://niostreamer.com/console/instances
You will see the exampl of curl command line utility demonstrates how toy register instance in control panel. Niostreamer has special API on HTTP port 8080 to do that.
Run the following command in other window:
curl -X POST http://localhost:8080/api/v1/saas/instances/register \
-H "X-Account-Key: AA1SXUJHBWT277LNMM6P" \
-H "X-Account-Secret: 2ibhtnyHRCetYkOh9r5IoYZqPcZ0oBj8DJrO5Sb8"
You will see in logs that instance is registered:
You will see the new instance in web panel:
Now Niostreamer is ready to accept incoming connections. In next articles we will show how you can ingest incoming RTMP connections to niostreamer server in Docker.