There are three ways that can be used to set PeerStreamer-ng up and running

Cloudy deployment

The preffered way to install PeerStreamer-ng is inside a cloudy box. Create the file /var/local/cDistro/plug/resources/docker/containers/PeerStreamer-ng_latest.json with the following content:

{
	"appname": "PeerStreamer-ng",
	"description": "P2P live video streaming",
	"arch": "[armhf,amd64]",
	"image": "--net host lbaldesi/peerstreamer",
	"name": "peerstreamer" 
}

Then, using the Cloudy web interface, browse to Enterprise/Docker, click on Add predefined image and then on PeerStreamer-ng to install and run the PeerStreamer-ng application.

Download and compilation

Several dependencies have to be satisfied, on ubuntu you can just type:

apt install libmicrohttpd-dev libjansson-dev libnice-dev \
	libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev \
	libopus-dev libogg-dev libcurl4-openssl-dev pkg-config gengetopt \
	libtool libcrypto-dev automake

Now you are ready to compile and execute PeerStreamer-ng which is as easy as typing:

git clone https://github.com/netCommonsEU/PeerStreamer-ng
cd PeerStreamer-ng
make
./peerstreamer-ng

Docker image

PeerStreamer-ng also comes bundled in a Docker container. Note, however, the available release might be not the latest bleeding-edge version.

docker pull lbaldesi/peerstreamer

If you want to build the container yourself follow the instructions in the related Github repo.

Run the container to allow for arbitrarily port openings:

sudo docker run -d --name peerstreamer-ng --net host lbaldesi/peerstreamer

To advertise the streaming channels to other PeerStreamer-ng instances you need a side communication channel; the docker image is already configured to take advantage from a local Serf installation. So, to run a Serf agent and start advertising PeerStreamer-ng channels, just type:

serf agent -iface <outer_net_interface> -bind <local_ip_addr>:<local_port> [-join <remote_ip_address>:<remote_port>]