The current WebRTC 2.0 package runs signaling, sample authorization, and browser pages in one container. Get the latest downloadable release or the source code and deployment guide. Server TLS certificates are not bundled.
Installing and Running the Signaling Server
Install Docker with Linux container support and Docker Compose v2. To build from source:
git clone https://github.com/Medialooks-LLC/WebRTC20_signaling_server.git
cd WebRTC20_signaling_server
docker compose up --build -d
Alternatively, download docker-image-linux-amd64.tar.gz from the latest release. Keep a source checkout for its compose.yaml. In the download directory, load the image:
docker load --input docker-image-linux-amd64.tar.gz
Copy the complete image name printed after Loaded image:. In the source directory, create .env with that complete value:
WEBRTC_IMAGE=PASTE_THE_COMPLETE_IMAGE_NAME_HERE
Then start the downloaded image from the source directory:
docker compose up -d --no-build --pull never
Required SSL Certificates
Browser camera/microphone capture requires HTTPS, except on localhost. C# receivers require an HTTPS endpoint. For other computers or phones, use a domain and a certificate trusted by those devices.
The simplest public setup is an HTTPS reverse proxy on the Docker host, forwarding pages and WebSockets to 127.0.0.1:8080. For example, Caddy can obtain and renew certificates with this Caddyfile:
rtc.example.com {
reverse_proxy 127.0.0.1:8080
}
Point DNS to the server, allow inbound ports 80/443, and run Caddy with this configuration:
caddy run --config Caddyfile
Alternatively, serve TLS directly. Add these settings to .env, retaining WEBRTC_IMAGE when using a downloaded image:
TLS_CERT_FILE=/absolute/path/to/fullchain.pem
TLS_KEY_FILE=/absolute/path/to/privkey.pem
WEBRTC_BIND_ADDRESS=0.0.0.0
fullchain.pem contains the domain certificate followed by intermediate certificates; privkey.pem contains its unencrypted private key. Both PEM files are mounted read-only and must be readable by container UID/GID 1000. Keep the private key restricted; do not make it world-readable.
docker compose -f compose.yaml -f docker/compose.tls.yaml up -d --no-build --pull never
If no image has been built or loaded, replace --no-build --pull never with --build. Open https://rtc.example.com:8443/streamer. This configuration also exposes HTTP 8080; restrict that port separately.
Validating SSL Certificates
Use OpenSSL to check the key and inspect the certificate dates and chain:
openssl pkey -in privkey.pem -check -noout
openssl x509 -in fullchain.pem -noout -subject -issuer -dates
openssl crl2pkcs7 -nocrl -certfile fullchain.pem | openssl pkcs7 -print_certs -noout
Clients must also trust the chain, and the certificate must cover the hostname they use.
Changing the Default Port
Set WEBRTC_HTTP_PORT in .env to change host HTTP port 8080. For direct TLS, WEBRTC_TLS_PORT changes host HTTPS port 8443. Update URLs and any proxy upstream accordingly. Optional SDK_SIGNALING_URL=https://sdk.example.com changes advertised C# receiver links only; configure that HTTPS endpoint separately.
Starting the Server
Check startup with:
docker compose ps
docker compose logs --tail=100 webrtc
For direct TLS, include both -f options above. Once healthy, open http://localhost:8080/streamer locally, or your public HTTPS address. The default HTTP binding is loopback-only. See the repository deployment guide for updates and additional settings.
Optional TURN relay
If peers need a relay to connect across restrictive networks, configure a separate TURN service and add its settings to the signaling project's .env file:
TURN_SERVERS='turn_user@replace_with_turn_password:turn.example.com:3478'Apply the change with docker compose up -d (include the TLS Compose file when using direct TLS), then reload browser pages and reconnect C# applications. The server advertises these defaults to browser and compatible native WebRTC 2.0 clients. See TURN Server Configuration for WebRTC 2.0 for supported syntax, multiple relays, native overrides, and relay deployment.
Still have questions?
Tell us what didn’t work or what you’d like clarified.