WCS can be used in Docker with official Docker image since build 5.2.458

Docker deployment example

To deploy the simple WebRTC streaming server in Docker, do the followin steps:

1. Pull the latest WCS image from Docker Hub

sudo docker pull flashphonerofficial/webcallserver

2. Set up docker bridge network

sudo docker network create \
 --subnet \
 --gateway= \
 --driver=bridge \
 --opt com.docker.network.bridge.name=br-testnet testnet

3. Start WCS docker container with your own trial or commercial license number

docker run \
-e PASSWORD=password \
-e LICENSE=license_number \
-e LOCAL_IP= \
--net testnet --ip \
--name wcs-docker-test --rm -d flashphonerofficial/webcallserver:latest

4. Check if the container available by SSH

ssh root@

5. Open Two Way Streaming example in local browser, publish a stream

6. Close the page, stop the container

sudo docker stop wcs-docker-test

Docker container configuration

Networking issues

By default, IP address will be set dynamically to the container. So if you suppose to use fixed IP address, you should set it with docker run options and pass to the container using LOCAL_IP variable:

docker run -e LICENSE=license_number -e PASSWORD=secret \
 -e LOCAL_IP=static_ip \
 --net your-docker-network \
 --ip static_ip \
 --name webcallserver-instance -d webcallserver:latest

If your docker host is behind NAT, and your WCS is supposed to be available from outside, you should set external IP address to EXTERNAL_IP variable:

docker run -e LICENSE=license_number -e PASSWORD=secret \
 -e LOCAL_IP=static_ip \
 -e EXTERNAL_IP=external_ip \
 --net your-docker-network \
 --ip static_ip \
 --name webcallserver-instance -d webcallserver:latest

Environment variables reference

The following environment variables can be passed to the container:

Volumes reference

The following docker volumes can be mounted to the container

The container launch example with all the volumes mounted:

docker run -e LICENSE=license_number -e CDN_ROLE=origin \
 -v /opt/wcs/conf:/conf \
 -v /opt/wcs/logs:/usr/local/FlashphonerWebCallServer/logs \
 -v /opt/wcs/hls:/usr/local/FlashphonerWebCallServer/hls \
 -v /opt/wcs/media:/usr/local/FlashphonerWebCallServer/media \
 -v /opt/wcs/records:/usr/local/FlashphonerWebCallServer/records \
 --name webcallserver-instance -d webcallserver:latest

Additional instance configuration

The following additional configuration files can be placed to the host folder mounted as /conf volume:

All those files can be used for example to restore Web Call Server instance configuration from backup and automatic deployment. The files will be copied to the container 'as is', except flashphoner.properties:

Container ports

The following ports are available by default:

The ports can be changed using docker run --expose parameters if necessary. In this case, the actual port values should be set to flashphoner.properties and wcs-core.properties files, see description above